Repurposed Structures (Forge)

Repurposed Structures (Forge)

21M Downloads

Crash when updating exisiting worlds

AdaraChristine opened this issue · 19 comments

commented

forge-1.15.2-31.1.47
repurposedstructures-1.15.2-1.4.1

Crash with existing world when i update Repurposed Structures from 1.3.0 to 1.4.1

https://pastebin.com/wQEvsgaV

commented

Found a similar error trying to update from 1.3.0 to 1.5.0
(Forge 31.1.46 -> 31.2.0)

https://pastebin.com/iM8egNKa

commented

@james-ben
The crashlog says that occurred in the nether but as far as I know, I never removed a nether structure. I'm not sure it is my mod causing this crash. Did you update any other mod at the same time? Does the crash go away when you revert only my mod to 1.3.0?

commented

Yes, this occurred when I tried to update all of the mods in the pack (self-made). About half of them are a different version from what I started with. I reverted only Repurposed Structures to 1.3.0, and the server loaded fine. I did notice that the config file format is much different between these versions, but I don't know enough about modding to say if that has anything to do with this error.
Awesome mod, by the way.

commented

That super weird. I just opened up the 1.3.0 and the 1.5.0 versions and compared the structure registry names and there's nothing missing so this crash should not be possible. I'm spooked. Hmm.

I might be able to put together a tiny mod or ask another modder to make one that will log to the console the missing structure that was attempted to be made and caused the crash. It would definitely help me and tons of other modders/modpack players too.

commented

@james-ben Actually, looking at the vanilla code, it should be already logging the missing structure. Do you have the full latest.log file? If so, can you show me it so I can see if it did log the missing structure. (make sure you use 1.5.0 and cause the crash before getting the latest.log)

Hopefully it won't be too difficult to find the issue this time!

commented

Ok so it is having trouble finding the Nether Temple as according to the lines right before the crash

[17Jun2020 07:02:28.033] [Server thread/ERROR] [net.minecraft.world.gen.feature.structure.Structures/]: Unknown feature id: repurposed_structures:nether_temple
[17Jun2020 07:02:28.064] [Server thread/ERROR] [net.minecraft.server.MinecraftServer/]: Encountered an unexpected exception
net.minecraft.crash.ReportedException: Exception generating new chunk

But here's the weird part, 1.15.0 had the nether temple registered the exact same way as 1.3.0 as seen here in the file history:

1.3.0:

1.5.0

I'll be honest, I have zero clue as to why it suddenly cannot find the temple anymore I'm wondering if another mod is modifying forge's feature registry or something but that would be omega concerning and I would hope to god nobody would ever do that lol.

I guess one more thing you could try is to use v1.7.2 Repurposed Structures but if that still doesn't work, I'm out of ideas. I'll open this issue report and if another person also has this issue, they can report their log and I'll compare the two to see which mods are on which could narrow down the source of the problem

commented

Yeah that kind of crash is fairly comment when adding/removing worldgen mods or features/structures in an existing world. There's really nothing I can do as this is a flaw with vanilla/forge when it comes to worldgen in existing worlds. Sorry

The best option right now is to stay on Repurposed Structures 1.3.0 for old worlds and use 1.4.1 in new worlds you make.

Though there is one other thing you could try that I have no idea if it'll work. Load up the world in 1.3.0 and go stand at the edges of the chunks you explored. Stay there for like 5 minutes so MC can fully create those chunks, then exit world. Then try 1.4.1 on that world. I dont know the exact cause of the issue but it could be that the chunks were in the middle of generating and when entering the world without the structure/feature or worldgen stuff, the chunk cant finish creating itself as it expected the old stuff and crashes.

commented

Do you plan on adding more features in the future? Since this is for a modpack it would be very frustrating for my players to reset their world every time you add new stuff.
The only solution i see is to wait to add your mod until you are finished with adding ALL the structures you have planned and ask my players to recreate a world then.

commented

I think the issue was because I split up the Mineshafts variants from a single structure into multiple separate structures and so, the biomes were still looking for the old mineshaft instead of the new one for chunk creation.

However, from here on out, I'll only be doing additions or new structures/features which will not cause that kind of crash. But yeah, it's pretty much finished right now but I do have far future plans to try and add new village variants. But that's on the backburner as I am working on my other mods a lot more now and making new villages is fairly tedious and very time consuming.

commented

I am stuck because of this issue. If I load the latest version I get the mineshaft error, if I load the older version and go into the nether I get a nether_temple error. Couldn't you just create an empty structure (i.e. one that doesn't actually do anything) for the new version with the old id so the wordlgen can at least run?

commented

Correction, looks like I get the nether_temple error in the newer version as well, so I think my save may be hosed...

commented

I’m not sure if having a blank structure with the old mineshaft Id would prevent the crash but I’ll give it a shot. Might work.

Also, yeah it sounds like your work got corrupted as the nether temple is in both versions just fine. I didn’t touch it in either. Sorry about that.

After this latest version, there definitely won’t ever be a change with structure IDs so this issue won’t happen again. (Hopefully!)

commented

TO ANYONE ELSE READING THIS,

Please do not delete your world! Try v1.4.3 here and see if this prevents the crash when updating from v1.3.x to the newer versions of Repurposed Structures.
https://www.curseforge.com/minecraft/mc-mods/repurposed-structures/files/2963840

Let me know if there's any issues!

Commit that fixed the issue: 34a3f03

commented

@xannor Yeah your idea of using a dummy structure worked! However, in order to make the game use the dummy structure when it finds the missing old mineshaft structure, I had to register the dummy structure under the old mineshaft's name.

So doing /locate repurposed_structure:mineshaft will always fail as that's the dummy structure. All other locate commands will work. I would love to rid that entry but it seems like that won't be possible. This is the best I can do at the moment but it's a lot better than updating worlds causing crashes. Thank you again!

@AdaraChristine If you still have people on old worlds, switch this mod to 1.4.3 and ask them to try that update. Sorry if this fix was too late.

This issue will be closed in a week just to make sure anyone else with this issue can see this thread in time!

commented

I did reset my nether to solve the temple issue, but that was not as much of an issue since I didnt have much in it other than tunnels. An interesting note, Journymap actually causes the error, because it attempts to generate chunks to map them, but I guess since the chunk is outside of rendering distance it just logs the failure but doesnt crash the game. I think I can use this to verify the "fix."

commented

Ok I will say this looks good and solves the issue. I have no errors in the log about failure to serialize a chunk nor any issue about mineshafts, I always had at least on prior, which I believe was due to journymap trying to map a chunk. I also explored in a direction that I would crash previously and had no issues.

commented

Sorry, already deleted server and removed RepurposedStructures from the pack. Ive learned from deving past packs that unstable extra world gen can really be a pain for me and players down the road so im keeping the world gen in this pack to simple structures with only vanilla blocks. Thanks for the heads up tho.

commented

Closing issue report now as it's been over a week with the crash fix out. :)