Start StandardGame a second time


I have a JFrame for my settings etc. From there I start a StandardGame. After calling shutdown() everything looks fine, and my JFrame is there and operable. However if I try to start again, I get an error:

01.04.2007 17:49:48 uncaughtException
SCHWERWIEGEND: Main game loop broken by uncaught exception
java.lang.IllegalStateException: Provider may only be changed before input is created!
        at com.jme.input.joystick.JoystickInput.setProvider(Unknown Source)
        at Source)
        at Source)

(I don't do anything with joysticks)

The funny thing is that I create everything from scratch: StandardGame, GameStates... 

Is there something that is not "cleaned up" in shutdown() :?

I've been tracking down a similar issue.  When I make a change and compile then run I usually get an error with the sound libraries… then I just run it again and everything works just fine (usually).

I'm not using a JFrame tho… I am using StandardGame and the GameTaskQueueManager.

Right now, for me, it's annoying, but as long as I can continue to get things working I just run it twice.

Okay, try updating from CVS and shutdown() should now destroy the joystick input as well.

By default StandardGame initializes joystick input.

For the sound support see if SoundSystem.stopAllSamples() resolves it…if so I can add that to the shutdown as well.


  that fixed the issue with the sound exceptions.



Okay, that's already integrated in my local build, it will get pushed out with my next commit to CVS.