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

JDK-8324238 : [macOS] java/awt/Frame/ShapeNotSetSometimes/ShapeNotSetSometimes.java fails with the shape has not been applied msg #17563

Closed
wants to merge 2 commits into from

Conversation

honkar-jdk
Copy link
Contributor

@honkar-jdk honkar-jdk commented Jan 25, 2024

ShapeNotSetSometimes.java fails on macOS 11 on a random iteration of colorCheck() as shown below. The colorCheck() is repeated for about 50 times in the test. It is observed to pass on previous attempts and fail on a random attempt such as Attempt# 29 shown here.

Here the point (150, 20) is well in the green area hence the slight color diff picked up by robot.getPixelColor() is not due to sampling of color at the edge (which sometimes causes robot to pick up slightly different color).

Attempt 29
Checking 150, 20, java.awt.Color[r=0,g=255,b=1] should be java.awt.Color[r=0,g=255,b=0]

Due to the above, I have kept the color sampling points at the same location as earlier and made the following changes to the test:

  • Moved the frame to the center of the screen.
  • Instead of comparing exact RGB values, used colorCompare() which allows color tolerance of 2 per color component to accommodate slight variations when comparing actual vs expected colors.
Attempt 27
Checking 150, 130, java.awt.Color[r=255,g=255,b=255] should be java.awt.Color[r=255,g=255,b=255]
Checking 150, 20, java.awt.Color[r=0,g=255,b=0] should be java.awt.Color[r=0,g=255,b=0]
Checking 280, 120, java.awt.Color[r=0,g=255,b=0] should be java.awt.Color[r=0,g=255,b=0]
Checking 150, 250, java.awt.Color[r=0,g=255,b=0] should be java.awt.Color[r=0,g=255,b=0]
Checking 20, 120, java.awt.Color[r=0,g=255,b=0] should be java.awt.Color[r=0,g=255,b=0]
Checking 62, 62, java.awt.Color[r=0,g=243,b=0] should not be java.awt.Color[r=255,g=255,b=255]
Checking 240, 185, java.awt.Color[r=0,g=229,b=0] should not be java.awt.Color[r=255,g=255,b=255]
Attempt 28
Checking 150, 130, java.awt.Color[r=255,g=255,b=255] should be java.awt.Color[r=255,g=255,b=255]
Checking 150, 20, java.awt.Color[r=0,g=255,b=0] should be java.awt.Color[r=0,g=255,b=0]
Checking 280, 120, java.awt.Color[r=0,g=255,b=0] should be java.awt.Color[r=0,g=255,b=0]
Checking 150, 250, java.awt.Color[r=0,g=255,b=0] should be java.awt.Color[r=0,g=255,b=0]
Checking 20, 120, java.awt.Color[r=0,g=255,b=0] should be java.awt.Color[r=0,g=255,b=0]
Checking 62, 62, java.awt.Color[r=0,g=241,b=0] should not be java.awt.Color[r=255,g=255,b=255]
Checking 240, 185, java.awt.Color[r=0,g=227,b=0] should not be java.awt.Color[r=255,g=255,b=255]
Attempt 29
Checking 150, 130, java.awt.Color[r=255,g=255,b=255] should be java.awt.Color[r=255,g=255,b=255]
Checking 150, 20, java.awt.Color[r=0,g=255,b=1] should be java.awt.Color[r=0,g=255,b=0]
----------System.err:(16/962)----------
Checking for transparency failed: point: 370, 420
actual java.awt.Color[r=0,g=255,b=1]
expected java.awt.Color[r=0,g=255,b=0]
java.lang.RuntimeException: Test failed. The shape has not been applied. 

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-8324238: [macOS] java/awt/Frame/ShapeNotSetSometimes/ShapeNotSetSometimes.java fails with the shape has not been applied msg (Bug - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 17563

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/17563.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Jan 25, 2024

👋 Welcome back honkar! 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 openjdk bot added the rfr Pull request is ready for review label Jan 25, 2024
@openjdk
Copy link

openjdk bot commented Jan 25, 2024

@honkar-jdk 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 Jan 25, 2024
@mlbridge
Copy link

mlbridge bot commented Jan 25, 2024

Webrevs

@openjdk
Copy link

openjdk bot commented Jan 25, 2024

@honkar-jdk 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:

8324238: [macOS] java/awt/Frame/ShapeNotSetSometimes/ShapeNotSetSometimes.java fails with the shape has not been applied msg

Reviewed-by: azvegint, dnguyen

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 82 new commits pushed to the master branch:

  • ec56c72: 8323601: Improve LayoutPath.PathElement::toString
  • f7121de: 8322648: Improve class initialization barrier in TemplateTable::_new for PPC
  • 577de17: 8259550: The content of the print out displayed incomplete with the NimbusLAF
  • 83b3c9b: 8322649: Improve class initialization barrier in TemplateTable::_new for S390
  • 7d1a488: 8324861: Exceptions::wrap_dynamic_exception() doesn't have ResourceMark
  • c3c1d5b: 8324998: Add test cases for String.regionMatches comparing Turkic dotted/dotless I with uppercase latin I
  • 8892d45: 8324582: Replace -Djava.util.concurrent.ForkJoinPool.common.parallelism to -Djdk.virtualThreadScheduler.maxPoolSize in jvmti vthread tests
  • 11e28bd: 8324794: C2 SuperWord: do not ignore reductions in SuperWord::unrolling_analysis
  • d51aaf6: 8323950: Null CLD while loading shared lambda proxy class with javaagent active
  • f57c722: 8324880: Rename get_stack_trace.h
  • ... and 72 more: https://git.openjdk.org/jdk/compare/8b9bf758801400e4491326cd4c90fc117b9d97e1...master

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 Jan 25, 2024
Copy link
Contributor

@DamonGuy DamonGuy left a comment

Choose a reason for hiding this comment

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

Changes LGTM

@honkar-jdk
Copy link
Contributor Author

I missed pushing the latest update to the test previously. Added it.

Copy link
Contributor

@DamonGuy DamonGuy left a comment

Choose a reason for hiding this comment

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

I took the latest changes and ran the test again multiple times. Newest changes look like minor stability changes. Still passes. LGTM

@honkar-jdk
Copy link
Contributor Author

/integrate

@openjdk
Copy link

openjdk bot commented Jan 31, 2024

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

  • 1f2922a: 8320342: Use PassFailJFrame for TruncatedPopupMenuTest.java
  • 2cd1ba6: 8324981: Shenandoah: Move commit and soft max heap changed methods into heap
  • 1733d2e: 8303374: Implement JEP 455: Primitive Types in Patterns, instanceof, and switch (Preview)
  • 6697160: 8320712: Rewrite BadFactoryTest in pure Java
  • 725314f: 8324771: Obsolete RAMFraction related flags
  • ec6c35c: 8324970: Serial: Refactor signature of maintain_old_to_young_invariant
  • b5c267f: 8324632: Update Zlib Data Compression Library to Version 1.3.1
  • ec56c72: 8323601: Improve LayoutPath.PathElement::toString
  • f7121de: 8322648: Improve class initialization barrier in TemplateTable::_new for PPC
  • 577de17: 8259550: The content of the print out displayed incomplete with the NimbusLAF
  • ... and 79 more: https://git.openjdk.org/jdk/compare/8b9bf758801400e4491326cd4c90fc117b9d97e1...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Jan 31, 2024

@honkar-jdk Pushed as commit 62c9530.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client client-libs-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

3 participants