Bug? SimpleHeadlessApp fails looking for Mouse

I suspect it's a bug, haven't turned up any earlier reports. I will add it to the tracker if someone more experiecend confirms it.

Take TestSphere. Have it extend SimpleHeadlessApp rather than SimpleGame.

java.lang.IllegalStateException: Mouse must be created before you can read events
        at org.lwjgl.input.Mouse.next(Mouse.java:362)
        at com.jme.input.lwjgl.LWJGLMouseInput.update(Unknown Source)
        at com.jme.input.InputSystem.update(Unknown Source)
        at com.jme.app.BaseHeadlessApp.start(Unknown Source)
        at nettest.TestSphere.main(TestSphere.java:65)

this is on the most recent cvs as of the time of this writing.

Well, that could be considered a bug, but it depends on how you want to use a headless application, I think.

When you do

MouseInput.setProvider( InputSystem.INPUT_SYSTEM_AWT );
KeyInput.setProvider( InputSystem.INPUT_SYSTEM_AWT );

before start() it works...
So maybe the 'bug' is that there are no dummy key and mouse input classes and they are thus not used by SimpleHeadlessApp?

Ah, I see. That works.  I just found out that running SimpleGame headless can be a bad idea - it takes over the CPU. A fixed rate game will be the way to go.


Yeah, Simple*** anything is only there to make your life easy when putting together demos or quickly prototyping an idea.