fix: not on FX thread. Mentioned in #673.

This commit is contained in:
huanghongxun
2020-02-16 22:54:59 +08:00
parent 97a5d7e71a
commit 030d54bc5c

View File

@@ -121,15 +121,16 @@ public class CrashReporter implements Thread.UncaughtExceptionHandler {
" JVM Free Memory: " + Runtime.getRuntime().freeMemory() + "\n"; " JVM Free Memory: " + Runtime.getRuntime().freeMemory() + "\n";
LOG.log(Level.SEVERE, text); LOG.log(Level.SEVERE, text);
Platform.runLater(() -> {
if (checkThrowable(e)) { if (checkThrowable(e)) {
if (showCrashWindow) { if (showCrashWindow) {
Platform.runLater(() -> new CrashWindow(text).show()); new CrashWindow(text).show();
}
if (!UpdateChecker.isOutdated() && IntegrityChecker.isSelfVerified()) {
reportToServer(text);
}
} }
if (!UpdateChecker.isOutdated() && IntegrityChecker.isSelfVerified()) { });
reportToServer(text);
}
}
} catch (Throwable handlingException) { } catch (Throwable handlingException) {
LOG.log(Level.SEVERE, "Unable to handle uncaught exception", handlingException); LOG.log(Level.SEVERE, "Unable to handle uncaught exception", handlingException);
} }