I have a menu app state and this is the initialize code:
[java]@Override
public void initialize(AppStateManager stateManager, Application app) {
super.initialize(stateManager, app);
this.app = (GameMain)app;
screen = new Screen(this.app, “tonegod/gui/style/atlasdef/style_map.xml”);
screen.setUseTextureAtlas(true, “tonegod/gui/style/atlasdef/atlas.png”);
this.app.getGuiNode().addControl(screen);
start = new ButtonAdapter(screen, new Vector2f(60 ,20) ) {
@Override
public void onButtonMouseLeftUp(MouseButtonEvent evt, boolean toggled) {
clickedStart();
}
};
screen.addElement(start);
}[/java]
The error occurs at:
[java]
this.app.getGuiNode().addControl(screen);[/java]
This is the error:
[java]run:
Mar 01, 2014 3:03:48 PM com.jme3.system.JmeDesktopSystem initialize
INFO: Running on jMonkeyEngine 3.x
Mar 01, 2014 3:03:48 PM com.jme3.system.Natives extractNativeLibs
INFO: Extraction Directory: C:\Users\Davis\Documents\JmonkeyEngine\Frost
Mar 01, 2014 3:03:52 PM com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFO: Lwjgl 2.9.0 context running on thread LWJGL Renderer Thread
Mar 01, 2014 3:03:52 PM com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFO: Adapter: aticfx64
Mar 01, 2014 3:03:52 PM com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFO: Driver Version: 8.17.10.1191
Mar 01, 2014 3:03:52 PM com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFO: Vendor: ATI Technologies Inc.
Mar 01, 2014 3:03:52 PM com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFO: OpenGL Version: 4.2.12217 Compatibility Profile Context 12.104.0.0
Mar 01, 2014 3:03:52 PM com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFO: Renderer: AMD Radeon HD 6520G
Mar 01, 2014 3:03:52 PM com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFO: GLSL Ver: 4.20
Mar 01, 2014 3:03:52 PM com.jme3.asset.AssetConfig loadText
WARNING: Cannot find loader com.jme3.scene.plugins.blender.BlenderModelLoader
Mar 01, 2014 3:03:52 PM com.jme3.audio.lwjgl.LwjglAudioRenderer initInThread
INFO: Audio Device: OpenAL Soft
Mar 01, 2014 3:03:52 PM com.jme3.audio.lwjgl.LwjglAudioRenderer initInThread
INFO: Audio Vendor: OpenAL Community
Mar 01, 2014 3:03:52 PM com.jme3.audio.lwjgl.LwjglAudioRenderer initInThread
INFO: Audio Renderer: OpenAL Soft
Mar 01, 2014 3:03:52 PM com.jme3.audio.lwjgl.LwjglAudioRenderer initInThread
INFO: Audio Version: 1.1 ALSOFT 1.15.1
Mar 01, 2014 3:03:52 PM com.jme3.audio.lwjgl.LwjglAudioRenderer initInThread
INFO: AudioRenderer supports 64 channels
Mar 01, 2014 3:03:52 PM com.jme3.audio.lwjgl.LwjglAudioRenderer initInThread
INFO: Audio effect extension version: 1.0
Mar 01, 2014 3:03:52 PM com.jme3.audio.lwjgl.LwjglAudioRenderer initInThread
INFO: Audio max auxilary sends: 4
Problem loading style map: java.lang.IllegalStateException: No loader registered for type “xml”
Mar 01, 2014 3:03:53 PM com.jme3.app.Application handleError
SEVERE: Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main]
java.lang.NullPointerException
at tonegod.gui.controls.util.ModalBackground.<init>(ModalBackground.java:26)
at tonegod.gui.core.Screen.initModalBackground(Screen.java:1790)
at tonegod.gui.core.Screen.setSpatial(Screen.java:1385)
at com.jme3.scene.Spatial.addControl(Spatial.java:602)
at frost.StateMenu.initialize(StateMenu.java:28)
at com.jme3.app.state.AppStateManager.initializePending(AppStateManager.java:251)
at com.jme3.app.state.AppStateManager.update(AppStateManager.java:281)
at com.jme3.app.SimpleApplication.update(SimpleApplication.java:239)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.runLoop(LwjglAbstractDisplay.java:151)
at com.jme3.system.lwjgl.LwjglDisplay.runLoop(LwjglDisplay.java:185)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:228)
at java.lang.Thread.run(Thread.java:744)
AL lib: (EE) alc_cleanup: 1 device not closed
BUILD SUCCESSFUL (total time: 15 seconds)[/java]
This wasnt happening before. II just came back to this project after a few weeks and updated to the latest nightly libraries.