[MacPorts] #40811: cairo, cairo-devel: --enable-xcb-shm breaks many gtk3 apps since gtk3 3.10 (was: cairo: --enable-xcb-shm breaks many gtk3 apps since gtk3 3.10)

MacPorts noreply at macports.org
Sun Oct 20 13:13:55 PDT 2013


#40811: cairo, cairo-devel: --enable-xcb-shm breaks many gtk3 apps since gtk3 3.10
---------------------------------+--------------------------
  Reporter:  devans@…            |      Owner:  ryandesign@…
      Type:  defect              |     Status:  closed
  Priority:  Normal              |  Milestone:
 Component:  ports               |    Version:  2.2.0
Resolution:  fixed               |   Keywords:  haspatch
      Port:  cairo, cairo-devel  |
---------------------------------+--------------------------
Changes (by ryandesign@…):

 * status:  new => closed
 * resolution:   => fixed
 * port:  cairo => cairo, cairo-devel


Old 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
> [https://bugzilla.gnome.org/show_bug.cgi?id=710319 gtk+ bug 710319]

New 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
 [https://bugzilla.gnome.org/show_bug.cgi?id=710319 gtk+ bug 710319]

--

Comment:

 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

-- 
Ticket URL: <https://trac.macports.org/ticket/40811#comment:2>
MacPorts <http://www.macports.org/>
Ports system for OS X


More information about the macports-tickets mailing list