X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fbin%2FCommands.java;h=d7d1ea34fa42e9ad2d238a32c5650ad9ac2c3d9f;hb=a7169b1c72607f3c9357195b4999869650a2a891;hp=d83afed97e9a54d68b8679009e2f1b979a30c751;hpb=59e9fd112bcb8cb4c5cfd344562e7edfc3ea8359;p=jalview.git diff --git a/src/jalview/bin/Commands.java b/src/jalview/bin/Commands.java index d83afed..d7d1ea3 100644 --- a/src/jalview/bin/Commands.java +++ b/src/jalview/bin/Commands.java @@ -576,15 +576,21 @@ public class Commands } try { - while (sv.isBusy()) + long tries=1000; + while (sv.isBusy() && tries>0) { Thread.sleep(25); if (sv.isBusy()) { + tries--; Console.debug( "Waiting for viewer for " + structureFilepath); } } + if (tries==0 && sv.isBusy()) + { + Console.warn("Gave up waiting for structure viewer to load. Something may have gone wrong."); + } } catch (Exception x) { Console.warn("Exception whilst waiting for structure viewer "+structureFilepath,x);