tlf30
October 5, 2014, 8:33pm
1
Hello,
My headless server just imploded when I tried to attach a null node. The issue was not the null pointer that it threw, but the ‘Error In Application’ dialog that attempted to open. Is there a way to disable it?
Here is how I create the headless server:
[java]AppSettings appsettings = new AppSettings(true);
appsettings.setFrameRate(128);
appsettings.setRenderer(null);
appsettings.setAudioRenderer(null);
appsettings.setUseInput(false);
appsettings.setDepthBits(32);
DataHandler.physics.setShowSettings(false);
DataHandler.physics.setPauseOnLostFocus(false);
DataHandler.physics.setSettings(appsettings);
DataHandler.physics.start(JmeContext.Type.Headless);[/java]
normen
October 5, 2014, 8:48pm
2
Uhm… You simply shouldn’t attach null… That will crash the update loop no matter if you display an error panel or not…
tlf30
October 5, 2014, 8:53pm
3
I know, it was the server having a slight issue; but I can not have a ‘headless’ server trying to open dialogs.
normen
October 5, 2014, 9:23pm
4
Just override handleError
tlf30
October 5, 2014, 10:12pm
6
So if I do this do I need to tell jme3 anything?
[java]
@Override
public void handleError(String msg, Throwable err) {
DataHandler.logger.log(“EXCEPTION”, “PhysicsHandler”, msg);
System.out.println(msg);
}[/java]
normen
October 5, 2014, 10:35pm
7
No, jME will end the application in this case anyway.