[1.19.2] Critical Bug: Game hangs when generating new chunks
Darkmega18 opened this issue ยท 16 comments
I have a fairly critical bug right now in:
Forge 43.2.21 1.19.2
with modernfix-forge-5.7.1+mc1.19.2
Whenever I generate a new world the world will hang and never get past 100% generated.
ingame it becomes an eternal waiting for server moment in an existing world which remains joinable until new chunks are made.
I grabbed a thread dump with visualVM, but I have no idea which could possibly be wrong, but than the fact that this modpack of over 290 mods was running before I added modernfix in hopes of bringing down some overhead for some friend's sakes. So while the game loads a lot more optimizedly, it's literally unplayable now except for void worlds or already generated places in existing maps.
I did notice before posting this message: #118 (comment)
I turned off the chunk deadlock thing, and it actually started working. So I'm not sure whats wrong with it but atleast you've got a lead.
debug combo.zip
Here are some debug logs I forgot to send along. the latest one is when it ran and I could play. there was still a spark related thread dump in there it seems causing some slowing.
The other two were just full hang after a point.
if they're worth anything to help you.
This is likely a bug introduced by Canary. Forge introduces a patch to prevent chunk deadlocks in some circumstances when mods use its EntityJoinLevelEvent
, however, Canary overwrites that code and from what I can tell the replacement does not include equivalent logic to that patch, which will reintroduce the issue. (This is a good example of why porting an optimization from Fabric to Forge blindly is not a good idea. ๐)
I think this should be reported to Canary, however, turning off mixin.world.chunk_access
in the Canary config may fix the issue for the time being.
Heres your thread dump:
https://pastebin.com/rC2grAkY
debug.zip
and your latest debug log. (after I crashed it after letting it sit for a little while.)
you've still got problem.
I did mention turning off YOUR chunk deadlock fixed it. this was with the chunk deadlock back on, cause you claimed canary to be breaking it. but canary is now turned off while pluto and saturn remain.
I think I see a Forge bug which is preventing my fix for this from working correctly. Give me a few minutes.
Can you try the beta build linked here: https://nightly.link/embeddedt/ModernFix/workflows/gradle/1.19.2/Package.zip
I think this should help.
This is likely a bug introduced by Canary. Forge introduces a patch to prevent chunk deadlocks in some circumstances when mods use its
EntityJoinLevelEvent
, however, Canary overwrites that code and from what I can tell the replacement does not include equivalent logic to that patch, which will reintroduce the issue. (This is a good example of why porting an optimization from Fabric to Forge blindly is not a good idea. ๐)I think this should be reported to Canary, however, turning off
mixin.world.chunk_access
in the Canary config may fix the issue for the time being.
only having that config set to false it still breaks. I need to keep the deadlock turned off also from yours. :V
I'll try that next then, if you'll stand by... although it takes pluto and saturn along with it cause of curseforge reasons. so I guess they're all related.
Alright, gimme a bit. takes a moment to load and actually get to the point of fully genned world that freezes...
Verdict is in. and it seems to allow me to join the world. but I'll explore for a bit and see if it still freezes anyway...
I seem to be frozen and hanging in game this time.
currently at:
[ModernFix integrated server watchdog/ERROR] [or.em.mo.wo.IntegratedWatchdog/]: A single server tick has taken 493058, more than 40000 milliseconds
I don't think it should take that long to find a snow biome (despite all the mods) for my origin to land in...?
Sus. in my world I was playing in the meantime (which works cause the terrain is already genned) while I was fighting I had some weird render bugs that changed the world white briefly when I was blinded I'd never seen before.
there's also some supreme lag and console spam I'm noticing, and my game turned nearly into a slideshow when using carry on on a chicken in the current world. This was after I stopped trying to load the new one which let me join but wouldn't let me go on.
I didn't try exploring new chunks before I stopped cause I was concerned about these new bugs that had rocked up.
take a look?
debug.zip
I did pick the forge one. not the fabric one...
edit: ok, chicken lag and probably visual issue is not yours. but the point remains that the world wouldn't generate and I was frozen, however it didn't actually take the whole game with it while the world was frozen due to generation and I was able to successfully return to main menu in a timely manner and keep playing another map.
So I guess you're making progress cause it didn't hang the entire game and make it unuseable until reloading?
Huh. ok, well, it did come on eventually. must'a got really terrible luck with the biome search.
Thanks for your assistance with this. It looks like the original freezing issue has been resolved. Apologies for prematurely closing that out - these issues always end up being a symptom of a bug in some other mod, or Forge, and it's been a whack-a-mole game the last few months to hunt down and patch out as many culprits as I can find, which has been frustrating.
it didn't actually take the whole game with it while the world was frozen due to generation and I was able to successfully return to main menu in a timely manner and keep playing another map.
If you are able to get back to the main menu at all, it means the game is not frozen, but rather worldgen is simply way too slow, causing the server to tick at a glacial pace whenever any new chunk is generated. When chunk generation finishes the game will recover and carry on with the exit process. An actual worldgen deadlock causes the game to become permanently stuck as you experienced before.
This usually means there are too many worldgen mods installed, or there is one particularly laggy mod. In the log you sent I noted that Origins appeared very frequently in the thread dumps so it might be worth trying without it in a dedicated test world, to see if performance improves at all.
Without this slowing things down I'd usually get to a spawn point from an origin (just some biome or a structure, cause I use origins to diversify peoples starting locations and gear) within a minute or two of lag. but I left it there for what was the equivalent of an ingame day in lag (the day night was actually moving) and it would not finish.
with the origins gone so too goes my start gear, war dance starting builds and equipment set ups, and deaths door/last chance mechanics among other things.
Unless I got particularly bad luck with the location of a potential snow plains, I dunno what was going on with that one. I'll try it again though if you want... see if it really was luck. since I jumped the gun and switched back to what worked early cause I had a chicken that crashed when I picked it up and had to swap some mods. :V
I appear to get periodic lag bursts at the intervals of which I remember it lagging for before teleporting me. but I don't get teleported from the start chunks which have generated.