micdoodle8 / Galacticraft

An advanced Space Dimension Mod for Minecraft
Other
617 stars 334 forks source link

Crash when new 1.12.2 EnderIO versions Conduit connected to Aluminum Wire #3422

Closed Moobien closed 6 years ago

Moobien commented 6 years ago

REVIEW THE GUIDELINES (LINK AT TOP OF THIS PAGE)

Minecraft version: 1.12.2 Galacticraft version: GalacticraftCore-1.12.2-4.0.1.175.jar Galacticraft-Planets-1.12.2-4.0.1.175.jar MicdoodleCore-1.12.2-4.0.1.175.jar

Single player (SSP), Multiplayer (SMP), or SSP opened to LAN (LAN)? SMP

Galacticraft add-ons and other mods installed?

please refer to attached log file.

Please provide screenshots / crash report / log as needed.

Was in an asteroid base, connected a EnderIO Ender Energy Conduit to an Extra Planets Basic Decontamination Unit and then crashed. Both Server AND client have had Extra Planets removed and crash persists at the "loading terrain" stage of logging in.

crash-2018-05-28_23.15.36-client.txt

TheQuadShot commented 6 years ago

That map is screwed, you may be able to "fix" the crash and get it back but there is no guarantee. Edit your forge.cfg file, and look for this line, and change it to true. Then start your server. If you recover the map, don't forget to go back and restore the forge.cfg to its original. `# Set this to true to remove any Entity that throws an error in its update method instead of closing the server and reporting a crash log. BE WARNED THIS COULD SCREW UP EVERYTHING USE SPARINGLY WE ARE NOT RESPONSIBLE FOR DAMAGES.

B:removeErroringEntities=false ` so it should be B:removeErroringEntities=true

Moobien commented 6 years ago

Thanks for the response. I will let my server admin know and let him decide.

radfast commented 6 years ago

@TheQuadShot it's kind of you and very much appreciated that you provide the first line response to people with issues. This type of issue is a specific crash in Galacticraft code - see lines in crash report leading up to EnergyUtil.getAdjacentPowerConnections. Looking at the crash report it is not the player entity crashing, instead it is a block crashing (maybe because the player walked past it, hard to tell without decoding all the SRG method names like func_70091_d there. Anyhow, there is a code issue here ... I am always hoping that you might decide to learn Java, could be a project you will enjoy ... ? ;)

@Moobien I think this issue is caused by an attempted Galacticraft wire - EnderIO conduit connection, do you have a Galacticraft wire in a position next to an EnderIO conduit? Even if they don't look connected, if they are in neighbouring positions they might be trying to connect electrically.

I notice that you are using a "nightly" build of EnderIO. This probably means it is a beta release?

Looking at the crash report and the place in the code where the crash occurred, the cause of the issue here is most likely buggy or incomplete code in EnderIO. Not in Galacticraft. It looks like EnderIO have partly implemented the ForgeEnergy capabilities system, their tileEntity declares that it has the ForgeEnergy capability present but then returns a null handler when actually asked for it. I think that is a bug, it's certainly not what we are expecting.

Maybe once EnderIO 1.12 code is stable we can look at this some more. But until then I'm not going to spend time debugging an issue which seems more likely to be in their code than in ours. (This part of our code has been in stable release for more than 12 months now, with several million downloads and nobody else has reported an issue here, which again makes me think it is likely something in EnderIO.)

To re-access your world the server might need to WorldEdit the chunk to remove the EnderIO-Aluminum Wire connection, or delete the whole chunk. Alternatively, uninstall EnderIO which will remove all its blocks...

EpicSquid commented 6 years ago

Ender IO dev here, we have no issues with any other mods implementation of the forge energy capability. Are you asking for a direction? Because we return null only if no direction is given. Can you link your capability call please?

Edit: I cannot find anywhere in the repo that actually calls getCapability for energy. We do not support non-capability implementations.

radfast commented 6 years ago

Thanks for looking in @EpicSquid In that case I will investigate further our side and let you know if I think there is anything you need to look at.

radfast commented 6 years ago

@EpicSquid our code was definitely specifying a direction.

That line is inside a loop like this, so direction.getOpposite() cannot be null.

for (EnumFacing direction : EnumFacing.VALUES)
{
}

So I think your code is returning a null IEnergyStorage which caused this crash.

Anyhow, I have added a null check our side, so now it won't crash, but behaviour may still be unexpected if you return null.

radfast commented 6 years ago

This is fixed in latest Galacticraft build 180.

(One issue remaining is that EIO conduits seems not to be able to draw power from Galacticraft generators and energy storage, we'll take a look at that.)

EpicSquid commented 6 years ago

Thanks for the fix, I'll check it out at some point.