apache / apache/netbeans

Javadoc window causes NullPointerException followed by window rendering issues

Open
#8,843 1 comment 0 reactions 0 assignees View on GitHub
Ant Java JavaDoc 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 27

### What happened

The Netbeans Javadoc Documentation window crashes showing partially output, causing visual artifacts across netbeans (including garbage areas that are not refreshed properly). When this occurs Netbeans reports a NullPointerException. This behavior continues until Netbeans is restarted.

[messages.log](https://github.com/user-attachments/files/22391509/messages.log)

- Error reported by Netbeans (NullPointerException)
- When the error appears the following issues also occur
- Javadoc window shows partial results
- GUI get corrupted with window not refreshing properly showing older garbage images
- Can also get many ≺classname≻_n.dump files where n is some number. The classname will correspond to the class containing the javadoc that crashes Netbean's Javadoc window.

### Language / Project Type / NetBeans Component

Java Ant project with existing sources.

### How to reproduce

I have supplied a minimal Javadoc example that causes this issue. However I have found in general this occurs a lot with Netbeans when displaying Javadoc using Netbeans' built in viewer. This error occurs if the javadoc is for a class, member or package.

This error occurs every time for the supplied example.
[src.zip](https://github.com/user-attachments/files/22391597/src.zip)

Note: if 1) a closing ≺/pre≻ tag is added, 2) netbeans is restarted then the error goes away. If the text following the ≺pre≻ tag is removed the error also goes away. The text contains a combining diacritic.

Note: if the Javadoc window is not displayed then the error is not generated.

### Did this work correctly in an earlier version?

No / Don't know

### Operating System

macOS 15.6 (M2 cpu)

### JDK

JDK 24.0.2

### Apache NetBeans packaging

Third-party package

### Anything else

The installer was downloaded from [Friends of Apache NetBeans](https://installers.friendsofapachenetbeans.org/)

### Are you willing to submit a pull request?

No

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the failure in the supplied src.zip while viewing the Javadoc window, and inspect messages.log for the NullPointerException. Compare behavior with and without the closing pre tag and combining diacritic; done means the Javadoc renders fully without GUI artifacts, stale regions, or dump files.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.