RFR: 8335469: [XWayland] crash when an AWT ScreenCast session overlaps with an FX ScreenCast session [v2]
Kevin Rushforth
kcr at openjdk.org
Mon Nov 18 19:51:44 UTC 2024
On Sat, 16 Nov 2024 20:37:58 GMT, Alexander Zvegintsev <azvegint at openjdk.org> wrote:
> > I can't reproduce the crash without this fix on my system, but since it does happen on some systems, it does need to be fixed.
>
> Just to be on the same page, it still crashes for me (at least on Ubuntu 22.04) as expected for the following scenarios:
>
> 1. Do one of the following
>
> 1. Build the JDK's [/jdk/pull/22131](https://github.com/openjdk/jdk/pull/22131) full changeset + take some JFX build without this PR(aka any random JFX build).
Yes, this is what I was running: a locally-built JDK with the complete patch from JDK PR 22131 + FX 24-ea without your FX fix from this PR.
On Ubuntu 24.04 the test hung, but did not crash. Today, when I ran it on an Ubuntu 22.04 VM I was able to reproduce the crash one time (and it hung two other times, so it appears that whether or not it will crash is intermittent).
> 2. Build the JDK with only an [a. part](https://github.com/openjdk/jdk/pull/22131#a-part) + JFX build with this PR
I did not try this. What I did try is a JDK 23 without any part of your JDK fix + FX with the patch from this PR. That hangs, but does not crash.
Anyway, all looks good to me.
>> tests/system/src/test/java/test/robot/javafx/embed/swing/LinuxScreencastHangCrashTest.java line 72:
>>
>>> 70: private static void awtPixelOnFxThread() throws InterruptedException {
>>> 71: System.out.println("awtPixelOnFxThread");
>>> 72: initFX();
>>
>> Have you considered moving the `initFX()` call to the `init` method (after the call to AWT robot) so you only need it in one place?
>
> It is intentionally kept out of the `init()` method to be able to test the
>
>> 1. If there is no GTK main loop running
> Example: just a JDK only application.
> In this case we call g_main_context_iteration(NULL, TRUE) as before (when [gtk_main_level() == 0](https://docs.gtk.org/gtk3/func.main_level.html)).
>
> like
>
>
> awtPixel();
> robot.delay(DELAY_WAIT_FOR_SESSION_TO_CLOSE);
>
> initFX();
> robot.delay(500);
> awtPixel();
OK
-------------
PR Comment: https://git.openjdk.org/jfx/pull/1639#issuecomment-2483955713
PR Review Comment: https://git.openjdk.org/jfx/pull/1639#discussion_r1847158672
More information about the openjfx-dev
mailing list