Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.12.2] NPE While loading existing world. (minecolonies.structures.helpers.Structure.getSize) #2223

Closed
Misunderstood-Wookiee opened this issue Feb 14, 2018 · 12 comments
Assignees

Comments

@Misunderstood-Wookiee
Copy link

Misunderstood-Wookiee commented Feb 14, 2018

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).

Here is the crash-log!

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 -
2018-02-14_12 30 00

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.

@Misunderstood-Wookiee
Copy link
Author

Misunderstood-Wookiee commented Feb 14, 2018

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.

@Raycoms
Copy link
Contributor

Raycoms commented Feb 14, 2018

@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?

@Misunderstood-Wookiee
Copy link
Author

@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.

@Raycoms
Copy link
Contributor

Raycoms commented Feb 14, 2018

Yeah I am working on something now which removes the building from the queue if it runs into this issue automatically.

@Raycoms
Copy link
Contributor

Raycoms commented Feb 14, 2018

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.

@Misunderstood-Wookiee
Copy link
Author

Misunderstood-Wookiee commented Feb 14, 2018

@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.

@Raycoms
Copy link
Contributor

Raycoms commented Feb 14, 2018

Because for some reason I can't reach pastebin

@Misunderstood-Wookiee
Copy link
Author

@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.

@Misunderstood-Wookiee
Copy link
Author

@Raycoms Is this the correct thing to set to 0 https://i.imgur.com/oz1tSWS.png ?

@Raycoms
Copy link
Contributor

Raycoms commented Feb 14, 2018

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

@Misunderstood-Wookiee
Copy link
Author

@Raycoms Alright installed it and loading the world now.

@Misunderstood-Wookiee
Copy link
Author

Misunderstood-Wookiee commented Feb 14, 2018

@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.

2018-02-15_00 56 33

@Raycoms Raycoms mentioned this issue Feb 14, 2018
@ghost ghost assigned Raycoms Feb 14, 2018
@ghost ghost added the In Progress label Feb 14, 2018
@ghost ghost removed the In Progress label Feb 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants