Fluidlogged API

Fluidlogged API

356k Downloads

occasional 'java lang nullpointerexception' printed in chat

xemnes opened this issue ยท 12 comments

commented

so was flying about and suddenly i was met with two 'java lang nullpointerexception' messages in chat, there was nothing to indicate what caused it in the console so spent the last 2 hours removing mods to find the culprit as i had updated quite a few mods at the same time as fluidlogged. the issue was replicatable as it always happened in the same group of chunks, which happens to contain my test area where im finding out which blocks need to be whitelisted.

im guessing its leftover debug from something?

commented

I was also able to get it to crash by following your suggestions, thanks. This was the stack trace, for the record (using 1.8 from CurseForge):

Description: Batching chunks

java.lang.NullPointerException: Batching chunks
	at git.jbredwards.fluidlogged_api.api.util.FluidloggedUtils.canFluidFlow(FluidloggedUtils.java:200)
	at git.jbredwards.fluidlogged_api.mod.asm.plugins.ASMHooks.getFluidHeightForRender(ASMHooks.java:257)
	at git.jbredwards.fluidlogged_api.mod.asm.plugins.ASMHooks.getFluidExtendedState(ASMHooks.java:176)
	at net.minecraft.block.BlockLiquid.getExtendedState(BlockLiquid.java)
	at git.jbredwards.fluidlogged_api.mod.asm.plugins.ASMHooks.renderChunk(ASMHooks.java:1326)
	at net.minecraft.client.renderer.chunk.RenderChunk.func_178581_b(RenderChunk.java:186)
	at net.minecraft.client.renderer.chunk.ChunkRenderWorker.func_178474_a(SourceFile:100)
	at net.minecraft.client.renderer.chunk.ChunkRenderWorker.run(SourceFile:43)
	at java.lang.Thread.run(Thread.java:750)

I then tried to open the crashing world in the dev version and it seemed to render without problems, so the underlying issue is probably already fixed.

commented

Thanks for your help @embeddedt! The crash is identical to #93, marking this as upcoming fix

commented

oh wow nice, glad we were able to figure out the problem in the end!

commented

can you send your log?
edit: the codechickenlib mod has a feature where rendering errors get put into the chat rather than crashing the game, may be caused by the same source as #93.

commented

could be? though i remember getting errors from codechickenlib in the past and im fairly certain it prefixes its messages with 'CCL'.
it is literally just 'java lang nullpointerexception' and nothing else thats put into the chat which makes it very ambiguous for a message lol
latest.log

commented

I cannot seem to reproduce that with just Fluidlogged API, Waila, and Immersive Engineering installed.

2022-05-25_14 15 32

2022-05-25_14 16 23

commented

Does it happen to you with only those two mods in use, without any others installed? I could attempt to make a mod that prints a traceback of every chat message but it may be overkill.

commented

huh, thats odd... again with very little debug info to go on, its extremely hard to figure out whats causing it. it does seem that its not rendering properly aswell

commented

i will have to check
edit: yes it does, but this time, i crash. though only in certain rotations, try placing it in a different rotation.
edit2: if i add in optifine, the game doesnt crash and instead prints the error in chat. same problem as before in the first edit, only happens at certain rotations

commented

ok after many hours of attempting to find the culprit to this problem, i found it
fluidlogging immersive engineering stairs is what causes the chat spam. but only if its placed in a source next to flowing water.
heres a video: https://gfycat.com/partialrevolvingbrownbutterfly

happens with all the stair blocks, not just the scafholding ones, so treated wood causes it too.
its only the stairs, the slabs and structural arms do not cause it.

commented

fixed in v1.8.1