RFR: JDK-8357082 : Stabilize and add debug logs to CopyAreaOOB.java
Harshitha Onkar
honkar at openjdk.org
Thu May 22 17:39:54 UTC 2025
On Mon, 19 May 2025 02:08:01 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:
>> CopyAreaOOB.java was failing intermittently on some platforms on CI but recently it started to fail more frequently on macos-aarch64 when the entire test suite runs.
>>
>> Test failure is not reproducible when the test is run individually (multiple times) on CI.
>>
>> Rewritten the test and added debug logs that will be helpful to figure out the issue.
>>
>> - Added code to capture screenshot (entire screen as well as the frame) in case of failure.
>> - Since it tests multiple regions added a StringBuffer to consolidate the error logs before throwing RuntimeException.
>
> test/jdk/java/awt/Graphics2D/CopyAreaOOB.java line 88:
>
>> 86:
>> 87: private static void createTestUI() {
>> 88: frame = new Frame();
>
> You do not need to call all these methods on the EDT, these are AWT components that should handle multithreaded usage (main/EDT/toolkit threads). It is possible that the issue is only reproducible on macOS due to synchronization problems related to the metal pipeline?
Recent AWT test updates have UI creation wrapped in EDT. I have seen many reviewers recommend using EDT even with AWT components.
Recently came across another PR where EDT is recommended.
https://github.com/openjdk/jdk/pull/25278#discussion_r2100689626
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25279#discussion_r2103088406
More information about the client-libs-dev
mailing list