Community
Participate
Working Groups
Build ID: I20080409-1425 Steps To Reproduce: We are an adoptor product which builds on top of Eclipse. I think this is a scalability issue. When working with a large workspace, StackOverflowError occurs during the first build/validate pass launched by Autobuild. Various parts of our code call resolveType() or search() on the Java model which causes the following JDT code recursively add objects until it reaches a limit. java.lang.StackOverflowError at org.eclipse.jdt.internal.core.ClasspathEntry.combineWith(Unknown Source) at org.eclipse.jdt.internal.core.search.JavaSearchScope.add(Unknown Source) at org.eclipse.jdt.internal.core.search.JavaSearchScope.add(Unknown Source) at org.eclipse.jdt.internal.core.search.JavaSearchScope.add(Unknown Source) ...<note: 2000+ lines of the same here> at org.eclipse.jdt.internal.core.search.JavaSearchScope.add(Unknown Source) at org.eclipse.jdt.internal.core.search.JavaSearchScope.add(Unknown Source) at org.eclipse.jdt.internal.core.search.BasicSearchEngine.createJavaSearchScope(Unknown Source) at org.eclipse.jdt.internal.core.search.BasicSearchEngine.createJavaSearchScope(Unknown Source) at org.eclipse.jdt.internal.core.search.BasicSearchEngine.createJavaSearchScope(Unknown Source) at org.eclipse.jdt.internal.core.SearchableEnvironment.<init>(Unknown Source) at org.eclipse.jdt.internal.core.SearchableEnvironment.<init>(Unknown Source) at org.eclipse.jdt.internal.core.JavaProject.newSearchableNameEnvironment(Unknown Source) at org.eclipse.jdt.internal.core.NamedMember.resolveType(Unknown Source) at org.eclipse.jdt.internal.core.NamedMember.resolveType(Unknown Source) More information: Please contact me directly for more information on how to reproduce.
Have you tried playing with the Java thread stack size? e.g. starting Eclipse with -Xss256k or greater?
I tried with -Xss2048k and still got the StackOverflowError
Created attachment 99464 [details] Projects reproducing the problem To reproduce: 1. Start a new workspace 2. Change Window>Preferences>Java>Compiler>Building>Build path problems>Circular dependencies to Warning 3. Import the attached projects in the workspace 4. Select P3 5. Search>Java 6. Select Enclosing projects 7. Press Search Observe: You get a dialog with a stack overflow error
Created attachment 99483 [details] Projects reproducing the problem Actually, the steps reproducing the original problems are slightly different: To reproduce: 1. Start a new workspace 2. Import the attached projects in the workspace 3. Search>Java 4. Search string: X 5. Check Type 6. Check Declarations 7. Check Workspace 8. Press Search Observe: You get a dialog with a stack overflow error
Created attachment 99507 [details] Proposed fix and regression tests
Frederic, if you have time can you please review? Otherwise I'll ask someone else :-)
Patch looks good: +1
Would we have same bug in 3.3.x ?
(In reply to comment #8) > Would we have same bug in 3.3.x ? No. The bug was introduced by the fix to bug 176831, which was not backported to 3.3.x.
Fix and tests released for 3.4RC1
Verified for 3.4RC1 using I20080513-2000