-
Notifications
You must be signed in to change notification settings - Fork 145
[XWayland] libX11 SIGSEV #175
Comments
I am able to reproduce this behavior on Ubuntu 18.04 (openjdk 10.0.2) and Fedora 28 (openjdk 11-ea+22) in virtual machines. |
This is probably the expected behavior, as JavaFX only supports X11. In order to add native support for running directly on Wayland to JavaFX (and not use some sort of X11 compatibility which I believe Wayland does offer - but take that with a very large grain of salt because I know next to nothing about Wayland) all of the X11-based native code would need a new Wayland equivalent. Take, for example, |
Ah, yes. I should have been clearer in my wording. |
You may have discovered a regression in OpenJFX 11. We don't do any testing on Wayland, so it wouldn't be too surprising if something we fixed in 11 caused this regression. We can take a look at it. |
We tested it locally and can reproduce a crash (at a different place than you reported), and it looks like it's related to running using GTK3. The default backend was GTK2 for FX in JDK 10 and is GTK3 in FX 11. As a workaround, you can force GTK 2 by running:
Also, you can pass |
FYI, OpenJDK apps using the Swing stack and loading the GTK L&F for Swing do NOT crash in the same way. However OpenJDK loads GTK much later and only when running the Swing GTK L&F. So there is no direct comparison, it is just a data point. Also although it does not crash, OpenJDK - at least the one from Oracle - explicitly declares wayland mode as unsupported because of test failures in that mode. |
Thanks for your investigation! |
My guess is that it will have to be contributed by a volunteer. |
I will open a JBS bug against JavaFX for the GTK3 crash on XWayland (pointing to this GitHub issue) -- given that FX runs with GTK2 and that AWT runs with both GTK2 and GTK3, it shouldn't be too hard to reolve. As @brcolow suggested, a native Wayland port would need to be contributed by an interested volunteer. |
IIUC, Wayland is default in Ubuntu 18.02, which means there is a large userbase that will run into this. We can probably detect if the system is using wayland and in that case by default use gtk2? |
It seems |
While probably not the best workaround (removed final from a variable), PR #199 seems to fix the issue on Ubuntu 18.04 and still works on Ubuntu 16.04 |
Wayland is not the default for 18.04 (it was going to be, but they backed away from that plan). I would prefer to fix the issue, if possible, rather than masking it. Note also that changing the default will create a mismatch with Swing, so it won't work with SwingInterop. |
I stand corrected. I was worried about the impact if Wayland is the default, but that indeed doesn't seem to be the case. I updated to 18.04 and am still using Xorg. |
Tracked in JBS as JDK-8210411 |
https://bugs.openjdk.java.net/browse/JDK-8210411 is now fixed. |
I have the same problem on OpenJDK 13 on Fedora 30:
please reopen this bug |
This GitHub issue tracker is not actively tracked or managed. If you believe you have found a reoccurrence of this bug, please double-check the version of JavaFX that you are running to make sure it is a new enough version that it contains the fix for JDK-8210411. If so, please file a new bug at bugreport.java.com with a reproducible test case, the crash log, and the details of your system. |
Tinkering around with https://github.com/johanvos/javafx11samples I found that
./gradlew run
fails when run in the GNOME Wayland session on Arch Linux. I do not experience any problems when running the command in the X11 session or using the OracleJDK 10 with integrated JavaFX.I tested it with the OpenJDK 10 and the OracleJDK 11 in combination with all openjfx versions from The Central Repository (11-ea+19, 11-ea+23 and 11-ea+24). All fail with the following message:
Here is the full error report: hs_err_pid3817.log
The text was updated successfully, but these errors were encountered: