From 429b0535b596adafd66fee74d736825f9cf62019 Mon Sep 17 00:00:00 2001 From: Michael Lass Date: Fri, 6 Oct 2017 21:33:06 +0200 Subject: [PATCH] Open statistics dialog from correct thread The dialog to ask for collecting anonymous statistics needs to be created in the Swing EDT. Do so using SwingUtilities.invokeLater(). This is a follow-up on 7ef2b3a and should finally fix #2955. --- src/main/java/org/jabref/gui/JabRefFrame.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/jabref/gui/JabRefFrame.java b/src/main/java/org/jabref/gui/JabRefFrame.java index 6f27b48b28f0..0ed92f0ca894 100644 --- a/src/main/java/org/jabref/gui/JabRefFrame.java +++ b/src/main/java/org/jabref/gui/JabRefFrame.java @@ -664,7 +664,12 @@ private void initShowTrackingNotification() { @Override public void run() { - DefaultTaskExecutor.runInJavaFXThread(JabRefFrame.this::showTrackingNotification); + SwingUtilities.invokeLater(new Runnable() { + @Override + public void run() { + DefaultTaskExecutor.runInJavaFXThread(JabRefFrame.this::showTrackingNotification); + } + }); } }, 60000); // run in one minute }