[Bug/Glitch] Issues when autosave is disabled
Cjnator38 opened this issue ยท 2 comments
Legacy4J Version
1.21-1.7.2, 1.20.6-1.7.2
Mod Loader Version
Fabric Loader 0.16.0 (1.21), 0.15.11 (1.20.6)
Bug/Glitch Occurrence Context
Legacy4J's manual saving implementation seems to have a couple bothersome and potentially damaging issues
-
Saving and entering any world (including the world that was saves) too quickly can cause a chunks to get misplaced. Amount of chunks affected could be small, but most instances can fill up most of the log file with errors like "
Chunk file at [-32, 17] is in the wrong location; relocating.
"
Logs from test L4J 1.20.6-1.7.2 instance:
Before relaunch
After relaunch
Images from Re-Console 0.5.7:
-
Tamed animals can get deleted when manually saving and reloading the game (might also happen when simply reopening the world)
8mb.video-MDH-nlqANOkh.mp4
-
Deleting a world does not work if the previous world save was done with autosave disabled in the current game session. You can only delete the save by exiting the game and deleting through the saves folder, or restarting the game and deleting without loading the world.
-
Exit and Save => Exit Game causes the following to show up in logs:
java.util.concurrent.RejectedExecutionException: Task IOWorker-chunk 2 false rejected from java.util.concurrent.ThreadPoolExecutor@7d7cac8[Shutting down, pool size = 1, active threads = 1, queued tasks = 0, completed tasks = 59728]
at java.base/java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2081) ~[?:?]
at java.base/java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:841) ~[?:?]
at java.base/java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1376) ~[?:?]
at net.minecraft.class_3846.method_16908(class_3846.java:135) ~[client-intermediary.jar:?]
at net.minecraft.class_3846.run(class_3846.java:105) ~[client-intermediary.jar:?]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
at java.base/java.lang.Thread.run(Thread.java:1583) [?:?]
This might signal that the game is still trying to use ThreadedAnvilChunkStorage, but can't since it's disabled. I don't entirely know how saving works in vanilla, but this might also explain why some entities aren't saved
Crash Report
No response
What happened wrong?
Manually saving can sometimes cause chunks to be misplaced, tamed animals to be erased, and could prevent intentional save deletion
I tried Manually Saving and ended up crashing my game. I use L4J 1.21.0-1.7.2 and logs are below.
[22:12:54] [Server thread/INFO]:
Saving manually...
[22:12:54] [Server thread/INFO]:
Saving chunks for level 'ServerLevel[New World]'/minecraft:overworld
[22:12:55] [Render thread/INFO]:
Stopping!
[22:12:55] [Render thread/INFO]:
[FastQuit] Exiting FastQuit.
[22:12:55] [Render thread/INFO]:
[FastQuit] Waiting for "New World" to finish saving...
[22:12:55] [CullThread/INFO]:
[STDOUT]: Shutting down culling task!
[22:12:58] [Server thread/INFO]:
Saving chunks for level 'ServerLevel[New World]'/minecraft:the_end
[22:12:58] [Server thread/INFO]:
Saving chunks for level 'ServerLevel[New World]'/minecraft:the_nether
[22:12:59] [Server thread/INFO]:
{MINECRAFT_USERNAME} lost connection: Disconnected
[22:12:59] [Server thread/INFO]:
{MINECRAFT_USERNAME} left the game
[22:12:59] [Server thread/INFO]:
Stopping singleplayer server as player logged out
[22:12:59] [Server thread/INFO]:
Stopping server
[22:12:59] [Server thread/INFO]:
[FastQuit] Finished saving "New World" (5s)
[22:12:59] [IO-Worker-15/ERROR]:
Cound not schedule mailbox
java.util.concurrent.RejectedExecutionException: Task IOWorker-chunk 2 false rejected from java.util.concurrent.ThreadPoolExecutor@24ebe346[Shutting down, pool size = 3, active threads = 3, queued tasks = 0, completed tasks = 143505]
at java.base/java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(Unknown Source) ~[?:?]
at java.base/java.util.concurrent.ThreadPoolExecutor.reject(Unknown Source) ~[?:?]
at java.base/java.util.concurrent.ThreadPoolExecutor.execute(Unknown Source) ~[?:?]
at net.minecraft.class_3846.method_16908(class_3846.java:135) ~[client-intermediary.jar:?]
at net.minecraft.class_3846.run(class_3846.java:105) ~[client-intermediary.jar:?]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) ~[?:?]
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ~[?:?]
at java.base/java.lang.Thread.run(Unknown Source) [?:?]