-
Notifications
You must be signed in to change notification settings - Fork 30
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
semanticdb-javac terminates in error "silently", due to a NullPointerException #686
Labels
Comments
@spangaer does changing the annotation to include the parameter name fix this issue? |
Yes:
|
@varungandhi-src I think this was fixed in #691 |
I also think it was @Arthurm1, we're just fighting automated tooling closing stuff :) |
Was a bit disappointed when I saw it auto closed, but am delighted about the open-close sandwich outcome 😄 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Platform: VSCode/Metals/Bloop on Windows 10 with Java 8 GraalVM 20
This issue is a propagation of scalameta/metals#6191
It looks like it went sour in:
Still broken against v0.9.9 against which I did my debugging below.
It seems to be triggered by an annotation on a local variable
Which throws a
NullPointerException
hereJavacTrees
Because here
scip-java/semanticdb-javac/src/main/java/com/sourcegraph/semanticdb_javac/SemanticdbTrees.java
Line 87 in e4c4ffb
variableTreePath
ends up beingnull
.For some reason the new construct cannot cope with annotations on local variables. If I move the annotation to the method level it seems to get past the null pointer problem.
Why it fails on that exact instance is unclear, I have different java codebases where I use it on locals, fields or classes where I didn't see the issue surface.
Perhaps it has to do with the method being private (e.g. the variable was named
local14
in the tree model).More I wasn't able to determine whilst debugging on the release version of the Javac plugin.
I think I collected al relevant info. So far I still have the break on the code line just before the NullPointerException occurs should I need to attempt to gather anything else.
The text was updated successfully, but these errors were encountered: