Community
Participate
Working Groups
1. Load the attached M3.java file. 2. paste the sample numbers into the array(from attached t.txt) 3. Select all the sample numbers *only* 4. Press tab. 5. Crash(various requesters are shown). From log: !SESSION des 30, 2002 16:32:18.723 --------------------------------------------- java.version=1.4.1_01 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=no_NO Command-line arguments: -os win32 -ws win32 -arch x86 -install file:C:/m4/ !ENTRY org.eclipse.ui 4 4 des 30, 2002 16:32:18.723 !MESSAGE Unhandled exception caught in event loop. !ENTRY org.eclipse.ui 4 0 des 30, 2002 16:32:18.733 !MESSAGE java.lang.OutOfMemoryError !STACK 0 java.lang.OutOfMemoryError !ENTRY org.eclipse.ui 4 4 des 30, 2002 16:32:25.252 !MESSAGE Save All Failed !ENTRY org.eclipse.ui 2 0 des 30, 2002 16:32:25.262 !MESSAGE Save All Failed !STACK 0 java.lang.OutOfMemoryError
Created attachment 2875 [details] Sample numbers to paste
Created attachment 2876 [details] Java file to reproduce problem
To solve the problem increase the heap size of the Java VM. See http://dev.eclipse.org:8080/help/content/help:/org.eclipse.platform.doc.user/tas ks/running_eclipse.htm for details how to do so.
I respectfully claim that this issue is not resolved. 1. There is evidence in my bugreport that Eclipse will cause data corruption if it runs out of heap. 2. The default heap size(or how Eclipse uses it) must be wrong. I only tried to indent a very modest amount of text(~1000 lines). 3. The way the user discovers that he needs to increase heap size, is that the application crashes(possibly causing data corruption). Not very smooth. 4. How much heap and how it uses it should be dealt with by the application, not the user. IMHO. 5. Although, IMHO, the user should never have to worry about heap size, it would be nice if the next time Eclipse launches it proposes to increase the heap size. Øyvind
How the heap is managed and how big the heap is depends on the VM, so Eclipse can't in general adjust the Heap-Size of a VM. But I like the idea that the workbench opens an information dialog telling the user that he might increase the heap size if an OutOfMemory Exception is caught. Open separate bug for this. I retested the scenario with the latest integration build I20030129 with the standard heap size (JDK Sun 1.4.1) and it still produces an OME. Moving to text if this points to some "unnecessary" memory consuption. Filed separate bug 30807 for the automatic adaption of the heap size request.
Adapted summary. Investigate when we do a performance pass.
Verified that we don't leak memory here. See bug 33972 which covers general improvement of OOME handling.