}
catch (OutOfMemoryError er)
{
- er.printStackTrace();
- javax.swing.SwingUtilities.invokeLater(new Runnable()
- {
- public void run()
- {
- javax.swing.JOptionPane.showInternalMessageDialog(Desktop.desktop,
- "Out of memory copying region!!"
- +
- "\nSee help files for increasing Java Virtual Machine memory."
- , "Out of memory",
- javax.swing.JOptionPane.WARNING_MESSAGE);
- }
- });
-
+ new OOMWarning("copying region", er);
return;
}
}
catch (OutOfMemoryError er)
{
- er.printStackTrace();
- javax.swing.SwingUtilities.invokeLater(new Runnable()
- {
- public void run()
- {
- javax.swing.JOptionPane.showInternalMessageDialog(Desktop.desktop,
- "Out of memory pasting sequences!!"
- +
- "\nSee help files for increasing Java Virtual Machine memory."
- , "Out of memory",
- javax.swing.JOptionPane.WARNING_MESSAGE);
- }
- });
-
+ new OOMWarning("Out of memory pasting sequences!!", er);
return;
}
{
jalview.bin.Cache.log.error("Exception when finding crossreferences",e);
}
+ catch (OutOfMemoryError e) {
+ new OOMWarning("whilst fetching crossreferences", e);
+ }
catch (Error e)
{
jalview.bin.Cache.log.error("Error when finding crossreferences",e);
}
catch (OutOfMemoryError error)
{
- javax.swing.SwingUtilities.invokeLater(new Runnable()
- {
-
-
- public void run()
- {
- javax.swing.JOptionPane.showInternalMessageDialog(Desktop.desktop,
- "Out of memory calculating conservation!!"
- +
- "\nSee help files for increasing Java Virtual Machine memory."
- , "Out of memory",
- javax.swing.JOptionPane.WARNING_MESSAGE);
- }
- });
+ new OOMWarning("calculating conservation",error);
conservation = null;
quality = null;
- System.out.println("Conservation calculation: " + error);
- System.gc();
}
consensus = null;
hconsensus = null;
- javax.swing.SwingUtilities.invokeLater(new Runnable()
- {
- public void run()
- {
- javax.swing.JOptionPane.showInternalMessageDialog(Desktop.desktop,
- "Out of memory calculating consensus!!"
- +
- "\nSee help files for increasing Java Virtual Machine memory."
- , "Out of memory",
- javax.swing.JOptionPane.WARNING_MESSAGE);
- }
- });
-
- System.out.println("Consensus calculation: " + error);
- System.gc();
+ new OOMWarning("calculating consensus",error);
}
UPDATING_CONSENSUS = false;
updatingConsensus = false;
}
catch (OutOfMemoryError err)
{
+ // Be noisy here.
System.out.println("########################\n"
+ "OUT OF MEMORY " + file + "\n"
+ "########################");
-
- JOptionPane.showInternalMessageDialog(Desktop.desktop,
- "Out of Memory Creating Image!!"
- +
- "\nSee help files for increasing Java Virtual Machine memory."
- , "Out of memory",
- JOptionPane.WARNING_MESSAGE);
- System.out.println("Create IMAGE: " + err);
- System.gc();
-
+ new OOMWarning("Creating Image for "+file,err);
+ // System.out.println("Create IMAGE: " + err);
}
catch (Exception ex)
{
.getAbsolutePath());
initJmol("load "+pdbentry.getFile());
}
+ catch (OutOfMemoryError oomerror)
+ {
+ new OOMWarning("Retrieving PDB id "+pdbentry.getId()+" from MSD", oomerror);
+ }
catch (Exception ex)
{
ex.printStackTrace();
}
catch (OutOfMemoryError er)
{
- JOptionPane.showInternalMessageDialog(Desktop.desktop,
- "Out of memory calculating PCA!!"
- +
- "\nSee help files for increasing Java Virtual Machine memory."
- , "Out of memory",
- JOptionPane.WARNING_MESSAGE);
- System.out.println("PCAPanel: " + er);
- System.gc();
+ new OOMWarning("calculating PCA", er);
}
catch (OutOfMemoryError er)
{
System.gc();
- System.out.println(er + " making image, SeqCanvas");
- javax.swing.SwingUtilities.invokeLater(new Runnable()
- {
- public void run()
- {
- javax.swing.JOptionPane.showInternalMessageDialog(Desktop.
- desktop,
- "Out of memory creating alignment image!!"
- +
- "\nSee help files for increasing Java Virtual Machine memory."
- , "Out of memory",
- javax.swing.JOptionPane.WARNING_MESSAGE);
- }
- });
-
+ System.err.println("SeqCanvas OutOfMemory Redraw Error.\n"+er);
+ new OOMWarning("Creating alignment image for display",er);
+
return;
}
}
e.printStackTrace();
} catch (OutOfMemoryError e)
{
+ // resets dialog box - so we don't use OOMwarning here.
showErrorMessage("Out of Memory when retrieving "
+ textArea.getText()
+ " from "
+ " from " + database.getSelectedItem());
e.printStackTrace();
}
- guiWindow.setProgressBar(null, Thread.currentThread().hashCode());
if (aresult != null)
{
parseResult(aresult, null, null);
}
+ // only remove visual delay after we finished parsing.
+ guiWindow.setProgressBar(null, Thread.currentThread().hashCode());
resetDialog();
}
{\r
ex.printStackTrace();\r
}\r
+ catch (OutOfMemoryError err)\r
+ {\r
+ new OOMWarning("retrieving database references ("+queryString.toString()+")", err);\r
+ }\r
if (retrieved != null)\r
{\r
transferReferences(sdataset, dbSources[db], retrieved);\r
jobs[j].result = null; // may contain out of date result object\r
wsInfo.setStatus(jobs[j].jobnum,\r
WebserviceInfo.STATE_STOPPED_ERROR);\r
- JOptionPane\r
- .showInternalMessageDialog(\r
- Desktop.desktop,\r
- "Out of memory handling result for job !!"\r
- +\r
- "\nSee help files for increasing Java Virtual Machine memory.",\r
- "Out of memory", JOptionPane.WARNING_MESSAGE);\r
Cache.log.error("Out of memory when retrieving Job " + j + " id:" +\r
WsUrl + "/" + jobs[j].jobId, er);\r
+ new jalview.gui.OOMWarning("retrieving result for "+WebServiceName,er);\r
System.gc();\r
}\r
}\r