Skip to content
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

WIP: Fix NPE in PDEModelUtility.java (line 415) by adding null check (Fix #1404) #1479

Merged
merged 1 commit into from
Dec 30, 2024

Conversation

slvo-loading
Copy link
Contributor

Summary Of Change
Added a null guard to editor.getContextManager() to prevent NullPointerException (NPE).

Why this Change is Needed
An NPE occurs when too many processes are running and the user uses the context menu to close all tabs. This is caused by a race condition where dispose() is called while modifyEditorModel() is still running, resulting in getContextManager() returning null.

Related Issue
Fix #1404

Testing
Testing is in progress. We are working on a test where dispose() is called followed by modifyEditorModel() to verify that the null guard resolves the issue.

Copy link

github-actions bot commented Dec 2, 2024

Test Results

   285 files  ±0     285 suites  ±0   54m 36s ⏱️ + 1m 22s
 3 586 tests ±0   3 510 ✅ ±0   76 💤 ±0  0 ❌ ±0 
10 950 runs  ±0  10 719 ✅ ±0  231 💤 ±0  0 ❌ ±0 

Results for commit fcef52d. ± Comparison against base commit bb04e28.

Copy link
Member

@HannesWell HannesWell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @slvo-loading and thank you for your contribution.
First of all sorry for the late reply, I somehow lost track of this PR.

In general this change look reasonable, but one thing should be changed, see the remark below.
But it's a small change and I'm about to apply and push it directly to your branch to not further delay this change.

@HannesWell HannesWell merged commit 6e21922 into eclipse-pde:master Dec 30, 2024
16 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NPE in PDEModelUtility.java:415
2 participants