AbrarSyed / SecretRoomsMod-forge

The official SecretRoomsMod repo
GNU Lesser General Public License v3.0
39 stars 34 forks source link

[1.12.2-5.3.0] NullPointerException: Batching Chunks #231

Closed CplPibald closed 6 years ago

CplPibald commented 6 years ago

Upgraded my dedicated server (custom modpack) to use v5.3.0. Now I get a client crash when I go near a chunk that has a SR wooden door and SR pressure plates.

java.lang.NullPointerException: Batching chunks
    at com.wynprice.secretroomsmod.base.interfaces.ISecretBlock.canRenderInLayer(ISecretBlock.java:251)
    at com.wynprice.secretroomsmod.base.BaseBlockDoor.canRenderInLayer(BaseBlockDoor.java:186)
    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:745)

Link to full crash report.

Wyn-Price commented 6 years ago

Does this fix it? (You'll only need to update clientside)

Wyn-Price commented 6 years ago

Are you able to test?

CplPibald commented 6 years ago

I think that fixed it. No crash in the chunks in question with the 5.3.1 jar.

BTW I did have to update both client and server because of the version bump.

Wyn-Price commented 6 years ago

is the crash report the same?

CplPibald commented 6 years ago

The client did not crash with the 5.3.1 jar. I think you solved it. Thanks.

Wyn-Price commented 6 years ago

Ah ok thats good. I misread your response

Wyn-Price commented 6 years ago

One thing i will say, is that issue would be caused by either:

  1. Chunk trying to render the block before the TileEntityData was sent to the client
  2. A corrupted SecretRoomsMod block

Hopfully it isnt the latter, but make sure to check

CplPibald commented 6 years ago

New error in 5.3.1 with same secret wooden door, this time when I walked up to it. This one looks like a compat issue with WAILA.

java.lang.NullPointerException: Unexpected error
    at com.wynprice.secretroomsmod.intergration.walia.SecretWaliaDataProvider.getWailaStack(SecretWaliaDataProvider.java:46)
    at mcp.mobius.waila.overlay.RayTracing.getIdentifierItems(RayTracing.java:115)
    at mcp.mobius.waila.overlay.RayTracing.getIdentifierStack(RayTracing.java:73)
    at mcp.mobius.waila.overlay.RayTracing.getTargetStack(RayTracing.java:57)
    at mcp.mobius.waila.overlay.WailaTickHandler.tickClient(WailaTickHandler.java:78)
    at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_95_WailaTickHandler_tickClient_ClientTickEvent.invoke(.dynamic)
    at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90)
    at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:179)
    at net.minecraftforge.fml.common.FMLCommonHandler.onPreClientTick(FMLCommonHandler.java:343)

Just before the crash I noticed that the top half of the door had the texture taken from the block underneath, but the bottom half of the door had the purple/black "no texture" texture. I had broken and re-placed that door using 5.3.1 about a half hour ago, then left the area and restarted the server.

Let me know if you want a full crash report.

Wyn-Price commented 6 years ago

Could you try with the latest version on cureseforge?

Also sorry for late reply, i didnt get any notifications

CplPibald commented 6 years ago

@Wyn-Price When I looked at the door the first time after server restart.

java.lang.NullPointerException: Unexpected error
    at com.wynprice.secretroomsmod.intergration.walia.SecretWaliaDataProvider.getWailaStack(SecretWaliaDataProvider.java:46)
    at mcp.mobius.waila.overlay.RayTracing.getIdentifierItems(RayTracing.java:115)
    at mcp.mobius.waila.overlay.RayTracing.getIdentifierStack(RayTracing.java:73)
    at mcp.mobius.waila.overlay.RayTracing.getTargetStack(RayTracing.java:57)
    at mcp.mobius.waila.overlay.WailaTickHandler.tickClient(WailaTickHandler.java:78)
    at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_94_WailaTickHandler_tickClient_ClientTickEvent.invoke(.dynamic)
    at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90)
    at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:179)

And again, the top half of the door had the correct texture (stone brick) while the bottom half was wrong (this time it was regular stone)

Wyn-Price commented 6 years ago

Regular stone where you didn't place it means somethings got corrupted. In the HWYLA addon, I'm blindly assuming that everythings ok, and not corrupted. Try replacing the door.

CplPibald commented 6 years ago

Broke and re-placed the door and no crash now. The only thing out of the ordinary is that when I first looked at it, the bottom half was stone texture, but it changed to stone brick when I got close enough to inspect with WAILA.

Thanks for your work on this!

Wyn-Price commented 6 years ago

It's fine! Glad this is sorted