apache / apache/netbeans

Editor deadlock and null pointer exception while parsing java file

Open
#4,122 11 comments 0 reactions 0 assignees View on GitHub
Java kind:bug needs:triage
Dominant language
Java
Stars
3.1k
Forks
935
Avg merge
2d 3h
Merged PRs (30d)
17

Description

### 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

Contributor guide

Open the contributing guide

Research direction

Start by inspecting the attached Java source file and the reported stacktrace, then reproduce the freeze by pressing Ctrl-Space in the NetBeans editor. Trace the Java parsing path and BaseDocument write-lock handling; done means the editor no longer freezes or reports the null pointer exception when parsing fails.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
desktop, developer-experience
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.