From deb7e7788d802d45cc6b2f8a5a04285308f1e8ee Mon Sep 17 00:00:00 2001 From: James Procter Date: Tue, 12 Dec 2023 15:48:32 +0000 Subject: [PATCH] JAL-4217 close internal frame on the swing thread to avoid deadlock --- src/jalview/gui/SplashScreen.java | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/jalview/gui/SplashScreen.java b/src/jalview/gui/SplashScreen.java index 1060d8a..465bc0d 100755 --- a/src/jalview/gui/SplashScreen.java +++ b/src/jalview/gui/SplashScreen.java @@ -36,6 +36,7 @@ import javax.swing.JLabel; import javax.swing.JLayeredPane; import javax.swing.JPanel; import javax.swing.JTextPane; +import javax.swing.SwingUtilities; import javax.swing.event.HyperlinkEvent; import javax.swing.event.HyperlinkListener; @@ -341,8 +342,20 @@ public class SplashScreen extends JPanel } try { - - iframe.setClosed(true); // ##### implicated BLOCKED + final JInternalFrame frme = iframe; + SwingUtilities.invokeLater(new Runnable() + { + @Override + public void run() + { + try + { + frme.setClosed(true); + } catch (Exception ex) + { + } + } + }); } catch (Exception ex) { } -- 1.7.10.2