Better Foliage

Better Foliage

35M Downloads

[1.7.2][BF0.9.5b] NPE on world load.

MrGraphic opened this issue ยท 7 comments

commented

Unfortunelly this thing still happens:
java.lang.NullPointerException: Unexpected error
at mods.betterfoliage.client.render.impl.RenderBlockBetterLeaves.renderWorldBlock(RenderBlockBetterLeaves.java:47)
at cpw.mods.fml.client.registry.RenderingRegistry.renderWorldBlock(RenderingRegistry.java:118)
at net.minecraft.src.FMLRenderAccessLibrary.renderWorldBlock(FMLRenderAccessLibrary.java:53)
at net.minecraft.client.renderer.RenderBlocks.func_147805_b(RenderBlocks.java:293)
at net.minecraft.client.renderer.WorldRenderer.func_147892_a(WorldRenderer.java:181)
at net.minecraft.client.renderer.RenderGlobal.func_72716_a(RenderGlobal.java:1522)
at net.minecraft.client.renderer.EntityRenderer.func_78471_a(EntityRenderer.java:1178)
at net.minecraft.client.renderer.EntityRenderer.func_78480_b(EntityRenderer.java:1011)
at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:945)
at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:835)
at net.minecraft.client.main.Main.main(SourceFile:103)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:134)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

commented

Hmmm... I may have been hasty about this, but I think I know what's wrong now.

The workaround in #1 works though, right? You are able to play?

commented

I made a new version to sniff out this issue. It will log a warning if this happens, and not continue with rendering. You can find it here: https://github.com/octarine-noise/BetterFoliage/releases/tag/untagged-9ca76f0bc4c35fbcc685

Could you please give it a try? It would help a lot in tracking this down. I'm interested in lines with the text "null leaf texture" in your logs.

commented

I was able before, NPE happens randomly. Sometimes like three times in a row sometimes no issue for like 10+ launches. I have no idea what may cause this and due to random nature it is not possible to check what mod may cause this.

commented

Yes of course. I will post results on first NPE.

commented

There probably won't be an NPE, it just won't draw the leaves. Just keep your eyes open for missing leaves, and search your logs after each play session. It will pop up sooner or later.

Thanks!

commented

There we go:
...
[Client thread/WARN] [BetterFoliage]: null leaf texture, x:580, y:66, z:-119, meta:8, block:forestry.arboriculture.gadgets.BlockLeaves
[Client thread/WARN] [BetterFoliage]: null leaf texture, x:580, y:66, z:-118, meta:8, block:forestry.arboriculture.gadgets.BlockLeaves
[Client thread/WARN] [BetterFoliage]: null leaf texture, x:576, y:66, z:-117, meta:0, block:forestry.arboriculture.gadgets.BlockLeaves
[Client thread/WARN] [BetterFoliage]: null leaf texture, x:577, y:66, z:-117, meta:0, block:forestry.arboriculture.gadgets.BlockLeaves
[Client thread/WARN] [BetterFoliage]: null leaf texture, x:578, y:66, z:-117, meta:0, block:forestry.arboriculture.gadgets.BlockLeaves
[Client thread/WARN] [BetterFoliage]: null leaf texture, x:579, y:66, z:-117, meta:8, block:forestry.arboriculture.gadgets.BlockLeaves
...

commented

As far as I can tell, Forestry leaves shouldn't give back null for texture, unless the TileEntity is wrong somehow. I can't do much about it, so I'll leave it as it is for now.

The extra leaves won't render if this happens, in fact even the underlying block should render corrupted in this case. It should be rare anyway. We'll see if this persists with later Forestry versions.