Zero-length multiblock manual structure causes Immersive Petroleum crash
Zekrom64 opened this issue ยท 5 comments
After investigating a crash during startup from Immersive Petroleum I found that its multiblock projector was crashing when trying to add information for an Industrial Wires multiblock (specifically, the commutator). Immersive Petroleum adds information about the multiblock's size using the 3d array returned from getStructureManual() in the IMultiblock interface, but the particular multiblock was returning a zero-length array, causing an ArrayIndexOutOfBounds exception. I figured this would be the correct place for the issue, as multiblocks should be at least 1 block wide in all directions (returning an array with at least 1 element for each dimension).
I haven't been able to reproduce this crash. If you would post a crashlog, as I requested in the contributing guidelines, I'll probably be able to fix it.
crash-2018-08-01_13.54.17-client.txt
I modified immersive petroleum to avoid the crash and also discovered that the 4-phase Industrialcraft commutator multiblock is missing in the manual, might be related to the issue?
- The invisible 4-phase electrode model (in your screenshot) is caused by Optifine, I haven't had time to properly debug that yet.
- The missing structure in the manual is caused by the same issue as the crash (the structure is the same as for the electrodes except the generator block is replaced with an IC2 kinetic generator): the multiblocks shown in the manual are only used for the manual (forming is completely seperate) and are loaded from structure template files. I'd guess that some mod in your instance is causing the loading to break in some way, no idea how. Are there any unusual errors in the log? Is this pack available anywhere (for debugging, unless you want to do the binary search yourself)?
After swapping around mods, the issue was fixed by updating industrialcraft from version 2.8.16 to 2.8.69. I assume the version I was using before had different tile names/block properties and was causing the structure to load incorrectly. The manual does have a minor issue listing the kinetic generator as "Invalid" in the required materials.
I was only using the mod with my own Minecraft instance, so there is no public pack. I attached my debugger to the game during startup and stepped through the updateTemplate() method in MultiblockTemplateManual to see where the issue occurs. I think Minecraft is failing to correctly read the templates with IC2 blocks and leaving them blank, although I need to setup my modding environment to be able to step through the code that reads templates.