Skip to content

Colors are null in Section onPaint and cause null pointer exception #2972 #2973

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

Merged

Conversation

selundqma
Copy link
Contributor

Changed code found in Section.class (onPaint) which lets null values slip through and cause null pointer exception.

Fixes #2972

…clipse-platform#2972

Changed code found in Section.class (onPaint) which lets
null values slip through and cause null pointer exception.

Fixes eclipse-platform#2972
Copy link
Contributor

github-actions bot commented May 12, 2025

Test Results

 1 824 files  ± 0   1 824 suites  ±0   1h 35m 1s ⏱️ -42s
 7 925 tests + 7   7 696 ✅ + 6  228 💤 ±0  1 ❌ +1 
23 862 runs  +21  23 113 ✅ +20  748 💤 ±0  1 ❌ +1 

For more details on these failures, see this check.

Results for commit 6f6235f. ± Comparison against base commit 0368ee5.

♻️ This comment has been updated with latest results.

@fedejeanne
Copy link
Contributor

fedejeanne commented May 12, 2025

@selundqma thank you for proposing a fix. I am leaving the office now but if the matter is not urgent then I can merge tomorrow.

Would it be possible to provide a Snippet or describe the steps necessary to reproduce the original error (#2972)? The only way I know how to manually test the sections is by opening the simple form editor

image

But that doesn't reproduce the error.

Or can you at least reproduce the error in your product so that you can test my proposed fix?

@selundqma
Copy link
Contributor Author

Or can you at least reproduce the error in your product so that you can test my proposed fix?

Will there be a new integration build for me to install and test? Then it would be no problem to check if the fix is doing it´s job.

@fedejeanne
Copy link
Contributor

fedejeanne commented May 13, 2025

Or can you at least reproduce the error in your product so that you can test my proposed fix?

Will there be a new integration build for me to install and test? Then it would be no problem to check if the fix is doing it´s job.

As soon as I merge this PR (today) then you can rely on a new I-BUILD (tomorrow).

A hint: I usually "hack" my way into testing these small issues. What I usually do is:

  • I compile the class with the changes
  • I take the .class file
  • I put it into the appropriate .jar file in my P2 bundle pool. (I previously back up my original JAR file to be able to recover it later)

In this particular case it would mean:

  • Do the changes in Section.java and save, it will compile.
  • Take the file Section.class from the corresponding bin folder (in my case: D:\dev\platform-master\git\eclipse.platform.ui\bundles\org.eclipse.ui.forms\bin\org\eclipse\ui\forms\widgets)
  • Look for the appropriate plugin under Help > About Eclipse SDK > Installation Details
    image

image

  • Back-up the original file
  • Open the JAR file with 7-zip (or similar)
  • Replace the existing Section.class with the one you just compiled.
  • Save (you will have to close Eclipse to do it since the IDE is using the JAR file and Windows will not allow you to modify it on the fly)

HTH

@selundqma
Copy link
Contributor Author

Feel free to merge when you want to :).

@fedejeanne
Copy link
Contributor

I restarted the tests on Mac unnecessarily, the failing test was already documented: #294. Merging.

@fedejeanne fedejeanne merged commit dd7ed68 into eclipse-platform:master May 13, 2025
20 of 22 checks passed
@selundqma
Copy link
Contributor Author

I have now tested the new code by taking the Section.class file from eclipse-SDK-I20250513-1800 (eclipse\plugins\org.eclipse.ui.forms_3.13.500.v20250513-1103.jar) and put it into the org.eclipse.ui.forms_3.13.500.v20250426-1415.jar of my built RCP application. Works just fine! Thank you!

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.

Colors are null in Section onPaint and cause null pointer exception
3 participants