[1.12.2] NPE While loading existing world. (minecolonies.structures.helpers.Structure.getSize)
Misunderstood-Wookiee opened this issue ยท 12 comments
Version Info
Minecolonies 1.12.2-0.8.7508
Forge 14.23.2.2611
Expected behaviour
- Normal World Load and continue playing
Actual behaviour
- World Loading is looping on Loading World screen and never initiates
Building Terrain
upon closing out of the game and trying to load the same world again it will load fine but the colony data is completely erased and no colonies exist in the world (it's like this mod self-deleted the colony due to the error).
After force closing the java process and loading MC back up again I can enter the world w/o problem except the colony is gone -
Thankfully this mod makes automated backups colony data however whenever I replace the data with that of a backup made two days ago the problem above occurs again. If no colony exists the world loads normally like below.
Extended Information
This is a world I have been playing on for the past few weeks and properly closed out of a few days ago to have a break from MC and went to continue playing again today!
Oddly enough the only mods which I updated were Pams Harvest Craft & Reborn Core & Biomes O Plenty, though I don't think this would have had any effect as the update was to a core mod for StevesCarts Reborn (which I have no entity or tile data for that mod in this world yet, and Pam's Harvest added some new recipes requiring a config regen for HarvestCraft.cfg. Biomes O Plenty updated a simple command fix to correctly tpbiome, I am aware that if they changed world-gen or something it may be an issue, however, the world loads correctly without the colony existing,
Steps to reproduce the problem
I don't know sorry, I didn't do anything in-game to cause this I just loaded up an existing world after exiting the game a few a days ago.
I am reverting BOP and Pams to see if one of these caused a hiccup due to something a citizen may have had in inv. Will edit this brief post shortly with findings.
Edit
Tested the same world without the recent updates made to mods and reset the colony data a day before the problem colony data file and the issue remains if any of my backups are used this error occurs, Using either the pre-mod updates and post mod updates makes no difference the world sits on the Loading World until the next time I start the game and the colony data gets reset by this mod. Something corrupted the colony and I don't know what I was playing this world over LAN for just over a week straight without issue and even updated mine colonies without issue to the version which fixed the prev NPE I reported.
Do you guys have any more information on this for me? I can't play the game at this point as I don't wish to start over again so I will just wait and see what you guys have to report on this and play Starbound or Staxel in the time being.
@Misunderstood-Wookiee it seems like there is a schematic missing one of your builders is trying to build. You can empty the build queue in the colonies.dat file with an nbt editor to fix this.
Can you please send me the pastebin as a gist?
@Raycoms If you are available now I can do this and try figure this out while you are around?, I have an NBT editor yea so I can deffo clear the que, I think I know what it may be after you said it was a schematic.
I made a couple custom paths and saved them, but I messed up a couple of the saves and deleted them and re-saved the fixed versions but I also didn't think to remove them from the build queue and instead just placed the new path over the unbuilt one thinking it would just skip it and build the new one.
I used a solid placeholder in an air block actually I am not sure if I built a removed schematic I cannot remember really so this might actually be the issue. I suppose though in a future build it could handle the issue better like a log that the schematic didn't exist and will be skipped or removed or something other than crash the client. I mean detecting this seems possible and it could clear the build queue on it's own.
I will get this gist over to you.
Yeah I am working on something now which removes the building from the queue if it runs into this issue automatically.
@Raycoms https://gist.github.com/Misunderstood-Wookiee/31c90ffb7dfd9abb14091c4c58fd2e23
Is this what you were after? I am unsure how this is better than the pastebin without the file colony attached and the world.
yea I have time am actively working on this problem right now aswell.
If you have the time, you can send me the gist and I can create the fix and send it to you to test it out.
@Raycoms Ah okay :),
Well I will load up NBTExplorer and clear the colony build list and see if the world loads with the colony intact in the meantime, while you peruse the crash report.
Okay try this jar: https://s3.eu-central-1.amazonaws.com/minecolonies/Minecolonies/Minecolonies_Branches/7532/minecolonies-universal-1.12.2-0.8.7532.jar
It shouldn't crash anymore but the builder will start throwing exceptions I think
@Raycoms Is this the correct thing to set to 0 https://i.imgur.com/oz1tSWS.png ?
@Raycoms Alright installed it and loading the world now.
@Raycoms
Alrighty, you legend :). The world loaded fine and the colony existed so the first thing I did was run to the town hall and cleared the entire build order list and recalled everybody.
No builder thew an exception, though I probably didn't give them enough time to try to build anything.