Community
Participate
Working Groups
I20090401 I accidentally pasted 8000 lines of text into the end of a Java editor. This resulted in a stack overflow error. At that point doing anything at all resulted in more stack overflows, even trying to close the editor produced a stack overflow. Obviously I did something silly here (meant to paste into a text file instead of a Java file), but it seems like it should recover from this case better. The exact case I did was paste the MANIFEST.MF from org.eclipse.ui.workbench into a trivial Java class, after the final brace to end the class declaration.
Created attachment 131324 [details] Log file
The stackoverflow is in the recovery.
I do not reproduce the problem but i am not sure to understand your test case. You wrote that you pasted 8000 lines of text and you wrote that the pasted file is the MANIFEST.MF from org.eclipse.ui.workbench. But this file contains around 100 lines and not 8000. What is exactly your test case ?
Go to eclipse/plugins/ in your eclipse install, and open the org.eclipse.ui.workbench...jar file. The MANIFEST.MF in there is much larger due to the signature block.
I reproduced the stackoverflow with this MANIFEST.MF.
Created attachment 132076 [details] Proposed patch The diet recovery create a deep hierarchy of enclosing types ... class SHA1 { class SHA1 { class SHA1 { class SHA1 { ... } ... This recovery is valid but cause the Stack overflow. So this fix limit the depth of recovered types to 256. If this threshold is reached then deeper member types will be ignored by the recovery.
Released for 3.5M7. Test added DietRecoveryTest#test125()
Verified for 3.5M7 using I20090426-2000