How to shutdown standardgame?

Probably something very simple however I noticed when I close the window the process is still running.

This suddenly happened after the standardgame was made "final".

Ps a note on this kind of updates, I don't really understand the reasons for making this class final, but it was quite a pain to fix my code after this since I had subclassed

StanddardGame. So maybe a little caution in the future or give users alternatives, like subclassing "LegacyStandardGame" instead.

Not really a biggy but suddenly seeing all my code underlined with red made me work up a sweat :slight_smile:

EDIT: A quick fix, I just added a system.exit(0) to the cleanup routine. Probably not the right way but I'm in a hurry.

Well, I waited until after 1.0 release so people could always use 1.0 until they're ready to fix their code. :wink:

If you are extending StandardGame that likely means you're doing something wrong.

As far as the process, are you using JMEDesktop and perhaps Substance L&F?

I'm using substance. It wasn't really a problem but it can be shocking when everything is suddenly red :).

Anyway I was looking for methods like "addOglWindowListener" or something so you could add your own system.exit that way.

PS the update you made in JGN seems to work as the server has been running with no problems 3 days in a row now. :smiley: :wink:

There was a most made about releasing Substance thread that is created, but I've never been able to make it work correctly.  If you don't use Substance I bet it will terminate without any trouble.  The reason that non-StandardGame users never see this is because the method most of them use to terminate their game is with System.exit(0). :o