Skip to content
This repository has been archived by the owner on Sep 19, 2023. It is now read-only.

8288854: getLocalGraphicsEnvironment() on for multi-screen setups throws exception NPE #81

Closed
wants to merge 1 commit into from

Conversation

mrserb
Copy link
Member

@mrserb mrserb commented Jun 27, 2022

This is the fix for a copy-paste error. The fix JDK-8076313 replaced the usage of the "screens" array from the parent class to the "devices" where the list of devices is now maintained. Since "screens" array is never used nor initialized its usage caused an NPE. That check was copied as-is, while it should use the actual number of screen devices requested early in that method.

The bug is rarely reproduced because in single screen configuration the main screen is usually 0, and in the multiscreen configuration Xinerama is usually active so the main screen is also 0 => the second part of the "if" statement is not executed.

I have validated the fix by the SwingSet, I also executed desktop tests in that config and found that even though this particular bug is fixed we still have many issues there, around ~100 tests failed.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8288854: getLocalGraphicsEnvironment() on for multi-screen setups throws exception NPE

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk19 pull/81/head:pull/81
$ git checkout pull/81

Update a local copy of the PR:
$ git checkout pull/81
$ git pull https://git.openjdk.org/jdk19 pull/81/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 81

View PR using the GUI difftool:
$ git pr show -t 81

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk19/pull/81.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Jun 27, 2022

👋 Welcome back serb! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Jun 27, 2022

@mrserb The following label will be automatically applied to this pull request:

  • client

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the client client-libs-dev@openjdk.org label Jun 27, 2022
@mrserb mrserb marked this pull request as ready for review June 28, 2022 00:48
@openjdk openjdk bot added the rfr Pull request is ready for review label Jun 28, 2022
@mlbridge
Copy link

mlbridge bot commented Jun 28, 2022

Webrevs

Copy link
Member

@azvegint azvegint left a comment

Choose a reason for hiding this comment

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

Looks good.

@openjdk
Copy link

openjdk bot commented Jun 28, 2022

@mrserb This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8288854: getLocalGraphicsEnvironment() on for multi-screen setups throws exception NPE

Reviewed-by: azvegint, aivanov

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 10 new commits pushed to the master branch:

  • dbc6e11: 8289399: Update SourceVersion to use snippets
  • 1504804: 8289398: ProblemList jdk/jfr/api/consumer/recordingstream/TestOnEvent.java on linux-x64 again
  • 9b7805e: 8289069: Very slow C1 arraycopy jcstress tests after JDK-8279886
  • c42b796: 8288058: Broken links on constant-values page
  • a814293: 8275784: Bogus warning generated for record with compact constructor
  • 6f9717b: 8288836: (fs) Files.writeString spec for IOException has "specified charset" when no charset is provided
  • 9048cef: 8288425: Footprint regression due MH creation when initializing StringConcatFactory
  • adbd200: 8289228: SegmentAllocator::allocateArray null handling is too lax
  • b449038: 8288445: AArch64: C2 compilation fails with guarantee(!true || (true && (shift != 0))) failed: impossible encoding
  • 2efa89a: 8289251: ProblemList java/lang/ref/OOMEInReferenceHandler.java

Please see this link for an up-to-date comparison between the source branch of this pull request and the master branch.
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Jun 28, 2022
@azvegint
Copy link
Member

BTW why this PR is raised against JDK19 and not mainline?

@mrserb
Copy link
Member Author

mrserb commented Jun 28, 2022

BTW why this PR is raised against JDK19 and not mainline?

Don't all fixes from JDK19 have merged to the mainline "automatically"?

@azvegint
Copy link
Member

BTW why this PR is raised against JDK19 and not mainline?

Don't all fixes from JDK19 have merged to the mainline "automatically"?

I worried that JDK19 are in RDP1 phase right now.

This bug looks like a "Targeted P3" and it should be dropped.

Correct me if I am wrong.

@mrserb
Copy link
Member Author

mrserb commented Jun 28, 2022

Don't all fixes from JDK19 have merged to the mainline "automatically"?

I worried that JDK19 are in RDP1 phase right now.

This is the phase when all fixes are merged to the mainline.

From your links above:
" In RDP 1, if the bug is targeted and if time permits, develop and integrate a fix when ready."

Fix Drop
RDP1 Current P1–P3 All P4–P5
Targeted P1–P3 if time Targeted P1–P3
P1–P5 doc/test bugs

Since the small fix for a recent regression is ready I do not see a reason to skip it?

@azvegint
Copy link
Member

Since the small fix for a recent regression is ready I do not see a reason to skip it?

OK, thanks for clarification.

@mrserb
Copy link
Member Author

mrserb commented Jul 2, 2022

/integrate

@openjdk
Copy link

openjdk bot commented Jul 2, 2022

Going to push as commit cfc9a88.
Since your change was applied there have been 18 commits pushed to the master branch:

  • 9925014: 8280320: C2: Loop opts are missing during OSR compilation
  • 8e01ffb: 8289570: SegmentAllocator:allocateUtf8String(String str) default behavior mismatch to spec
  • 20124ac: 8289585: ProblemList sun/tools/jhsdb/JStackStressTest.java on linux-aarch64
  • 604ea90: 8289549: ISO 4217 Amendment 172 Update
  • 9549777: 8284358: Unreachable loop is not removed from C2 IR, leading to a broken graph
  • c20b3aa: 8289278: Suspend/ResumeAllVirtualThreads need both can_suspend and can_support_virtual_threads
  • cf71544: 8289252: Recommend Locale.of() method instead of the constructor
  • 5708974: 8288596: Random:from() adapter does not delegate to supplied generator in all cases
  • dbc6e11: 8289399: Update SourceVersion to use snippets
  • 1504804: 8289398: ProblemList jdk/jfr/api/consumer/recordingstream/TestOnEvent.java on linux-x64 again
  • ... and 8 more: https://git.openjdk.org/jdk19/compare/17ef8cae33dd77e5a9b2cf19539ebf25aece5f92...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Jul 2, 2022
@openjdk openjdk bot closed this Jul 2, 2022
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Jul 2, 2022
@openjdk
Copy link

openjdk bot commented Jul 2, 2022

@mrserb Pushed as commit cfc9a88.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@mrserb mrserb deleted the JDK-8288854 branch July 2, 2022 02:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
client client-libs-dev@openjdk.org integrated Pull request has been integrated
3 participants