-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Errors running builder 'Java Builder' on project 'org.eclipse.tycho.core.shared'. #520
Comments
If this happens once, Eclipse is effectively unusable and each action show the same error dialog again! |
The stack doesn't math master code. If you can reproduce, please attach stack trace from master build. |
The stack is from |
Here's how I read the stack trace:
See the null-check just above? There is a man behind the curtain: the last closing
This could indicate that Generally, the JDT AST is not prepared for double resolving, so it would be interesting to understand what caused that repeated invocation of |
Inspecting the very head of |
@stephan-herrmann thanks for the analysis and insight, I can only remember that I moved a class from one project (that is the I think the error occurred right after the move finished, and then the error dialog popped up again, I restarted eclipse but problem persist and then was able to fix it by clean the projects, so it seems something was even persistently cached here. |
It might because when Eclipse is running a build and inparallel a maven-build run on a commandline so could it be cause if a classfile is modified while JDT is compiling code?
|
This happens again (see eclipse-platform/eclipse.platform.ui#509 (comment)), this time I did nothing more than changing some things in Eclipse, an autobuild was running and in the meanwhile I triggered a |
In my book this already classifies as asking for trouble. Still for investigation in JDT we need steps for reproducing, really. |
For good measure I had another look at possible code paths, with these conclusions:
At this level I "proved" that the stack trace in the original ticket description is "impossible". I admit that one part was incomplete: what are the exact conditions for repeated invocation of |
Wow, it's our lucky day:
Ergo: SwitchExpression is the "new" guy in the gang, that doesn't yet play by the rules.
|
'org.eclipse.tycho.core.shared'. fixes eclipse-jdt#520
Obviously I spoiled my own appeal, but: (a) this was a very, very lucky shot, constructing the repro from a combination of reading that stack trace and reading lots of code - this only ever works once in a blue moon, and (b) providing the erroneous code right when it happened would have let us fix the bug last in 2022-12 already. |
BTW, without a stacktrace from that occurrence we can't tell if that really was the same issue. |
@stephan-herrmann thanks for finding this out, sadly in a larger project (like Tycho codebase) it is quite hard for a user without deeper knowledge to find out the root cause, especially when the problem seems to not always happen and the code compiles fine! So I hope in such a case that at least the Stacktrace can give some idea and luckily it was the case here! Especially for NPE I think there is always at least the option to give a better error message. |
https://bugs.eclipse.org/bugs/show_bug.cgi?id=576997 and its follow on fix eclipse-jdt#520
(eclipse-jdt#3208) * Also back out its follow on bug fix eclipse-jdt#520 as it loses relevance
While refactoring i go the following error message:
The text was updated successfully, but these errors were encountered: