Comments (6)
I think I have an easy fix for this. It's like your option #1. I was using
the downloading flag during save so that the user would not start another
download if the previous download was still saving. Still, it may take many
seconds for the previous world to save so the async save is very important.
It can be actively saving the overland world while the user is exploring
the nether or some other dimension. Multiple async saves can be happening
at the same time so if they went from dimension 1 to dimension 2 then to
dimension 3, they would potentially all be saving at the same time. I'll
set downloading to false but keep isSaving or whatever I called it to true.
That makes it so the "Saving..." chat message will still be printed every 5
seconds. I'll add the name of the world to that message so the user knows
what is being saved. Good catch and debugging, thanks.
On Tue, Sep 4, 2012 at 2:31 PM, Florian [email protected] wrote:
Steps to reproduce
- Build Nether portal
- Start download
- Walk into the portal and wait for the teleport
- The game crashes because of this code in WDL.java (line 156; method
onWorldLoad):if( downloading ) // This should NEVER happen! (famous last words, lol)
throw new RuntimeException( "World Downloader: Couldn't stop download! Check your worlds!" );Problem
Probably has something to do with the new class WDLSaveAsync.
WDL.downloading is set to false very late in the saving thread.
This worked well when saving was synchronous but is a problem now because
the onWorldLoad hook gets called before saving is complete.
Possible solutions
Move WDL.downloading = false; to the beginning of the thread or even
out of the thread (???)Delay the method onWorldLoad until the saving thread has finished
(???)Something else?
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/2.
danthedad
from worlddownloader.
Hmm. The actual saving of the chunks is always asynchronous in Minecraft. When you call saveChunk, it just queues it up in the ThreadedFileIOBase queue. The queue processor only tries to save one chunk every 10ms from what I can tell. If there is a thread waiting on the queue to be empty, then the delay is removed and it goes full speed.
There are a couple of reasons I added a new thread to do the saving and another thread to report on the progress of the save. First, when the user clicks "Stop Download", there is a delay as the gui screen is still displayed until stop() completes. None of the saving chat message come out until the saveEverything function (actually just queuing) is complete. The reason for the async save class is to have a thread that can block on the actual queue processing so we know for sure when it's done. Blocking on the save on the main game thread may crash the game or at least disconnect the client from the server due to response time-out. The second save reporter thread monitors the status of the WDL.isSaving flag and reports "Saving..." every 5 seconds until it's complete.
Having the WDL save be asynchronous means that swapping out the WorldClient, Player, Minecraft instance, etc just as the save thread is starting up will cause race conditions. The save thread needs to have a reference to the world and player that it's currently saving, while the player is free to move to another world.
A solution may be to start up the save thread with the data needing to be saved. Mainly, a reference to the WC, Player, and maybe some flags or overrides. It can finish up, monitor and report the progress of the save while the main WDL class either just stops or starts up with a new world in the case of moving into the nether.
I tried out some options tonight and I'm not satisfied with any of them yet. It would be nice to prevent the user from stopping and then re-starting the download while it's still trying to save. Also, if the user moves to the nether, the save reporter could let them know when it's safe to move back to the overland world.
from worlddownloader.
I have only looked at this issue superficially and will also not be able to help for the next few days, sorry.
Another option would be to remove all the static from the WDL class and use one WDL object for each WorldClient that is created in a Minecraft session.
That would be another big rewrite though.
from worlddownloader.
This also occurs when entering a portal to The End. Let me know if there is any information I can provide.
Crash Report:
Minecraft has crashed!
----------------------
Minecraft has stopped running because it encountered a problem; Unexpected error
This error has been saved to /home/strider/.minecraft/1.4.2/.minecraft/crash-reports/crash-2012-10-29_12.36.13-client.txt for your convenience. Please include a copy of this file if you report this crash to anyone.
--- BEGIN ERROR REPORT 8ca17141 --------
Generated 10/29/12 12:36 PM
- Minecraft Version: 1.4.2
- Operating System: Linux (amd64) version 3.2.0-3-amd64
- Java Version: 1.7.0_09, Oracle Corporation
- Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
- Memory: 900729088 bytes (859 MB) / 1022361600 bytes (975 MB) up to 1022361600 bytes (975 MB)
- JVM Flags: 2 total; -Xms1024m -Xmx1024m
- AABB Pool Size: 5656 (316736 bytes; 0 MB) allocated, 1686 (94416 bytes; 0 MB) used
- ModLoader: Mods loaded: 2
ModLoader 1.4.2
Inventory Tweaks 1.44 (1.4.2) - LWJGL: 2.8.4
- OpenGL: NVS 4200M/PCIe/SSE2 GL version 4.2.0 NVIDIA 304.48, NVIDIA Corporation
- Is Modded: Very likely
- Type: Client
- Texture Pack: Default
- Profiler Position: N/A (disabled)
- Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
- World MpServer Entities: 2 total; [axc['johnmlang'/2620629, l='MpServer', x=-964.68, y=14.46, z=280.48], axc['johnmlang'/2620629, l='MpServer', x=100.00, y=50.62, z=0.00]]
- World MpServer Players: 1 total; [axc['johnmlang'/2620629, l='MpServer', x=100.00, y=50.62, z=0.00]]
- World MpServer Chunk Stats: MultiplayerChunkCache: 0
- Forced Entities: 1 total; [axc['johnmlang'/2620629, l='MpServer', x=100.00, y=50.62, z=0.00]]
- Retry Entities: 0 total; []
java.lang.RuntimeException: World Downloader: Couldn't stop download! Check your worlds!
at WDL.onWorldLoad(WDL.java:157)
at awz.a(WorldClient.java:151)
at awr.a(NetClientHandler.java:1114)
at dl.a(SourceFile:135)
at bx.b(SourceFile:341)
at awr.d(NetClientHandler.java:90)
at awz.b(WorldClient.java:64)
at net.minecraft.client.Minecraft.l(SourceFile:1282)
at net.minecraft.client.Minecraft.J(SourceFile:582)
at net.minecraft.client.Minecraft.run(SourceFile:534)
at java.lang.Thread.run(Thread.java:722)
--- END ERROR REPORT 13445570 ----------
from worlddownloader.
When leaving The End for the Overworld, the client does not crash. Instead the download is automatically stopped and the "Chunk saving complete" message is displayed. The download must be manually resumed.
from worlddownloader.
I posted BETA 6 in the forums which should fix this crash.
from worlddownloader.
Related Issues (20)
- We should choose a license HOT 2
- Minecraft does not have download button and not mac compatable! HOT 2
- 1.7.10 HOT 2
- Minecart Chest only saved while stopping downloader inside chunks that contain minecart chests. HOT 1
- Crash
- Downloading doesnt work....
- Stops after: "Started saving." HOT 2
- Update to 1.8 HOT 11
- Crash (1.7.10) HOT 1
- Saving doesnt work HOT 3
- 1.8 WDL with LightLoder is't working...
- Signs are random text
- Crash on world change: multiworld support enabled
- Allow servers to disable worlddownloader HOT 5
- If anyone feels like updating this (I don't) you don't need to be using reflection to access chunk data HOT 5
- Crash When Enabling Multiworld Support In FTB Unleashed 1.5.2(Re-created In Multi MC)
- Crash when connecting to server
- WDL keeps worlds holograms unable to remove them
- world Downloader Server Kicked Countermeasure
- World Downloader Mod crashing upon Saving World HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from worlddownloader.