RFR: 8273617: UninitializedDisplayModeChangeTest.java times out on macOS 12

Prasanta Sadhukhan psadhukhan at openjdk.java.net
Sat Sep 25 10:50:54 UTC 2021


On Thu, 23 Sep 2021 06:47:33 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:

> java/awt/FullScreen/UninitializedDisplayModeChangeTest/UninitializedDisplayModeChangeTest.java is timing out every time on macOS 12 even though the test passed.
> Looks like the the main process waits for child process created in the test forever, making it timeout after jtreg timeout of 2min.
> Modified to wait for childprocess for 30secs.

The child process executing DisplayModeChanger class hangs when it is supposed to go into windowed mode in gd.setFullScreenWindow(null) call.
It seems in macos12, it hangs while executing CGCompleteDisplayConfiguration() in Java_sun_awt_CGraphicsDevice_nativeSetDisplayMode method in CGraphicsDevice.m

Basically, setFullScreenWindow() calls CGGraphicsDevice.java#setFullScreenWindow which calls JNI nativeSetDisplayMode which does CGBeginDisplayConfiguration, CGConfigureDisplayWithDisplayMode and CGCompleteDisplayConfiguration.

Now, DisplayModeChanger class calls setFullScreenWindow to go to fullscreen mode and then to windowed mode. 
When going to fullscreen mode, it calls Java_sun_awt_CGraphicsDevice_nativeSetDisplayMode()  with 
displayId:724860118, w:1280, h:720, bpp:32, refrate 60 and CGCompleteDisplayConfiguration works ok

But when it is called for windowed mode, Java_sun_awt_CGraphicsDevice_nativeSetDisplayMode() is called with displayId:724860118, w:1920, h:1080, bpp:32, refrate 60 and CGCompleteDisplayConfiguration  hangs.

For macos11, also the same code flow is followed with same values but CGCompleteDisplayConfiguration  executes and the testcase works. 
For macos10.15.7 also, same codeflow is followed where fullscreen mode is called with 
displayId:731394562, w:640, h:480, bpp:32, refrate 60 and windowed mode with 
displayId:731394562, w:1920, h:1080, bpp:32, refrate 60 and it works.
So, it seems to be some macos12 quirk.

-------------

PR: https://git.openjdk.java.net/jdk/pull/5647



More information about the client-libs-dev mailing list