Mekanism Additions

Mekanism Additions

21M Downloads

1.15.2 Issue - Cannot load original world after adding, then removing, a mod

saladm2 opened this issue ยท 18 comments

commented

Please use the search functionality before reporting an issue. Also take a look at the closed issues!

Issue description:

I stopped the server. I made a backup zip of the entire .minecraft folder. Then I installed the most recent phosphor (forge version) mod (version mc1.15.2-0.5.2+build.4). Then, I cannot load the world on my server - the minecraft server console gui states the world reaches 100% loaded, but then my cpu usage drops to zero and the minecraft server hangs forever. When trying to connect to the server in this state from a client, they are met with the "server is still booting" message.

Furthermore, if I erase this server instance, unzip my backup, and try to start that server instance, the world does not load. This has happened with other mods as well, not just phosphor.

The only time shutting down the server and restarting it has worked with mekanism installed is if I stop the server, do literally nothing, then restart the server.

If I remove the mekanism mods the server will start and I can load into the world.

Steps to reproduce:

  1. Stop the server
  2. Add a mod
  3. Try to bring the server back online

Version (make sure you are on the latest version before reporting):

Forge: 31.1.71
Mekanism: 1.15.2-9.10.5.418
Other relevant version: Minecraft 1.15.2

If a (crash)log is relevant for this issue, link it here: (It's almost always relevant)

logs.zip

commented

If it helps, I am pretty confident that any mod that force loads chunks can end up with this issue, not just Mekanism. Mekanism is the one doing it here, but other chunk loaders (ChunkNoGoByeBye, Persistent Bits, etc.) can result the same issue if used (this: #6174 (comment) and this: #6174 (comment)).

I haven't figured out what the root cause of this is due to lack of time though. :(

commented

Can reproduce with the following steps:

  1. Place a teleporter block in the Nether and set a teleport destination
  2. Upgrade it with the Anchor upgrade
  3. Reload world
  4. Minecraft will not be able to reload the world.

It seems to be inconsistent sometimes so just keep trying to reload the world. Also it seems that the End isn't affected by this bug.

commented

Are those reproduction steps with just mekanism?

commented

I cannot manage to reproduce this with just mekanism but i did notice that anchor upgrades may be loading terrain before anything else does according to the animation as you load the world.
Additionally according to that animation the terrain that gets loaded can overlap which could also be problematic.

commented

To give a bit more of a total view on an earlier comment of mine, here is the whole server thread of one of these worlds that refuses to load with only mekanism installed
image
EDIT: multiple minutes later this made a brief appearance after which suddenly the threads can no longer be sampled but memory still can.
image
And idk if it helps much but this is the result of a thread dump of the server thread:
image

commented

Turns out that removing mekanism_force_chunks.dat from the data folder will make these broken worlds loadable, upon saving this file will be regenerated and will remain to work correctly for atleast a short while
Keep in mind that in the case of the world of the person that created this issue the used world folder is named paradise and not world if you wish to mess around with this.
I do however not know if the world doesn't load because of an issue with this file or something loaded by blocks with an anchor upgrade.

commented

From what I can tell I just made a commit that fixes this issue, I will try to release an update sometime in the next few days that includes it.

commented

9.10.8 is now released and on curseforge, and should fix this issue.

commented

I can upload a copy of my .minecraft server folder if that would help diagnose.

commented

Thank you for your time. At this point I'm desperate. I uploaded my entire .minecraft server just in cased I missed any additional files you may need.

https://drive.google.com/file/d/1fIr5EyvXsjJMgSVqRcs-crlw6Zrmb_Pr/view?usp=sharing

commented

If you provide your mods, world and config folder i'll dig deeper into this

commented

I managed to get the world to load after removing all traces of mekanism data from the world but without removing the mekanism mods, i'll narrow it down later today or tomorrow.
It seems like something doesn't work correctly when you remove mekanism and re-add it later.
I believe it's one of the smaller things such as what chunks to load though so there is a possibility another mod corrupted something.

commented

The odd thing if that is where the server is halting... is looking that method up it is a client side only method and doesn't exist on the server so if a mod is trying to call it the server should just outright crash instead of just halt.

commented

For some reason the server thread gets stuck on this but i have yet to find the source, this is all the server thread is doing, nothing from any mod is present there
The entire server thread gets mostly emptied and mostly freezes once the server loads the world:
image

commented

Well, there is still a message when you try to connect but that might originate from another thread in 1.15.2 but aside from that next to nothing responds, you can't even stop the server

commented

I have a similar problem when running Mekanism-1.15.2-9.10.6.419.
Server when coming online skips directly to "Loading World 100%" and refuses commands while players are unable to connect. only fix so far has been to remove Mekanism.
Edit for clarity:
We had been running with this modpack for a few days with restarts in the meantime.
Same issue upon starting multiplayer world in singleplayer.
image

commented

The bug seems rather inconsistent, sometimes it will even randomly load just fine without any changes.

commented

Any updates regarding this issue? It's very interesting following your discovery process IMO