Opened 11 years ago

Last modified 10 years ago

#40811 closed defect

cairo: --enable-xcb-shm breaks many gtk3 apps since gtk3 3.10 — at Initial Version

Reported by: dbevans (David B. Evans) Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.2.0
Keywords: haspatch Cc: cal@…, jeremyhu@…
Port: cairo, cairo-devel

Description

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

Change History (1)

Changed 11 years ago by dbevans (David B. Evans)

Attachment: patch-cairo.diff added

Proposed patch to disable xcb-shm functions

Note: See TracTickets for help on using tickets.