From owner-freebsd-gnome@FreeBSD.ORG Mon Aug 19 10:12:41 2013 Return-Path: Delivered-To: gnome@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 4F728E94; Mon, 19 Aug 2013 10:12:41 +0000 (UTC) (envelope-from romain@blogreen.org) Received: from marvin.blogreen.org (marvin.blogreen.org [IPv6:2001:470:1f13:b9c::2]) by mx1.freebsd.org (Postfix) with ESMTP id 9E80C21A6; Mon, 19 Aug 2013 10:12:40 +0000 (UTC) Received: by marvin.blogreen.org (Postfix, from userid 1001) id 328786111D; Mon, 19 Aug 2013 12:12:31 +0200 (CEST) Date: Mon, 19 Aug 2013 12:12:31 +0200 From: Romain =?iso-8859-1?Q?Tarti=E8re?= To: bug-followup@FreeBSD.org, dog@virtual.org.ua Subject: Re: ports/181095: net-p2p/transmission-gtk fails to start Message-ID: <20130819101230.GA60497@blogreen.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="17pEHd4RhPHOinZp" Content-Disposition: inline X-PGP-Key: http://romain.blogreen.org/pubkey.asc User-Agent: Mutt/1.5.21 (2010-09-15) Cc: gnome@FreeBSD.org X-BeenThere: freebsd-gnome@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: GNOME for FreeBSD -- porting and maintaining List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Aug 2013 10:12:41 -0000 --17pEHd4RhPHOinZp Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! I can reproduce this: any GTK3 application crash when attempting to display a tray icon (I use stalonetray, can't tell if another notification icon bar will also fail). If I stop stalonetray, audacious and transmission will start. If the application is configured to not display a status icon, no crash occurs when a status area is available. GTK2 applications are unaffected. gdb session of a transmission-gtk crash (ports updated a couple days ago): ------------------------------------------------------------------------ GNU gdb (GDB) 7.6 [GDB v7.6 for FreeBSD] Copyright (C) 2013 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-portbld-freebsd9.1". For bug reporting instructions, please see: ... Reading symbols from /usr/local/bin/transmission-gtk...done. (gdb) r Starting program: /usr/local/bin/transmission-gtk=20 [New LWP 101300] [New Thread 80b807400 (LWP 101300)] [New Thread 80baa8800 (LWP 101407)] [New Thread 80bbd2000 (LWP 101408)] [New Thread 80bb41400 (LWP 101409)] [New Thread 80e497400 (LWP 101410)] [New Thread 80de33c00 (LWP 101411)] Assertion failed: (! _cairo_surface_has_mime_data (surface)), function cair= o_surface_mark_dirty_rectangle, file cairo-surface.c, line 1174. Program received signal SIGABRT, Aborted. [Switching to Thread 80b807400 (LWP 101300)] 0x000000080777f23c in thr_kill () from /lib/libc.so.7 (gdb) bt #0 0x000000080777f23c in thr_kill () from /lib/libc.so.7 #1 0x000000080782363b in abort () from /lib/libc.so.7 #2 0x0000000807806d35 in __assert () from /lib/libc.so.7 #3 0x000000080233f6ab in *INT_cairo_surface_mark_dirty_rectangle (surface= =3D0x80bab7300, x=3D0, y=3D0, width=3D24, height=3D24) at cairo-surface.c:1= 174 #4 0x0000000800d3051b in gtk_tray_icon_draw (widget=3D0x80d7c8000, cr=3D0x= 8025dc400 <_context_stash>) at gtktrayicon-x11.c:378 #5 0x0000000800b365a2 in _gtk_marshal_BOOLEAN__BOXEDv (closure=3D0x80b9250= 60, return_value=3D0x7fffffffc5e0, instance=3D0x80d7c8000, args=3D0x7ffffff= fc780,=20 marshal_data=3D0x800d303e0 , n_params=3D1, param_ty= pes=3D0x80b819190) at gtkmarshalers.c:130 #6 0x0000000800cd050a in gtk_widget_draw_marshallerv (closure=3D0x80b92506= 0, return_value=3D0x7fffffffc5e0, instance=3D0x80d7c8000, args=3D0x7fffffff= c780,=20 marshal_data=3D0x800d303e0 , n_params=3D1, param_ty= pes=3D0x80b819190) at gtkwidget.c:906 #7 0x0000000804cf8486 in g_type_class_meta_marshalv (closure=3D0x80b925060= , return_value=3D0x7fffffffc5e0, instance=3D0x80d7c8000, args=3D0x7fffffffc= 780, marshal_data=3D0x120,=20 n_params=3D1, param_types=3D0x80b819190) at gclosure.c:997 #8 0x0000000804cf7fb2 in _g_closure_invoke_va (closure=3D0x80b925060, retu= rn_value=3D0x7fffffffc5e0, instance=3D0x80d7c8000, args=3D0x7fffffffc780, n= _params=3D1, param_types=3D0x80b819190) at gclosure.c:840 #9 0x0000000804d14b09 in g_signal_emit_valist (instance=3D0x80d7c8000, sig= nal_id=3D20, detail=3D0, var_args=3D0x7fffffffc780) at gsignal.c:3234 #10 0x0000000804d15f89 in g_signal_emit (instance=3D0x80d7c8000, signal_id= =3D20, detail=3D0) at gsignal.c:3384 #11 0x0000000800cd9e51 in _gtk_widget_draw_internal (widget=3D0x80d7c8000, = cr=3D0x8025dc400 <_context_stash>, clip_to_size=3D1) at gtkwidget.c:6165 #12 0x0000000800cdaaaa in gtk_widget_send_expose (widget=3D0x80d7c8000, eve= nt=3D0x7fffffffca10) at gtkwidget.c:6545 #13 0x0000000800b34b15 in gtk_main_do_event (event=3D0x7fffffffca10) at gtk= main.c:1631 #14 0x0000000801134d3c in _gdk_event_emit (event=3D0x7fffffffca10) at gdkev= ents.c:69 #15 0x0000000801147f79 in _gdk_window_process_updates_recurse (window=3D0x8= 0d443d10, expose_region=3D0x80d6154a0) at gdkwindow.c:4006 #16 0x000000080118ab2d in gdk_x11_window_process_updates_recurse (window=3D= 0x80d443d10, region=3D0x80d6154a0) at gdkwindow-x11.c:5203 #17 0x0000000801148324 in gdk_window_process_updates_internal (window=3D0x8= 0d443d10) at gdkwindow.c:4194 #18 0x0000000801148722 in gdk_window_process_updates_with_mode (window=3D0x= 80d443d10, recurse_mode=3D2) at gdkwindow.c:4374 #19 0x0000000801153c43 in gdk_window_paint_on_clock (clock=3D0x80d43ebc0, d= ata=3D0x80d443d10) at gdkwindow.c:11626 #20 0x0000000804cfaf66 in g_cclosure_marshal_VOID__VOIDv (closure=3D0x80d5c= fcb0, return_value=3D0x0, instance=3D0x80d43ebc0, args=3D0x7fffffffd120, ma= rshal_data=3D0x0, n_params=3D0,=20 param_types=3D0x0) at gmarshal.c:115 #21 0x0000000804cf7fb2 in _g_closure_invoke_va (closure=3D0x80d5cfcb0, retu= rn_value=3D0x0, instance=3D0x80d43ebc0, args=3D0x7fffffffd120, n_params=3D0= , param_types=3D0x0) at gclosure.c:840 #22 0x0000000804d14b09 in g_signal_emit_valist (instance=3D0x80d43ebc0, sig= nal_id=3D140, detail=3D0, var_args=3D0x7fffffffd120) at gsignal.c:3234 #23 0x0000000804d16137 in g_signal_emit_by_name (instance=3D0x80d43ebc0, de= tailed_signal=3D0x801191efa "paint") at gsignal.c:3424 #24 0x000000080113c533 in gdk_frame_clock_paint_idle (data=3D0x80d43ebc0) a= t gdkframeclockidle.c:419 #25 0x0000000801129662 in gdk_threads_dispatch (data=3D0x80bb9f6a0) at gdk.= c:788 #26 0x00000008055a9973 in g_timeout_dispatch (source=3D0x80d77e8d0, callbac= k=3D0x801129620 , user_data=3D0x80bb9f6a0) at gmain.c= :4413 #27 0x00000008055a7c6a in g_main_dispatch (context=3D0x80b92eb40) at gmain.= c:3054 #28 0x00000008055a895d in g_main_context_dispatch (context=3D0x80b92eb40) a= t gmain.c:3630 #29 0x00000008055a8b1d in g_main_context_iterate (context=3D0x80b92eb40, bl= ock=3D1, dispatch=3D1, self=3D0x80bb51200) at gmain.c:3701 #30 0x00000008055a8be1 in g_main_context_iteration (context=3D0x80b92eb40, = may_block=3D1) at gmain.c:3762 #31 0x0000000804a098ee in g_application_run (application=3D0x80b8ae170, arg= c=3D1, argv=3D0x7fffffffd750) at gapplication.c:1623 #32 0x00000000004358da in main (argc=3D1, argv=3D0x7fffffffd750) at main.c:= 659 (gdb) f 3 #3 0x000000080233f6ab in *INT_cairo_surface_mark_dirty_rectangle (surface= =3D0x80bab7300, x=3D0, y=3D0, width=3D24, height=3D24) at cairo-surface.c:1= 174 1174 assert (! _cairo_surface_has_mime_data (surface)); (gdb) l 1169=09 1170 /* The application *should* have called cairo_surface_flush() befo= re 1171 * modifying the surface independently of cairo (and thus having to 1172 * call mark_dirty()). */ 1173 assert (! _cairo_surface_has_snapshots (surface)); 1174 assert (! _cairo_surface_has_mime_data (surface)); 1175=09 1176 surface->is_clear =3D FALSE; 1177=09 1178 if (surface->backend->mark_dirty_rectangle !=3D NULL) { (gdb) f 4 #4 0x0000000800d3051b in gtk_tray_icon_draw (widget=3D0x80d7c8000, cr=3D0x= 8025dc400 <_context_stash>) at gtktrayicon-x11.c:378 378 cairo_surface_mark_dirty_rectangle (target,=20 (gdb) l 373 XClearArea (GDK_WINDOW_XDISPLAY (window), 374 GDK_WINDOW_XID (window), 375 clip.x, clip.y, 376 clip.width, clip.height, 377 False); 378 cairo_surface_mark_dirty_rectangle (target,=20 379 clip.x, clip.y, 380 clip.width, clip.height); 381 } 382 } (gdb)=20 ------------------------------------------------------------------------ Porking with surface->mime_data if frame #3 before the assertions allows transmission to start: ------------------------------------------------------------------------ Breakpoint 1, *INT_cairo_surface_mark_dirty_rectangle (surface=3D0x80bab730= 0, x=3D0, y=3D0, width=3D24, height=3D24) at cairo-surface.c:1174 1174 assert (! _cairo_surface_has_mime_data (surface)); (gdb) l 1169=09 1170 /* The application *should* have called cairo_surface_flush() befo= re 1171 * modifying the surface independently of cairo (and thus having to 1172 * call mark_dirty()). */ 1173 assert (! _cairo_surface_has_snapshots (surface)); 1174 assert (! _cairo_surface_has_mime_data (surface)); 1175=09 1176 surface->is_clear =3D FALSE; 1177=09 1178 if (surface->backend->mark_dirty_rectangle !=3D NULL) { (gdb) p surface $1 =3D (cairo_surface_t *) 0x80bab7300 (gdb) p *surface $2 =3D {backend =3D 0x8025daae0 , device =3D 0x= 80d63e5c0, type =3D CAIRO_SURFACE_TYPE_XLIB, content =3D CAIRO_CONTENT_COLO= R, ref_count =3D {ref_count =3D 4},=20 status =3D CAIRO_STATUS_SUCCESS, unique_id =3D 34, finished =3D 0, is_cle= ar =3D 0, has_font_options =3D 0, owns_device =3D 1, user_data =3D {size = =3D 2, num_elements =3D 2, element_size =3D 24,=20 elements =3D 0x80d7d04b8, is_snapshot =3D 0}, mime_data =3D {size =3D 1= , num_elements =3D 1, element_size =3D 24, elements =3D 0x80d7d04e8, is_sna= pshot =3D 0}, device_transform =3D {xx =3D 1,=20 yx =3D 0, xy =3D 0, yy =3D 1, x0 =3D 0, y0 =3D 0}, device_transform_inv= erse =3D {xx =3D 1, yx =3D 0, xy =3D 0, yy =3D 1, x0 =3D 0, y0 =3D 0}, devi= ce_transform_observers =3D { next =3D 0x8025dc6a0 <_context_stash+672>, prev =3D 0x8025dc508 <_conte= xt_stash+264>}, x_resolution =3D 72, y_resolution =3D 72, x_fallback_resolu= tion =3D 300,=20 y_fallback_resolution =3D 300, snapshot_of =3D 0x0, snapshot_detach =3D 0= x0, snapshots =3D {next =3D 0x80bab7408, prev =3D 0x80bab7408}, snapshot = =3D {next =3D 0x0, prev =3D 0x0},=20 font_options =3D {antialias =3D CAIRO_ANTIALIAS_DEFAULT, subpixel_order = =3D CAIRO_SUBPIXEL_ORDER_DEFAULT, lcd_filter =3D CAIRO_LCD_FILTER_DEFAULT,= =20 hint_style =3D CAIRO_HINT_STYLE_DEFAULT, hint_metrics =3D CAIRO_HINT_ME= TRICS_DEFAULT}} (gdb) p surface->mime_data $3 =3D {size =3D 1, num_elements =3D 1, element_size =3D 24, elements =3D 0= x80d7d04e8, is_snapshot =3D 0} (gdb) set surface->mime_data.size =3D 0 (gdb) set surface->mime_data.num_elements =3D 0 (gdb) set surface->mime_data.element_size =3D 0 (gdb) set surface->mime_data.elements =3D 0 (gdb) set surface->mime_data.is_snapshot =3D 0 (gdb) c Continuing. [New Thread 813c54c00 (LWP 101546)] [New Thread 813c55000 (LWP 101547)] [New Thread 813c55400 (LWP 101548)] [New Thread 813c55800 (LWP 101549)] [New Thread 813c55c00 (LWP 101550)] [New Thread 813c56000 (LWP 101551)] [New Thread 813c56400 (LWP 101552)] [New Thread 813c56800 (LWP 101553)] [New Thread 813c56c00 (LWP 101554)] [New Thread 813c57000 (LWP 101555)] [...] ------------------------------------------------------------------------ It looks like the surface has some unattended mime_data attached to it that cause the assertion failure. Since cairo was not updated recently, it might be a change introduced in the update of gtk30 to 3.8. I failed at finding some decent cairo API function to fix this properly in x11-toolkits/gtk30, but an ugly patch into cairo do the trick and allows audacious and transmission-gtk to display status icons: ------------------------------------------------------------------------ --- src/cairo-surface.c.orig +++ src/cairo-surface.c @@ -1171,6 +1171,10 @@ * modifying the surface independently of cairo (and thus having to * call mark_dirty()). */ assert (! _cairo_surface_has_snapshots (surface)); + + if (_cairo_surface_has_mime_data (surface)) + _cairo_surface_detach_mime_data (surface); + assert (! _cairo_surface_has_mime_data (surface)); =20 surface->is_clear =3D FALSE; ------------------------------------------------------------------------ Maybe gnome@ (in Cc:) has more insights into this issue related to cairo and gtk3 and help in fixing this issue. Regards, Romain --=20 Romain Tarti=E8re http://people.FreeBSD.org/~romain/ pgp: 8234 9A78 E7C0 B807 0B59 80FF BA4D 1D95 5112 336F (ID: 0x5112336F) (plain text =3Dnon-HTML=3D PGP/GPG encrypted/signed e-mail much appreciated) --17pEHd4RhPHOinZp Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (FreeBSD) iQGcBAEBAgAGBQJSEe+OAAoJELpNHZVREjNv03kL+weoPeguLpOazjnVz2HPigh0 6R/TNvv+9+IPa7hTZ6hY6IegftF2JB5ZEnZLdP7iW+5OFG7lzP7Res9zt1JUyxYO 0Mqd+LZpLszRA37+yCwdldqHWp7U+XDfurODZmhcTvc+AlBw+43ueQXF2ka2p0cm XcXVbUe3Ag5w6CkDyy5thoKZlVZW3Wl2Bp9eVtWP6YEBmk0twAHV0mqKYnC7wyDq dM61KT43GZg0eOgCyGmNITaVKShXjzMBvaAibSCiav5X8IlJK2v0iPn8T8mTdhLl L6y9irpkpDzQm2dVpFLPSXB778f0iXPwwfUzVl2rhhZX2wwwhj84wEQVHmZzE/Qz UbfHrZEltru6teiBoyEvZXS3P92PnNH0dH7tau8Gnj4QrmBqWwgNB8Qk24w6jwDq 2Zo7Tc4WRyYmggM34v4fFw/UZt3gTTg3eI8QEUpvXknzt1mpjGMtk/US3hbc6Xy7 EUTlv+7tJjMqCUvc2eMhPBfrkMXsNdXstXFb0inDag== =IqCA -----END PGP SIGNATURE----- --17pEHd4RhPHOinZp--