Blue Power

Blue Power

4M Downloads

NPE Crash on world load with Mine & Blade: Battlegear 2

SethWilliamson opened this issue ยท 4 comments

commented

Test Environment:
forge-1.7.10-10.13.2.1291
liteloader-1.7.10-04
BluePower-1.7.10-0.2.927-universal.jar
QmunityLib-1.7.10-0.1.107-universal.jar
1.7.10-MB_Battlegear2-Bullseye-1.0.7.0.jar

Reverting to BluePower-1.7.10-0.2.918-universal.jar works fine.

java.lang.NullPointerException: Unexpected error
    at com.bluepowermod.client.render.RenderDebugScreen.onRenderDebugScreen(RenderDebugScreen.java:22)
    at cpw.mods.fml.common.eventhandler.ASMEventHandler_57_RenderDebugScreen_onRenderDebugScreen_RenderGameOverlayEvent.invoke(.dynamic)
    at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:54)
    at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:138)
    at mods.battlegear2.client.gui.BattlegearInGameGUI.renderGameOverlay(BattlegearInGameGUI.java:53)
    at mods.battlegear2.client.BattlegearClientEvents.postRenderOverlay(BattlegearClientEvents.java:110)
    at cpw.mods.fml.common.eventhandler.ASMEventHandler_30_BattlegearClientEvents_postRenderOverlay_Post.invoke(.dynamic)
    at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:54)
    at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:138)
    at net.minecraftforge.client.GuiIngameForge.post(GuiIngameForge.java:899)
    at net.minecraftforge.client.GuiIngameForge.renderHotbar(GuiIngameForge.java:212)
    at net.minecraftforge.client.GuiIngameForge.func_73830_a(GuiIngameForge.java:141)
    at net.minecraft.client.renderer.EntityRenderer.func_78480_b(EntityRenderer.java:1038)
    at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:990)
    at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:887)
    at net.minecraft.client.main.Main.main(SourceFile:148)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

Complete log: http://slexy.org/raw/s21CU31tds (expires 2015-10-21)

Edit: Cross-posted issue to Mine-and-blade-admin/Battlegear2#180 based on your comments.

commented

Looks like Battlegear is trying to call the render overlay event (the one we use to render text into the F3/debug screen) without specifying what it wants to render... It's most surely going to cause issues with many other mods, but a fix for it (on our side) is already on its way! :)

commented

Fixed on our side but we still recommend a change on Battlegear's side :)

commented

Battlegear post child events of RenderGameOverlayEvent (which constructor only allows null as element type), since all others are used by vanilla.
Your listener probably should be setup for RenderGameOverlayEvent.Pre, or maybe RenderGameOverlayEvent.Text in your use-case. It is doing twice as much work per overlay cycle by listening to the generic parent.
Sorry for the trouble.

commented

Oh, okay. I didn't know there were sub-events for RenderGameOverlayEvent. We'll probably switch over to using RenderGameOverlayEvent.Text then.
Thanks for your time :)