Community
Participate
Working Groups
Created attachment 276510 [details] Log file containing the error Hello, we are getting recurring and persistent StackOverflowErrors in our eclipse IDE. These errors occur in a variety of situations, most reliably when attempting to build the entire project, or when opening the "Open Type" dialog window (shortcut SHIFT+CTRL+T). They also occur intermittently while editing code, or simply while the IDE is (apparently) idling. We have observed this error while editing the project on three different PCs. Since this has effectively paralysed our development, any help on the matter would be greatly appreciated.
Relevant error part: !ENTRY org.eclipse.jdt.core 4 4 2018-11-08 15:17:10.922 !MESSAGE Background Indexer Crash Recovery !STACK 0 java.lang.StackOverflowError at org.eclipse.jdt.internal.compiler.lookup.ParameterizedTypeBinding.updateTagBits(ParameterizedTypeBinding.java:1734) at org.eclipse.jdt.internal.compiler.lookup.ParameterizedTypeBinding.updateTagBits(ParameterizedTypeBinding.java:1734)
Stephan, can it be that ParameterizedTypeBinding finds itself in the "arguments" array? @Lucas: I guess this must be something with generic types. Which JLS version is set for Java compiler? Could you try to provide some standalone project which shows this error? Can you try latest 4.10 SDK build?
@Andrey I have tried the latest 4.10 build, the error still occurs. The compiler is set to JLS version 10, and we use currently the 10.0.2 version of the jdk. I unfortunately cannot recreate the error in a sample project thus far. I believe that it is connected to null analysis, as disable null analysis entirely seems to get rid of the error, or at least suppress it.
(In reply to Andrey Loskutov from comment #2) > Stephan, can it be that ParameterizedTypeBinding finds itself in the > "arguments" array? Such is known to be possible for TypeVariableBinding & WildcardBinding. So perhaps also a PTB can occur somewhere on the path of such cyclic structures. See bug 435962 for prior art on avoiding such structures to explode. If we have a test case, we will probably find s.t. like the following pattern to be helpful also in updateTagBits(): try { if (!enterRecursiveFunction()) return super.updateTagBits(); ... } finally { exitRecursiveFunction(); }
(In reply to Stephan Herrmann from comment #4) > (In reply to Andrey Loskutov from comment #2) > > Stephan, can it be that ParameterizedTypeBinding finds itself in the > > "arguments" array? > > Such is known to be possible for TypeVariableBinding & WildcardBinding. So > perhaps also a PTB can occur somewhere on the path of such cyclic structures. This theory doesn't exactly match the stack trace, since there PTB *directly* calls itself. To the best of my understanding that would require an infinite type like P<P<P<...>>> or P<P<P<...X>,Y>,Z> or ...
Created attachment 276517 [details] experimental jdt.core @Lucas, could you please: - grab the attached jdt.core.jar - replace it inside plugins of your 4.10 I-build installation - you may want to backup the existing jar, first. - while replacing, rename it to the exact versioned name in your installation - start eclipse from a console Instead of the stack overflow you should be seeing lines on the console starting with Recursion in updateTagBits() for This should lead us to the troublesome type triggering the bug.
Created attachment 276520 [details] Screenshot
Hello Stephan, I tried following you instructions, but it did not work as hoped. I am still getting the overflow error, and no console output. I did put the jar file you attached in the eclipse/plugins folder, but unlike you suggested, there wasn't an existing version for me to replace. I attached a screenshot, maybe you can see what I did wrong and give me some new instructions.
(In reply to Lucas von Karger from comment #8) > Hello Stephan, > > I tried following you instructions, but it did not work as hoped. I am still > getting the overflow error, and no console output. > > I did put the jar file you attached in the eclipse/plugins folder, but > unlike you suggested, there wasn't an existing version for me to replace. If you didn't replace, then the new jar could not take effect :) How did you install Eclipse: unzip or using the eclipse-installer? The installer uses a central bundle-pool to store bundles for all installations. If that's what you have, you'd need to find the bundle pool and replace their (after backup).
@Stephan I have managed to replace the .jar file in my 4.10 I-build and launched it through the console, but I cannot see any output like you described. The only change I have observed so far is that the error message is slightly different: !ENTRY org.eclipse.jdt.core 4 4 2018-11-10 15:08:04.507 !MESSAGE Background Indexer Crash Recovery !STACK 0 java.lang.StackOverflowError at org.eclipse.jdt.internal.compiler.lookup.TypeBinding.annotatedDebugName(TypeBinding.java:152) at org.eclipse.jdt.internal.compiler.lookup.ParameterizedTypeBinding.annotatedDebugName(ParameterizedTypeBinding.java:433) at org.eclipse.jdt.internal.compiler.lookup.RawTypeBinding.annotatedDebugName(RawTypeBinding.java:144) at org.eclipse.jdt.internal.compiler.lookup.ParameterizedTypeBinding.annotatedDebugName(ParameterizedTypeBinding.java:438)
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.