Community
Participate
Working Groups
Part of the effort to improve the out-of-box experience for Eclipse users. A lot of users on the newgroups and mailing lists have problems with OutOfMemory errors and the common recommendation is for them to increase the Java heap size via a command-line argument. We would like to be able to tell the user that a problem occurred and to perform this action. Unfortuanately this command-line arg is dependant on VM so we don't know the exact syntax. In the UI I believe that we catch OutOfMemory errors and present a dialog to the user. If we could add something like "An OutOfMemoryError occurred. Try increasing your Java heap size and restarting." to this message, then this would help the user. Some of the things which we should consider in coming up with the right message: - we ran out of memory - they are able to try the operation again - they may want to adjust their heap size - how to do this is dependant on their VM
McQ thinks we should punt the user (with warning dialog first) since an OutOfMemoryError can cause things to be in an unreliable state. Anything can happen after this, including loss of data. We'll investigate how to handle this better for 2.2.
The thing to keep in mind is that, if we are going to punt the user (and I *do* believe that's our only reasonable choice), then we need to ensure that they can do reasonable work in the default memory allocation, at least during the initial "kicking the tires" phase of trying Eclipse. Asking them to increase the memory allocation is reasonable once they are doing serious work. [out of box]
See the discussion in bug 42291 re polling Runtime.getRuntime().freeMemory(). Should do something like this for R3.0.
If something is done about this you should sweep to close duplicates. At least 12224, 22026, and 30807 look like duplicates. I think a message in the out of memory dialog suggesting that the user increase the java heap would go along way to helping new users cope with it.
*** Bug 45413 has been marked as a duplicate of this bug. ***
is https://bugs.eclipse.org/bugs/show_bug.cgi?id=23633 a duplicate?
*** Bug 47879 has been marked as a duplicate of this bug. ***
*** Bug 12224 has been marked as a duplicate of this bug. ***
*** Bug 22026 has been marked as a duplicate of this bug. ***
Bug 30807 provides us with a fix for this problem. Now, we get a meaningful and helpful message when people run out of memory. There are however, a few places in the UI code where an OutOfMemoryError can be caught and not dealt with properly. Note that an OutOf MemoryError can be caught as Throwable, Error, or VirtualMachineError. The following areas should be checked in detail before this bug is marked fixed: EventLoopProgressMonitor - runEventLoop ExternalEditor - openWithUserDefinedProgram (2x) FileDocumentProvider - SafeChange/run IDEExceptionHandler - openQuestionDialog (this one is okay) KeySequence - getInstance KeyStroke - getInstance ModalContext - ModalContextThread/run and runInCurrentThread PluginAction - createDelegate Window - runEventLoop Workbench - runEventLoop (this one is okay) WorkbenchAdvisor - eventLoopException
Running through the classes/methods I listed in the previous comment will not be complete for M9.
Some of the above references are fine. The following are the only ones left to check: KeySequence - getInstance KeyStroke - getInstance ModalContext - ModalContextThread/run and runInCurrentThread PluginAction - createDelegate Window - runEventLoop WorkbenchAdvisor - eventLoopException
deb can we declare success here?
Not until the 6 areas in comment 12 have been addressed. Reassigning to relevant component.
defering the rest of this fix till after R3.0
Moving Dougs bugs
Hi, We seem to have run into a case of a ModalContext (see comment #12 item 3) in which an OOME is not handled yet with a user message. The case concerning is a wizard dialog in which the finishing runnable causes an out-of-memory error. This error is caught, and a message is logged, however no UI message is shown, instead the wizard dialog appears again just like before the Finish button had been pressed. First instinct is to press the Finish button again, but generally that just repeats the OOME loop. Is this issue still under investigation, I might be able to catch the OOME in the runnable itselve, but I think a generic solution would be preferred? Regards, Wieant
*** Bug 79985 has been marked as a duplicate of this bug. ***
*** Bug 79879 has been marked as a duplicate of this bug. ***
*** Bug 72022 has been marked as a duplicate of this bug. ***
I don't see it mentioned here, so will post just to let you know. IDEA prompts a dialog to increase the Heap and Perm memory. See blog post http://jlaskowski.blogspot.com/2009/05/automatyczna-aktualizacja-i.html (sorry it's in Polish, but screenshots are self-describing)
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. If the bug is still relevant, please remove the "stalebug" whiteboard tag.