Storage Drawers

Storage Drawers

151M Downloads

[1.8.9/1.9.4] java.lang.NullPointerException: Tesselating block in world

Xiaminou opened this issue ยท 10 comments

commented

Crash Report: http://pastebin.com/E3U1i2UJ

This only happens when I teleport back to my base.

commented
commented

I've checked in a fix for this in 1.8.9, it will go to 1.9 shortly.

I'm not exactly sure why there's no tile available when you teleport or whatever the exact trigger is. The fix is the drawer will render as a default model until the information is available, which I hope is on the next frame or tick.

commented

I'm not exactly sure why there's no tile available when you teleport or whatever the exact trigger is.

Here's the scoop:

In multiplayer, the blocks in a chunk and the TileEntities in that chunk are sent in separate packets with the blocks always going out first. The client may not always have the TileEntities at the same time it has the blocks (but if it has the TileEntities, it always has the Blocks too).

Pre-1.8, the two kinds of renderers were separated very cleanly. The static block renderer (ISBRH) usually never had to touch the block's TileEntity (with rare exceptions like EnderIO's capacitor banks), and the TESRs were only ever called after the client had received both Blocks and TileEntities from the server. Post-1.8, many renderers that were previously TESRs were changed to use block models, and the block model rendering is invoked at the time the client receives the blocks. As a result, all of the TESRs that were converted to model rendering would work fine in single-player, but occasionally get a NPE when accessing the TileEntity in multiplayer because the client recieves the blocks before the TileEntities.

commented

Thanks for the explanation. Between this and a few other render crashes reported lately, it looks like a lot more vigilance is required, both for tile and blockstate data.

commented

Should be fixed in 1.8.9 and 1.9.4. If still persisting, re-open with a new crash log. I can't easily test these kinds of bugs, just apply what I think is the right fix.

commented

I'm afraid I'm still getting it: http://pastebin.com/kc8aShGi

with optifine, don't if it would happen without as it's random.

commented

It's a different crash, one that's hinting at the existence of the TileEntity, but has not been properly initialized.

commented

It's also the same crash mentioned in #303