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 (from parent 1:
6b42903
)
trap out of memory errors specifically associated with Jmol view creation (needs...
author
jprocter
<Jim Procter>
Wed, 22 Sep 2010 00:58:32 +0000
(
00:58
+0000)
committer
jprocter
<Jim Procter>
Wed, 22 Sep 2010 00:58:32 +0000
(
00:58
+0000)
src/jalview/gui/Jalview2XML.java
patch
|
blob
|
history
diff --git
a/src/jalview/gui/Jalview2XML.java
b/src/jalview/gui/Jalview2XML.java
index
f0edf7a
..
e1510de
100755
(executable)
--- a/
src/jalview/gui/Jalview2XML.java
+++ b/
src/jalview/gui/Jalview2XML.java
@@
-2696,15
+2696,28
@@
public class Jalview2XML
{
public void run()
{
{
public void run()
{
- new AppJmol(pdbf, id, sq, alf.alignPanel, fileloc,
+ AppJmol sview=null;
+ try {
+ sview=new AppJmol(pdbf, id, sq, alf.alignPanel, fileloc,
+
rect, vid);
rect, vid);
+ }
+ catch (OutOfMemoryError ex)
+ {
+ new OOMWarning("restoring structure view for PDB id "+id,(OutOfMemoryError) ex.getCause());
+ if (sview!=null && sview.isVisible())
+ {
+ sview.closeViewer();
+ sview.setVisible(false);
+ sview.dispose();
+ }
+ }
}
});
} catch (InvocationTargetException ex)
{
}
});
} catch (InvocationTargetException ex)
{
- System.err
- .println("Unexpected error when opening Jmol view.");
- ex.printStackTrace();
+ warn("Unexpected error when opening Jmol view.",ex);
+
} catch (InterruptedException e)
{
// e.printStackTrace();
} catch (InterruptedException e)
{
// e.printStackTrace();