-
Notifications
You must be signed in to change notification settings - Fork 844
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
Editor deadlock and null pointer exception while parsing java file #4122
Comments
@smil2k i believe you forgot to attach the java file. If it doesn't work paste it into a code section assuming its not too big, would be great to have a small, self-contained reproducer if possible. |
@mbien The most important part for me is that in this case the editor stuck, all files left unsaved. The fact that code complete did not work is secondary. |
I took the class from the dump file and could edit it in NetBeans 13. Autocompletion worked too on the few fields which can be resolved. |
z.zip The problem happened, when I rewrote repository to repo (so the type became available) then the "No suggestion" tooltip shown and the editor stuck. |
NPEs in javac can be caused by a lot of things. Since I can't reproduce this (not even the exceptions), the most likely explanation is lombok. A thread dump would show if its actually a deadlock or something else (e.g an infinite loop). You could also check if its reproducible in NetBeans 14rc3 since it uses a javac library based on JDK 18 (https://lists.apache.org/thread/m56qct2ksl210rr1hpdvcgcsydxnyg9c ). |
Ok, no worries. I've attached the stackdump from the locked up editor, could you please check that also? Somehow this null pointer could leave the document in a write locked state. |
@smil2k this link does not work. |
@mbien I was not able to save the file either, only after fixing an import problem the whole thing started to work again. |
Apache NetBeans version
Apache NetBeans 13
What happened
Pressing ctrl-space for suggestions leaves the editor in a freezing state.
Stacktrace reveals that in case the java source cannot be parsed, then the basedocument "loses" the write lock.
How to reproduce
I pressed ctrl-space in the attached source file.
Did this work correctly in an earlier version?
No
Operating System
Linux
JDK
11.0.15+10-Ubuntu-0ubuntu0.20.04.1
Apache NetBeans packaging
Apache NetBeans binary zip
Anything else
Reproduced 3 times in a row.
Are you willing to submit a pull request?
No
Code of Conduct
Yes
The text was updated successfully, but these errors were encountered: