Tesla Core Lib

Tesla Core Lib

61M Downloads

Crash caused by emptying fluid containers

brisingraerowing opened this issue ยท 11 comments

commented

No crash log (It was a hang)

Here is the error (from Game Output):

[20:45:04] [Server thread/ERROR]: Encountered an unexpected exception
net.minecraft.util.ReportedException: Ticking block entity
	at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:771) ~[MinecraftServer.class:?]
	at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:666) ~[MinecraftServer.class:?]
	at net.minecraft.server.integrated.IntegratedServer.func_71217_p(IntegratedServer.java:185) ~[chd.class:?]
	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:524) [MinecraftServer.class:?]
	at java.lang.Thread.run(Unknown Source) [?:1.8.0_151]
Caused by: kotlin.KotlinNullPointerException
	at net.ndrei.teslacorelib.utils.FluidUtils.fillFluidFrom(FluidUtils.kt:60) ~[FluidUtils.class:?]
	at net.ndrei.teslacorelib.utils.FluidextensionsKt.fillFrom(fluidextensions.kt:16) ~[FluidextensionsKt.class:?]
	at net.ndrei.teslacorelib.utils.FluidextensionsKt.fillFrom(fluidextensions.kt:22) ~[FluidextensionsKt.class:?]
	at net.ndrei.teslacorelib.utils.FluidextensionsKt.processInputInventory(fluidextensions.kt:27) ~[FluidextensionsKt.class:?]
	at net.ndrei.teslacorelib.tileentities.SidedTileEntity.processFluidItems(SidedTileEntity.kt:541) ~[SidedTileEntity.class:?]
	at net.ndrei.teslacorelib.tileentities.SidedTileEntity.processImmediateInventories(SidedTileEntity.kt:211) ~[SidedTileEntity.class:?]
	at net.ndrei.teslacorelib.tileentities.SidedTileEntity.func_73660_a(SidedTileEntity.kt:988) ~[SidedTileEntity.class:?]
	at net.minecraft.world.World.func_72939_s(World.java:1829) ~[amu.class:?]
	at net.minecraft.world.WorldServer.func_72939_s(WorldServer.java:612) ~[oo.class:?]
	at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:765) ~[MinecraftServer.class:?]
commented

can't figure this one out... do you happen to have any more info?...

was it a one time thing?... happened more time since reported?

what exactly were/are you doing when this happens?

commented

I haven't tried this since this crash (I actually forgot about this issue). IIRC, I had put a Pressure Pipes fluid canister into an Industrial Foregoing Black Hole tank, and the 'crash' happened when the canister fluid level dipped below 1 bucket (I think it was around 720 mb).

This line is the one that crashed, and I think that the pressure pipes canister is a bit buggy, as it seems that the contents were null on that line (but not on the one before).

commented

Found your bug:

handler.drain(FluidStack(result.contents!!, filled), true)
tank.fill(FluidStack(result.contents!!, filled), true)

In the first line you drain the stack and it the second line you ask it again for its content---being surprised that it is empty. (result.contents is a method call on a live object...)

commented

ah... so I assumed that people would return a clone and not a live object here:

val result = handler.tankProperties.firstOrNull { this.canFillFrom(tank, it) }

that's stupid tho... people should always return clones.... but... I see your point... I will try to find time to fix this.

commented

Same crash for me. I tried to place a xp bucket in the black hole tank of industrial foregoing and it crashed my server.
Crash report:
crash-2019-04-01_21.23.24-server.txt

commented

same error.
info copied from discord for issue tracking purposes.

i did just crash to desktop with teslacorelib mentioned as culprit in the log.

what i actually did:
I inserted a bottle of water (item info says vanilla item) into a potion brewer from industrial foregoing into the fluid container slot. don't know why it says the coremod burped and not the Industrial Foregoing mod.
Please note that binnie coremod is also present and might interfere as it also has Water bottles n stuff (F3+H says its still vanilla item, tho)
Looks like this created a persistent problem as i get thrown out of the server immediately with exactly the same error.
Pack is DW20 1.12: V2.1.0 playing on a server

Full Crash-report:
https://pastebin.com/EH9P7D44

ps: i did not try to replicate it as i needed an admin to worldedit that block away to log in again.

commented

I just noticed that EnderCore makes Vanilla water bottles a fluid handler, and the above two reporters both have it. That may be part of the issue here.

commented

I got a very similar crash like @Ciannicay whilst doing the exact same things (insert a bottle of water into an IF brewer)
https://paste.dimdev.org/oquloroyil.mccrash

commented

After looking into @brisingraerowing 's comment, I have disabled the option fluidContainerBottles in EnderCore. I can't insert water bottles into the machine anymore, which I guess is intended behavior. At least it doesn't crash ๐Ÿ‘

commented

Any update regarding releasing this fix? Thank you!

commented

Thanks for fixing this issue! Mind uploading that version to Curse Forge?