#40811 closed defect (fixed)
cairo, cairo-devel: --enable-xcb-shm breaks many gtk3 apps since gtk3 3.10
Reported by: | dbevans (David B. Evans) | Owned by: | ryandesign (Ryan Carsten Schmidt) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.2.0 |
Keywords: | haspatch | Cc: | neverpanic (Clemens Lang), jeremyhu (Jeremy Huddleston Sequoia), su-v, cooljeanius (Eric Gallager) |
Port: | cairo, cairo-devel |
Description (last modified by ryandesign (Ryan Carsten Schmidt))
After the upgrade to gtk3 3.10.0, many gtk3 apps have begun to crash with X11 protocol errors relating to the MIT SHM extension.
This has primarily been apparent in my GNOME-3 test branch but has also been observed in at least one currently committed port, gnumeric. The failures are generally in the context of image operations, particularly those involving the display of GdkPixmaps (icons, thumbnails, etc).
To reproduce the problem with gnumeric:
- start gnumeric with default spreadsheet
- select Insert->Image...
- select an image file, e.g. JPEG, in the Select an Image window
The program immediately crashes (apparently trying to display the image thumbnail) with the following on console:
(gnumeric:30071): Gdk-ERROR **: The program 'gnumeric' received an X Window System error. This probably reflects a bug in the program. The error was 'BadAccess (attempt to access private resource denied)'. (Details: serial 9061 error_code 10 request_code 132 minor_code 1) (Note to programmers: normally, X errors are reported asynchronously; that is, you will receive the error a while after causing it. To debug your program, run it with the GDK_SYNCHRONIZE environment variable to change this behavior. You can then get a meaningful backtrace from your debugger if you break on the gdk_x_error() function.) Trace/BPT trap: 5
xdpyinfo shows:
$ xdpyinfo -queryExt | grep opcode | grep 132 MIT-SHM (opcode: 132, base event: 72, base error: 132)
This problem only effects gtk+ 3.10.0 and later, versions 3.8.0 through current version 3.8.6 work fine.
Although initial testing pointed to something that had changed in gtk3, further testing shows that this is not a problem in gtk3 per se but is related to internal issues in cairo involving the use of xcb-shm functions which are enabled in the current cairo version.
Attached is a patch for cairo that fixes the immediate problem by disabling the xcb-shm functions in configure. Further investigation is probably warranted to understand why these functions are not working properly.
For details of my journey down the gtk3 rabbit hole see gtk+ bug 710319
Attachments (1)
Change History (5)
Changed 11 years ago by dbevans (David B. Evans)
Attachment: | patch-cairo.diff added |
---|
comment:2 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)
Description: | modified (diff) |
---|---|
Port: | cairo-devel added |
Resolution: | → fixed |
Status: | new → closed |
Summary: | cairo: --enable-xcb-shm breaks many gtk3 apps since gtk3 3.10 → cairo, cairo-devel: --enable-xcb-shm breaks many gtk3 apps since gtk3 3.10 |
I don't know what xcb-shm does or why we have it turned on, other than our usual desire to turn on every option possible, but since this is causing problems for gtk3, I'm fine with turning it off for now. r112351
comment:3 Changed 11 years ago by dbevans (David B. Evans)
I am continuing to pursue the root cause of the problem and if and when a more specific fix is found we can turn this back on. In the meantime, this bandaid with allow GNOME updates that have been stalled for a while to proceed. Thanks for your help.
BTW, some background on the xlib/xcb situation and possible future directions can be found in this recent thread from the Cairo list.
Proposed patch to disable xcb-shm functions