safer OOM handling when importing from XML
[jalview.git] / 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)