Bug 2611 - OutOfMemory Error exits workbench with no error messages (1GH1MJM)
Summary: OutOfMemory Error exits workbench with no error messages (1GH1MJM)
Status: RESOLVED DUPLICATE of bug 2051
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: All All
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: Kevin Haaland CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-10-10 22:39 EDT by Kevin Haaland CLA
Modified: 2001-12-19 16:16 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Haaland CLA 2001-10-10 22:39:52 EDT
With XML Editor in Eclipse workbench, opening a 13 megabyte file, with 250000 nodes, caused an 
OutOfMemory Error, which was not only not handled by workbench, there was not even an 
error message or anything printed to log. We will be looking to improve our 
XML Editor in this regard, but I thought the workbench could be a bit more bullet proof.


NOTES: 

This was with the default maximum heap size. Setting the maximum heap size up to 
400 Meg allowed the editor to open.

JM (7/25/2001 11:40:51 AM)
	Platform does not have an XML editor.  Unclear who should be catching/handling any
	OutOfMemoryErrors. 

DMW (7/26/2001 6:18:19 PM)
	My concern is the the platform crashes without any error messages when an OutOfMemory
	Error occurs. While I know not much can be done to recover from out of memory, it seems 
	at least there could be a message given or left in log, or something. Perhaps the 
	executable that launches workbench could do something? Ideally, the plugin causing 
	the problem could be "stopped" and removed from memory, so other plugins would not
   	lose data.

JohnA (10/3/2001 3:10:09 PM)
	All the core event loop can do is print the exception to the console, which is what it does.
	Since eclipse doesn't have a console by default, users typically don't see this.  If we
	want to do any more logging, it will have to be done in the Workbench event loop.
	It's probably possible to write to the log after an OutOfMemoryError, since the stack
	frame that consumed the memory is probably gone.  Workbench#runEventLoop
	could consider doing this:

	...
	} catch (VirtualMachineError e) {
		//we're going down anyway, might as well try to log it
		String msg = e.getMessage() == null ? e.toString() : e.getMessage();
		WorkbenchPlugin.log(WorkbenchMessages.getString("Unhandled_exception"), new Status(IStatus.ERROR, IWorkbenchConstants.PLUGIN_ID, 0, msg, e)); //$NON-NLS-1$
		throw e;
	}
	...

	Moving to ITPUI for consideration.
Comment 1 Kevin Haaland CLA 2001-12-19 16:16:23 EST

*** This bug has been marked as a duplicate of 2051 ***