PneumaticCraft: Repressurized

PneumaticCraft: Repressurized

43M Downloads

Crash opening the refinery GUI

wormzjl opened this issue ยท 8 comments

commented

For feature requests, just erase this template and clearly describe the feature you'd like to see

Minecraft Version

1.12

Forge Version

2775

Mod Version

0.8.4-303

Describe your problem, including steps to reproduce it

Put some crude oil in a full size refinery and open the gui, the refinery is heated by vortex tube
Crashlog:
https://gist.github.com/wormzjl/6fda93a9c93b40840fb73f04a916942e

commented

What were you holding in your hand when you tried to open the GUI?

commented

Umm can't remember, some PnC/IC2 stuff or bare hand

commented

Looking at the code and your trace, it seems like you were holding something that the game considers a fluid-holding item, but with no actual fluid tank (i.e. PNC found a IFluidHandler capability on the item, but IFluidHandler#getTankProperties() returned an empty array of tanks). So it attempted to transfer fluid from the item to the refinery, which caused the crash.

I can add some code to check for that, but it would be very interesting to know what item triggered that behaviour in the first place. It couldn't have been an empty hand. (Actually, did you have anything in the offhand at the time?)

commented

Could be a fluid container from pressure pipes, or pressure tank from advanced rocketry. But I've just tested and they are not crashing.

commented

OK. In any case, I can code more defensively here to avoid a crash. The code in question is just checking if fluid can be transferred, not actually doing any transferring (to decide whether to open the GUI or just empty/fill a held container item).

commented

Build 308 from http://jenkins.k-4u.nl/job/PneumaticCraft-Repressurized should fix this. Can't test for sure myself, since I don't know which item triggered it. However, the new code is much more careful.

commented

Great, will try with the new version

commented

Fixed in 0.9.0 release (hopefully)