Community
Participate
Working Groups
After a (long) time of working with Eclipse I had an Out Of Memory Exception. Eclipse disappeared without showing an error dialog/warning. I only noticed it because I had a "pause" in my batch file. (Did not check the log - guess it may be in there but this is not enough) NOTES:
PRODUCT VERSION: SDK 0.107, CVS, Self Hosting
*** Bug 2341 has been marked as a duplicate of this bug. ***
*** Bug 2611 has been marked as a duplicate of this bug. ***
*** Bug 2758 has been marked as a duplicate of this bug. ***
*** Bug 7006 has been marked as a duplicate of this bug. ***
*** Bug 2404 has been marked as a duplicate of this bug. ***
*** Bug 2610 has been marked as a duplicate of this bug. ***
See stack dump in bug 7006.
Should fix for M3. Should write a test plugin which allocates memory (e.g. 10M chunks) until it dies. The Workbench should recover gracefully if it can. Note that in this example, the last 10M allocation will have failed, but there should be enough memory free to warn the user, then shut down gracefully if that's what they want. As another example, a plugin should be able to try allocating 1G of memory and not crash Eclipse. It should run just as well after as before the attempt.
See also bug 6825.
A fix has being released. It will still fail to report the problem to the user depending on how the "Out of memory error" hapenned. If it failed allocating a lot of bytes then we have a good change to report the problem to the user but if it failed allocanting one single object the it is likely that we do not have memory to report the problem. The current fix is opening a dialog warning the user and asking if he wants to exit the workbench. This warning/logging/exiting is all wrapped with try{}catch blocks.
Can we allocate a dummy object on startup that takes up enough memory to guarantee a message dialog and proper shutdown (e.g., 500k) and that is dereferenced immediately when an OutOfMemoryException occurs?