Community
Participate
Working Groups
Created attachment 143082 [details] Patch to ClassFile.java and SourceMapper.java Build ID: 3.5.0 I20090611-1540 Steps To Reproduce: 1. Use a project with a mapped source jar containing a large .java file with many internal classes 2. Hit a breakpoint in the debugger which is in one of those classes Eclipse freezes and encounters an OOM after several minutes. More information: Inspection of a heap dump using MAT shows that there is a duplicate Buffer and char[] containing the contents of the large java file for each internal class. For example, an 8MB java file containing 42 internal classes expands to 17MB char[] x 42 = 714MB of heap. Preferably there would be only one Buffer for the java source file. I'm attaching a patch which corrects this.
Daniel, Candidate for 3.5.1?
Created attachment 144892 [details] Proposed fix + regression test Changed the submitted patch to prevent getting a source mapper if not needed.
>Daniel, >Candidate for 3.5.1? Teh bug is bad but it doesn't seem to be a regression and the fix is non-trivial. For now I'd put it into 3.6 only.
Will release for 3.6M2.
Released for 3.6M2. Regression test added in: org.eclipse.jdt.core.tests.model.AttachSourceTests#testClassFileBuffer
Verified for 3.6M2 using code inspection and regression tests verification.