Bug 1667675
| Summary: | The program 'java' received an X Window System error | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Gabriele Pohl <contact> |
| Component: | openjfx | Assignee: | Nicolas De Amicis <deamicis> |
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 29 | CC: | ahughes, contact, dbhole, deamicis, hegjon, jerboaa, jvanek, mat.booth, msrb, mvala, omajid, sgehwolf |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | openjfx-8.0.202-5.b07.fc28 openjfx-8.0.202-5.b07.fc29 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2019-02-19 05:53:37 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Gabriele Pohl
2019-01-19 17:38:49 UTC
(In reply to Gabriele Pohl from comment #0) > Additional info: > > I informed the MediathekView developers at github about the issue: > https://github.com/mediathekview/MediathekView/issues/405 > > Comment from another fedora bugreport: > > https://bugzilla.redhat.com/show_bug.cgi?id=1657636 > > "For the segfaults with MediathekView, please fill a new bug report. I'm > investigating on that and it seems that is libglassgtk2.so the source of the > problem. There is a bug when JavaFX and Swing are mixed, I see also these > segfaults with javafx apps launched with icedtea-web (javaws)" Based on those comments this seems an OpenJFX 8 issue. Re-assigning component. I prepare a new build 8.0.202b07 for the package openjfx which introduces the official support of GTK3 (adding libglassgtk3.so). I'm testing MediathekView with this build.
If I run the app with java -jar MediathekView.jar the app crashes.
The detailed dump is
Program terminated with signal SIGTRAP, Trace/breakpoint trap.
#0 0x00007fb231fcc1e5 in _g_log_abort (breakpoint=1) at gmessages.c:554
554 G_BREAKPOINT ();
[Current thread is 1 (Thread 0x7fb23cba4700 (LWP 28373))]
(gdb) bt
#0 0x00007fb231fcc1e5 in _g_log_abort (breakpoint=1) at gmessages.c:554
#1 0x00007fb231fcd2b1 in g_log_default_handler
(log_domain=log_domain@entry=0x7fb2324f8106 "Gdk", log_level=log_level@entry=6, message=message@entry=0x7fb1e4028690 "The program 'java' received an X Window System error.\nThis probably reflects a bug in the program.\nThe error was 'BadWindow (invalid Window parameter)'.\n (Details: serial 34069 error_code 3 request_c"..., unused_data=unused_data@entry=0x0) at gmessages.c:3111
#2 0x00007fb231fcd4ff in g_logv (log_domain=0x7fb2324f8106 "Gdk", log_level=G_LOG_LEVEL_ERROR, format=<optimized out>, args=args@entry=0x7fb23cba2f90) at gmessages.c:1350
#3 0x00007fb231fcd6f3 in g_log (log_domain=log_domain@entry=0x7fb2324f8106 "Gdk", log_level=log_level@entry=G_LOG_LEVEL_ERROR, format=format@entry=0x7fb232516d14 "%s") at gmessages.c:1413
#4 0x00007fb2324e048d in gdk_x_error (display=<optimized out>, error=<optimized out>) at gdkmain-x11.c:486
#5 0x00007fb23d801402 in _XError (dpy=dpy@entry=0x7fb254721f60, rep=rep@entry=0x7fb1e4008cb0) at XlibInt.c:1444
#6 0x00007fb23d7fe297 in handle_error (dpy=dpy@entry=0x7fb254721f60, err=0x7fb1e4008cb0, in_XReply=in_XReply@entry=1) at xcb_io.c:199
#7 0x00007fb23d7ff493 in _XReply (dpy=dpy@entry=0x7fb254721f60, rep=rep@entry=0x7fb23cba32b0, extra=extra@entry=0, discard=discard@entry=0) at xcb_io.c:708
#8 0x00007fb23d7e4c39 in XGetWindowProperty
(dpy=0x7fb254721f60, w=73400630, property=508, offset=0, length=1, delete=0, req_type=0, actual_type=0x7fb1dc55e260, actual_format=0x7fb1dc468600, nitems=0x7fb1e4003800, bytesafter=0x7fb1e4008630, prop=0x7fb1e40035a0) at GetProp.c:69
#9 0x00007fb24540c206 in ()
#10 0x0000000000000000 in ()
I'm not an expert with gdb, but I think there is an inappropriate argument passed to the function XGetWindowProperty?
If I try to start with the new vm args: java -Djdk.gtk.verbose=true -Djdk.gtk.version=3 -jar MediathekView.jar, the application works well on GTK3, that's why I think it's a gtk2 or libglassgtk2.so bug.
I made a last test with the official Oracle jdk8u202 and the application run correctly but if I replace the libglassgtk2.so from Oracle with that of Fedora libglassgtk2.so the application crashes.
I don't see anything that could cause a problem in our patch files
Gabriele, does Nicolas' solution work for you? I.e.: $ java -Djdk.gtk.verbose=true -Djdk.gtk.version=3 -jar MediathekView.jar If so I propose that you contact the MediathekView people and letting them know -- perhaps they can update their documentation or even change their product to try GTK3 first and use it if available. Everything should be using GTK3 by default these days anyway IMO. Mat, Nicolas' solution is based on a new build of openjfx.. I don't have this component therefore it's not a solution for my Fedora 29 standard distribution as libglassgtk3 is missing there: $ java -Djdk.gtk.verbose=true -Djdk.gtk.version=3 -jar MediathekView.jar ... Exception in thread "AWT-EventQueue-0" java.lang.RuntimeException: java.lang.UnsatisfiedLinkError: Can't load library: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b13-0.fc29.x86_64/jre/lib/amd64/libglassgtk3.so at com.sun.javafx.tk.quantum.QuantumToolkit.startup(QuantumToolkit.java:267) at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:211) at javafx.embed.swing.JFXPanel.lambda$initFx$2(JFXPanel.java:232) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.UnsatisfiedLinkError: Can't load library: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b13-0.fc29.x86_64/jre/lib/amd64/libglassgtk3.so at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1827) at java.lang.Runtime.load0(Runtime.java:809) at java.lang.System.load(System.java:1086) at com.sun.glass.utils.NativeLibLoader.loadLibraryFullPath(NativeLibLoader.java:201) at com.sun.glass.utils.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:94) at com.sun.glass.utils.NativeLibLoader.loadLibrary(NativeLibLoader.java:39) at com.sun.glass.ui.gtk.GtkApplication.lambda$new$5(GtkApplication.java:156) at java.security.AccessController.doPrivileged(Native Method) at com.sun.glass.ui.gtk.GtkApplication.<init>(GtkApplication.java:140) at com.sun.glass.ui.gtk.GtkPlatformFactory.createApplication(GtkPlatformFactory.java:41) at com.sun.glass.ui.Application.run(Application.java:146) at com.sun.javafx.tk.quantum.QuantumToolkit.startup(QuantumToolkit.java:257) ... 3 more I am willing to test when you instruct me how to get the needed environment. I made some other tests and it appears that if I compile openjfx with the (current) gradle.properties, in "DebugNative", I have a crash with libglassgtk2.so: cat > gradle.properties << EOF COMPILE_WEBKIT = false COMPILE_MEDIA = false BUILD_JAVADOC = true BUILD_SRC_ZIP = true GRADLE_VERSION_CHECK = false CONF = DebugNative EOF but, if I compile in "Debug" or "Release", I have no problem with libglassgtk2.so: COMPILE_WEBKIT = false COMPILE_MEDIA = false BUILD_JAVADOC = true BUILD_SRC_ZIP = true GRADLE_VERSION_CHECK = false CONF = Release EOF I don't understand the link between that, I still analyzing the gradle script. I found the problem!
It's located in modules/graphics/src/main/native-glass/gtk/GlassApplication.cpp at line 189:
The flag VERBOSE is defined in Debug or DebugNative, the function gdk_error_trap_push will be called and then we have our X error.
...
// GTK installs its own X error handler that conflicts with AWT.
// During drag and drop, AWT hides errors so we need to hide them
// to avoid exit()'ing. It's not clear that we don't want to hide
// X error all the time, otherwise FX will exit().
//
// A better solution would be to coordinate with AWT and save and
// restore the X handler.
// Disable X error handling
#ifndef VERBOSE
if (!noErrorTrap) {
gdk_error_trap_push();
}
#endif
gtk_main();
...
The problem was reported to openjdk (in jdk 7) with these bugs: RT-21408 and RT-20756. The comment in relation is "When the last JFrame closes and DISPOSE_ON_CLOSE is specified, Java exits with an X error. X error are hidden during the FX event loop and should be restored when the event loop exits. Unfortunately, this is too early. The fix is to never restore X errors."
I will prepare a new build for correcting this issue but I'm waiting on the next release of openjdk-1.8.0 for adding the new symlink on libglassgtk3.so
Feel free to test the CI build https://koji.fedoraproject.org/koji/buildinfo?buildID=1205926 Great! Nicolas :) It works with the new version. Thanks a lot! Thanks for the work you are doing on keeping this package in good condition, Nicolas :-) openjfx-8.0.202-5.b07.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-9a53d59e9f openjfx-8.0.202-5.b07.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2019-475ba1ff79 openjfx-8.0.202-5.b07.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-475ba1ff79 openjfx-8.0.202-5.b07.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-9a53d59e9f openjfx-8.0.202-5.b07.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report. openjfx-8.0.202-5.b07.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report. openjfx-8.0.202-5.b07.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report. |