git://source.jalview.org
/
jalview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8560832
)
JAL-4222 bail if we wait too long for Jmol to save an image
patch/JAL-4222_100s_timeout_on_imagexport
author
James Procter
<j.procter@dundee.ac.uk>
Wed, 15 Nov 2023 15:02:43 +0000
(15:02 +0000)
committer
James Procter
<j.procter@dundee.ac.uk>
Wed, 15 Nov 2023 15:02:43 +0000
(15:02 +0000)
src/jalview/gui/AppJmol.java
patch
|
blob
|
history
diff --git
a/src/jalview/gui/AppJmol.java
b/src/jalview/gui/AppJmol.java
index
ba4eb9c
..
0aa4878
100644
(file)
--- a/
src/jalview/gui/AppJmol.java
+++ b/
src/jalview/gui/AppJmol.java
@@
-503,10
+503,17
@@
public class AppJmol extends StructureViewerBase
}
});
runner.start();
+ long time = 0;
do
{
Thread.sleep(25);
- } while (runner.isAlive());
+ } while (runner.isAlive() && time++ < 4000);
+ if (time >= 4000)
+ {
+ runner.interrupt();
+ throw new ImageOutputException(
+ "Jmol took too long to export. Waited for 100 seconds.");
+ }
} catch (Throwable e)
{
throw new ImageOutputException(