Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 30807

Summary: [Dialogs] Better dialog if OutOfMemory Exception is caught
Product: [Eclipse Project] Platform Reporter: Dirk Baeumer <dirk_baeumer>
Component: UIAssignee: Tod Creasey <Tod_Creasey>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P4 CC: john.arthorne, Mike_Wilson
Version: 2.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows 2000   
Whiteboard:
Attachments:
Description Flags
Simple test action to cause OutOfMemoryError none

Description Dirk Baeumer CLA 2003-02-03 06:40:10 EST
From PR 28688

This PR requests that Eclips automatically adjust its heap size. Since this is 
not possible a dialog telling the user to increase the heap size when a OME is 
caught would increase sevicablility.
Comment 1 Tod Creasey CLA 2003-10-10 10:47:13 EDT
We want to generally handle this better for 3.0, preferably with some sort of 
warning when the problem is imminent.
Comment 2 John Arthorne CLA 2003-10-10 11:09:26 EDT
Created attachment 6399 [details]
Simple test action to cause OutOfMemoryError

I've been playing with this action that brings the system to its knees. 
Overall things are handled pretty well in the UI thread at the moment... it
notifies the user that the system is out of memory, and recommends shutting
down.  As Dirk suggests, a small serviceability improvement would be to add
text to that dialog telling the user to increase the Java heap size.  That
would save some time for people who currently wade around in the docs looking
for a solution and then ask on the newsgroup.
Comment 3 John Arthorne CLA 2003-10-10 11:10:37 EDT
(originally I had it looping until the byte array was size one, but I often get
a VM crash with Sun VMs when I try this).
Comment 4 John Arthorne CLA 2003-10-14 17:34:52 EDT
bug 22026 is a dup of this one.
Comment 5 John Arthorne CLA 2003-10-14 17:40:40 EDT
Bug 33972 is also almost identical to this one... (just trying to help consolidate)
Comment 6 Tod Creasey CLA 2004-03-29 09:59:37 EST
Not on the 3.0 plan
Comment 7 Tod Creasey CLA 2004-03-29 10:07:37 EST
Reopening as it isn't clear what more can be done.

John is core going to provide anything more in the 3.0 timeframe? I think what 
might make the most sense is a help page on this with a link from the dialog.
Comment 8 John Arthorne CLA 2004-03-30 11:30:40 EST
All that's being requested in this bug is a better error message that suggests
to the user that they increase the Java heap size. Since the precise steps are
VM-dependent, it could say something like:

"An out of memory error occurred.  Consider increasing the memory available to
Eclipse. See the Eclipse readme file for more details."

There is already a custom message key for out of memory error,
FatalError_OutOfMemoryError in IDEWorkbenchMessages.

Indepedent of this, I am investigating reducing the number of background
operations when memory is running low (see bug 54510).
Comment 9 Tod Creasey CLA 2004-05-10 15:59:27 EDT
Changed the message to read:

An out of memory error has occurred. You can prevent these errors in the 
future by increasing your heap size before you start the workbench using the -
Xmx command line option.
Comment 10 Tod Creasey CLA 2005-05-10 14:55:50 EDT
Marking closed