Revert "Remove System#exit call from BitsquareApp#stop"

This reverts commit 78d3da0c4e17ce356905c3b745d9773eb458988e.

Because while eliminating the call to System#exit does mean that
JavaFX's LauncherImpl can properly report errors and stack traces, it
also means that Bitsquare never shuts down (probably due to non-daemon
threads). When System#exit is removed (or replaced with Platform#exit),
closing the Bitsquare window (or clicking Exit from the system tray menu)
results in the application no longer being able to function at the UI
level (because the JavaFX toolkit has essentially been shut down), but
the process does not exit either.

So in the meantime, this change is being reverted, and we just have to
deal with not getting stack traces at the command line when uncaught
exceptions bubble up through the #start method (specifically, exceptions
that occur before the UncaughtExceptionHandler has had a chance to be
set).

A solution to this could be to provide a custom subclass of JavaFX's own
Application class that implements a template #start / #doStart methods
trying and catching anything that is raised from #doStart and printing
the stack trace on its own.
This commit is contained in:
Chris Beams 2014-11-25 13:23:10 +01:00
parent 9041ff3d82
commit 98505246b1
No known key found for this signature in database
GPG Key ID: 3D214F8F5BC5ED73

View File

@ -148,6 +148,7 @@ public class BitsquareApp extends Application {
@Override
public void stop() {
bitsquareAppModule.close(injector);
System.exit(0);
}