Game Crash on GUI open
Smtgr14 opened this issue ยท 8 comments
Issue:
The game crashed whilst rendering screen
Error: java.lang.NullPointerException: Rendering screen
Steps to Reproduce
- Load game
- Load a New or Existing World
- Place any RF Tools block w/ a GUI
- Right click the block
- Game will crash, server remains unaffected.
Error Reported & Crash Report
The game crashed whilst rendering screen
Error: java.lang.NullPointerException: Rendering screen
@mezz Another one...
We're aware of this problem but atm it is eluding us
@Smtgr14 what modpack is this?
I'm releasing a version of McJtyLib that protects against this and will log the error so that we can still try to track down the real problem. Probably a mod that does something wrong in a gui event or something
Probably a mod that does something wrong in a gui event or something
Technically I wouldn't say it's "wrong", as the InitGuiEvent.Pre
event is designed to be cancelled. Perhaps we need some clarification as to what Forge expects to happen after that event is cancelled? Essentially functions shouldn't be blindly expecting something set in initGui to be non-null I guess?
For reference:
/**
* This event fires just after initializing {@link GuiScreen#mc}, {@link GuiScreen#fontRendererObj},
* {@link GuiScreen#width}, and {@link GuiScreen#height}.<br/><br/>
*
* If canceled the following lines are skipped in {@link GuiScreen#setWorldAndResolution(Minecraft, int, int)}:<br/>
* {@code this.buttonList.clear();}<br/>
* {@code this.initGui();}<br/>
*/
It is indeed odd though that someone would cancel this event and not the open gui one. EDIT: I guess they're not checking it's their GUI being inited
I've started removing mods and found it's forestry's beta I left installed by mistake.
The updated McJtyLib does fix the issue.
Heh, I was also getting some NPEs in RS for fields that are initialized in initGui
. Why in the world would that event be cancel-able?! initGui
is the place where you initialize things...