This is in response to recent disposal issues (mainly #1266) and the idea of including System.exit to be sure to not leaving ghost processes around (#1292)
I'm reluctant to just dive in with plain System.exit to avoid dead processes when we don't have a more solid way to catch disposal issues. We're in much better shape now than a couple weeks ago, but might still have some issues floating around with more that could pop up later and hide behind a System.exit
I'd like to make sure we catch all (few) entry and exit points and make them work consistently. For instance the recent activity with the PC facade hasn't been tested with the Applet facade to my knowledge (and the AWT facade which @mkienenb was close to fixing). Probably the browser is hard-killing the applet, but anyway.
To go with this I think we should document entry and exit points as an engine feature with its own forum thread and wiki page. Along with what the few exit codes indicate. Maybe we can somehow log the state of disposal immediately before System.exit (new utility method?) so if there is still something left we have a chance to find out. Keeping in mind the game may be unstable (out of memory, etc). Maybe there are other good metrics we can write on shutdown?
Not in a big rush to get this done (thus target beta or sooner) as there are several things I'd like to wait on / take into account:
Just to make a note of it - a few disposal issues have been sneaking back in slowly. I don't have a lot of details I just notice occasionally when crashing the game during testing.
@msteiger also mentioned an invalid port scenario over in #1622