Blood Magic

Blood Magic

90M Downloads

[1.8.9] Teleposer Null World Crash

oitsjustjose opened this issue · 9 comments

commented

Issue Description:

Cross Reference BuildCraft #3279
Recurrent crash on world-load due to BuildCraft tank null worldObj access. Strangely wasn't happening at all for a while, but as soon as I walked over close enough to accidentally get teleposed with the Tank, the server immediately crashed and is irrecoverable.

What happens:

My server (and in single-player) world crashes on load when my BuildCraft tank in the nether (which is chunk-loaded) is loaded on world startup. It seems like when the tank gets Teleposed (regardless if it's across dimensions or not), the tank's world object is never set.

What you expected to happen:

...Not crashing? ;D
Possible Solution: Try to get & set the worldObj of the block that is being moved via Teleposer?

Steps to reproduce:

  1. Place a BloodMagic Teleposer in the overworld, linked to another Teleposer in the nether
  2. Prepare some sort of conduit/pipe setup in the nether to modify the contents of the tank to be Teleposed
  3. Activate the teleposer while standing near enough to be teleposed with it. When you and the tank are teleposed, the server begins this recurring crash loop.

Affected Versions (Do not use "latest"):

  • BloodMagic: 2.0.0-20
  • Minecraft: 1.8.9
  • Forge: 11.15.1.1764
commented

To clarify (after some thought) its defiantly BC's fault (sorry for blaming BM) however your fix will ensure that it is ready to be used a few ticks before it normally would.

commented

No worries. Doesn't hurt to be safe.

commented

Technical notes: when minecraft adds a tile entity to a world, it will sometimes set the world object immediately, or it will wait until later to set the world. this can allow the tile to be available to the world. The alternative is that when you add the tile entity to the world you manually set the world object.

commented

I'll fix it on the 1.9 branch. For 1.8.9, I can only suggest "dun do dat".

commented

Hmmm..... okay :/

commented

I think people learn to not do it again pretty fast :)

commented

Yeah, no kidding, this "don't do that" lesson is costing me my entire world that me and several others have worked on for a good while... and with 1.9 almost fully adopted but not completely, I'll probably just shut down my mod server for a month or two until the same critical mods update to 1.9.

Or I guess I'll keep an eye on the 1.9 branch and when a fix comes up, I'll make a PR on 1.8.9 branch with the same fix to see if maybe I can recover our world :]

commented

Its something that I can fix in BC though, but it requires a tonne of null checks everywhere.

commented

:D ❤️