JDK-8340378 : [XWayland] FXCanvas apps and tests crash on Ubuntu 24.04
  • Type: Bug
  • Component: javafx
  • Sub-Component: other
  • Affected Version: jfx24
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • OS: linux_ubuntu
  • CPU: generic
  • Submitted: 2024-09-18
  • Updated: 2025-05-12
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdUnresolved
Related Reports
Blocks :  
Relates :  
Relates :  
Description
We have recently open-sourced new test app HelloFXCanvas under JDK-8211247 and this toy crashes when run on Ubuntu 24.04 with the Wayland display server. Follow apps/toys/HelloFXCanvas/README.txt to launch the test app.
Comments
This issue was first noted when fixing JDK-8210411 to allow JavaFX to run on Linux with the XWayland server. In that issue, the following comment was made: "While using SWT-FX interop, same issue is being found. To run SWT-FX interop, set the GDK_BACKEND=x11 in your environment (Terminal) and it should work fine." The fix for this crash will therefore be to add a call to `putenv("GDK_BACKEND=x11")` in each SWT / JavaFX interop program that uses FXCanvas when running on Linux. This includes: * HelloFXCanvas * swt unit tests See the comments in the following PR for additional info: https://github.com/openjdk/jfx/pull/1783
05-05-2025

It's crashing in libX11.so called by libglassgtk3.so, so it might be some interaction between swt and glass that is causing this bug.
11-10-2024

Here are the details of the crash. $ java @build/run.args --add-modules javafx.swt --enable-native-access=ALL-UNNAMED -cp apps/toys/HelloFXCanvas/dist/HelloFXCanvas.jar:build/libs/swt-debug.jar hellofxcanvas.HelloFXCanvas # # A fatal error has been detected by the Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x000078bc82fcbe96, pid=12025, tid=12026 # # JRE version: Java(TM) SE Runtime Environment (21.0.2+13) (build 21.0.2+13-LTS-58) # Java VM: Java HotSpot(TM) 64-Bit Server VM (21.0.2+13-LTS-58, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64) # Problematic frame: # C [libX11.so.6+0x2be96] # # Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport -p%p -s%s -c%c -d%d -P%P -u%u -g%g -- %E" (or dumping to /home/kcr/javafx/jfx-kcr/jfx/rt/core.12025) # # An error report file with more information is saved as: # /home/kcr/javafx/jfx-kcr/jfx/rt/hs_err_pid12025.log # # If you would like to submit a bug report, please visit: # https://bugreport.java.com/bugreport/crash.jsp # The crash happened outside the Java Virtual Machine in native code. # See problematic frame for where to report the bug. #
11-10-2024