From dae873d07c9cba8be54c6c48b3da5e6116552a15 Mon Sep 17 00:00:00 2001 From: James Procter Date: Thu, 8 Jun 2023 11:33:35 +0100 Subject: [PATCH] =?utf8?q?JAL-4196=20report=20an=20error=20if=20structure=20?= =?utf8?q?view=20doesn=E2=80=99t=20get=20created=20(for=20whatever=20reason)?= =?utf8?q?=20during=20CLI=20arg=20processing,=20and=20wait=20around=20until=20?= =?utf8?q?the=20viewer=20has=20finished=20importing=20before=20doing=20anyth?= =?utf8?q?ing?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/jalview/bin/Commands.java | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/jalview/bin/Commands.java b/src/jalview/bin/Commands.java index bcf231e..7f493e0 100644 --- a/src/jalview/bin/Commands.java +++ b/src/jalview/bin/Commands.java @@ -569,9 +569,20 @@ public class Commands structureFilepath, tft, paeFilepath, false, ssFromStructure, false, viewerType); - if (headless) + if (sv==null) + { + Console.error("Failed to import and open structure view."); + continue; + } + while (sv.isBusy()) { - sv.setAsync(false); + try { + Thread.sleep(25); + } + catch (Exception x) + { + + } } String structureImageFilename = ArgParser.getValueFromSubValOrArg( -- 1.7.10.2