safer OOM handling when importing from XML
authorjprocter <Jim Procter>
Tue, 13 Oct 2009 15:10:05 +0000 (15:10 +0000)
committerjprocter <Jim Procter>
Tue, 13 Oct 2009 15:10:05 +0000 (15:10 +0000)
src/jalview/gui/Jalview2XML.java

index 8497df7..f9a2fa9 100755 (executable)
@@ -1603,8 +1603,10 @@ public class Jalview2XML
               + ex + "\n");
     } catch (OutOfMemoryError e)
     {
-      new jalview.gui.OOMWarning("loading jalview XML file", e,
-              Desktop.instance);
+      // Don't use the OOM Window here
+      errorMessage = "Out of memory loading jalview XML file";
+      System.err.println("Out of memory whilst loading jalview XML file");
+      e.printStackTrace();
     }
 
     if (Desktop.instance != null)