Hi,

Using a unico based GTK+3 theme like Zukitwo
(http://lassekongo83.deviantart.com/art/Zukitwo-203936861), for example
with this ~/.config/gtk-3.0/settings.ini:

---8<---

[Settings]
gtk-font-name = Sans 9
gtk-icon-theme-name = gnome
gtk-theme-name = Zukitwo
gtk-button-images = 0
gtk-menu-images = 0

---8<---

Results in the following crash:

(gdb) run
Starting program: /usr/local/bin/gtk3-demo 

Program received signal SIGSEGV, Segmentation fault.
0x0000000207aa321c in _gtk_css_number_get (number=0x1900000000, 
one_hundred_percent=600) at gtkcsstypes.c:60
60        if (number->unit == GTK_CSS_PERCENT)
(gdb) bt
#0  0x0000000207aa321c in _gtk_css_number_get (number=0x1900000000, 
one_hundred_percent=600) at gtkcsstypes.c:60
#1  0x0000000207c3889c in _gtk_rounded_box_apply_border_radius 
(box=0xfffffffffffe2f20, corner=0x20660c020, junction=GTK_JUNCTION_NONE)
    at gtkroundedbox.c:91
#2  0x00000002142e928c in draw_background (engine=0x20660c020, cr=0x2151f3800, 
x=0, y=0, width=600, height=400, hidden_side=0, junction=GTK_JUNCTION_NONE)
    at ./unico-cairo-support.c:301
#3  0x00000002142e9ca4 in unico_cairo_draw_background (engine=0x20660c020, 
cr=0x2151f3800, x=0, y=0, width=600, height=400, hidden_side=0, 
    junction=GTK_JUNCTION_NONE) at ./unico-cairo-support.c:497
#4  0x00000002142ee7ac in unico_draw_common_background (engine=0x20660c020, 
cr=0x2151f3800, x=0, y=0, width=600, height=400) at ./unico-draw.c:308
#5  0x00000002142f27dc in unico_engine_render_background (engine=0x20660c020, 
cr=0x2151f3800, x=0, y=0, width=600, height=400) at ./unico-engine.c:114
#6  0x0000000207c87dd4 in gtk_render_background (context=0x213c72120, 
cr=0x2151f3800, x=0, y=0, width=600, height=400) at gtkstylecontext.c:4007
#7  0x0000000207deea0c in gtk_window_draw (widget=0x213c64190, cr=0x2151f3800) 
at gtkwindow.c:7655
#8  0x0000000207b816d4 in _gtk_marshal_BOOLEAN__BOXEDv (closure=0x20e27a560, 
return_value=0xfffffffffffe3b30, instance=0x213c64190, 
    args=0xfffffffffffe3cc8, marshal_data=0x207dee8dc, n_params=1, 
param_types=0x2061b99f0) at gtkmarshalers.c:130
#9  0x0000000207db1b60 in gtk_widget_draw_marshallerv (closure=0x20e27a560, 
return_value=0xfffffffffffe3b30, instance=0x213c64190, args=0xfffffffffffe3cc8, 
    marshal_data=0x207dee8dc, n_params=1, param_types=0x2061b99f0) at 
gtkwidget.c:850
#10 0x0000000212894d18 in g_value_set_static_boxed () from 
/usr/local/lib/libgobject-2.0.so.3200.0
#11 0x00000002128977bc in g_closure_unref () from 
/usr/local/lib/libgobject-2.0.so.3200.0
#12 0x00000002128b0cf4 in g_signal_emit_valist () from 
/usr/local/lib/libgobject-2.0.so.3200.0
#13 0x00000002128b156c in g_signal_emit () from 
/usr/local/lib/libgobject-2.0.so.3200.0
#14 0x0000000207dbf09c in _gtk_widget_draw_internal (widget=0x213c64190, 
cr=0x2151f3800, clip_to_size=1) at gtkwidget.c:5828
#15 0x0000000207dc03f8 in gtk_widget_send_expose (widget=0x213c64190, 
event=0xfffffffffffe40d0) at gtkwidget.c:6211
#16 0x0000000207b7f008 in gtk_main_do_event (event=0xfffffffffffe40d0) at 
gtkmain.c:1621
#17 0x000000020bc9ae04 in _gdk_event_emit (event=0xfffffffffffe40d0) at 
gdkevents.c:69
#18 0x000000020bcb3900 in _gdk_window_process_updates_recurse 
(window=0x213c6c810, expose_region=0x214953800) at gdkwindow.c:3883
#19 0x000000020bd042a0 in gdk_x11_window_process_updates_recurse 
(window=0x213c6c810, region=0x214953800) at gdkwindow-x11.c:4850
#20 0x000000020bcb3de8 in gdk_window_process_updates_internal 
(window=0x213c6c810) at gdkwindow.c:4069
#21 0x000000020bcb41e0 in gdk_window_process_all_updates () at gdkwindow.c:4200
#22 0x0000000207a79324 in gtk_container_idle_sizer (data=0x0) at 
gtkcontainer.c:1664
#23 0x000000020bc89204 in gdk_threads_dispatch (data=0x214992c20) at gdk.c:763
#24 0x0000000212f3b4e0 in g_source_is_destroyed () from 
/usr/local/lib/libglib-2.0.so.3200.0
#25 0x0000000212f3b4e0 in g_source_is_destroyed () from 
/usr/local/lib/libglib-2.0.so.3200.0

This is caused by discrepancies between the unico engine and gtk itself,
since something has changed at some point (maybe after 3.4, dunno)...

The diff below fixes it. OK?

cheers!
david

Index: Makefile
===================================================================
RCS file: /cvs/ports/x11/gtk3-unico-engine/Makefile,v
retrieving revision 1.2
diff -u -p -r1.2 Makefile
--- Makefile    1 Apr 2012 09:16:49 -0000       1.2
+++ Makefile    8 Jun 2012 13:55:27 -0000
@@ -7,6 +7,7 @@ COMMENT=        Unico GTK+3 engine
 V=             1.0.2
 DISTNAME=      unico-${V}
 PKGNAME=       gtk3-unico-engine-${V}
+REVISION=      0
 
 CATEGORIES=    x11
 
Index: patches/patch-unico_gtkroundedbox_c
===================================================================
RCS file: patches/patch-unico_gtkroundedbox_c
diff -N patches/patch-unico_gtkroundedbox_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-unico_gtkroundedbox_c 8 Jun 2012 13:55:27 -0000
@@ -0,0 +1,12 @@
+$OpenBSD$
+--- unico/gtkroundedbox.c.orig Fri Jun  8 15:19:37 2012
++++ unico/gtkroundedbox.c      Fri Jun  8 15:20:30 2012
+@@ -85,7 +85,7 @@ gtk_rounded_box_clamp_border_radius (GtkRoundedBox *bo
+ }
+ 
+ void
+-_gtk_rounded_box_apply_border_radius (GtkRoundedBox    *box,
++_gtk_rounded_box_apply_border_radius_for_engine (GtkRoundedBox    *box,
+                                       GtkThemingEngine *engine,
+                                       GtkStateFlags     state,
+                                       GtkJunctionSides  junction)
Index: patches/patch-unico_gtkroundedboxprivate_h
===================================================================
RCS file: patches/patch-unico_gtkroundedboxprivate_h
diff -N patches/patch-unico_gtkroundedboxprivate_h
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-unico_gtkroundedboxprivate_h  8 Jun 2012 13:55:27 -0000
@@ -0,0 +1,12 @@
+$OpenBSD$
+--- unico/gtkroundedboxprivate.h.orig  Thu Mar 29 16:26:20 2012
++++ unico/gtkroundedboxprivate.h       Fri Jun  8 15:23:18 2012
+@@ -49,7 +49,7 @@ void            _gtk_rounded_box_init_rect            
+                                                                  gdouble      
        width,
+                                                                  gdouble      
        height);
+ 
+-void            _gtk_rounded_box_apply_border_radius            
(GtkRoundedBox       *box,
++void            _gtk_rounded_box_apply_border_radius_for_engine 
(GtkRoundedBox       *box,
+                                                                  
GtkThemingEngine    *engine,
+                                                                  
GtkStateFlags        state,
+                                                                  
GtkJunctionSides     junction);
Index: patches/patch-unico_unico-cairo-support_c
===================================================================
RCS file: patches/patch-unico_unico-cairo-support_c
diff -N patches/patch-unico_unico-cairo-support_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-unico_unico-cairo-support_c   8 Jun 2012 13:55:27 -0000
@@ -0,0 +1,57 @@
+$OpenBSD$
+--- unico/unico-cairo-support.c.orig   Fri Jun  8 15:19:53 2012
++++ unico/unico-cairo-support.c        Fri Jun  8 15:20:50 2012
+@@ -298,7 +298,7 @@ draw_background (GtkThemingEngine *engine,
+ 
+   /* create the path to fill */
+   _gtk_rounded_box_init_rect (&border_box, 0, 0, width, height);
+-  _gtk_rounded_box_apply_border_radius (&border_box, engine, state, junction);
++  _gtk_rounded_box_apply_border_radius_for_engine (&border_box, engine, 
state, junction);
+   _gtk_rounded_box_shrink (&border_box, border.top, border.right, 
border.bottom, border.left);
+   _gtk_rounded_box_path (&border_box, cr);
+ 
+@@ -361,7 +361,7 @@ draw_glow (GtkThemingEngine *engine,
+ 
+   /* create the path to clip */
+   _gtk_rounded_box_init_rect (&border_box, 0, 0, width, height);
+-  _gtk_rounded_box_apply_border_radius (&border_box, engine, state, junction);
++  _gtk_rounded_box_apply_border_radius_for_engine (&border_box, engine, 
state, junction);
+   _gtk_rounded_box_shrink (&border_box, border.top, border.right, 
border.bottom, border.left);
+   _gtk_rounded_box_path (&border_box, cr);
+ 
+@@ -451,7 +451,7 @@ draw_texture (GtkThemingEngine *engine,
+ 
+       /* create the path to fill */
+       _gtk_rounded_box_init_rect (&border_box, 0, 0, width, height);
+-      _gtk_rounded_box_apply_border_radius (&border_box, engine, state, 
junction);
++      _gtk_rounded_box_apply_border_radius_for_engine (&border_box, engine, 
state, junction);
+       _gtk_rounded_box_shrink (&border_box, border.top, border.right, 
border.bottom, border.left);
+       _gtk_rounded_box_path (&border_box, cr);
+ 
+@@ -788,7 +788,7 @@ draw_border (GtkThemingEngine *engine,
+ 
+   /* create the path to fill */
+   _gtk_rounded_box_init_rect (&border_box, 0, 0, width, height);
+-  _gtk_rounded_box_apply_border_radius (&border_box, engine, state, junction);
++  _gtk_rounded_box_apply_border_radius_for_engine (&border_box, engine, 
state, junction);
+   padding_box = border_box;
+   _gtk_rounded_box_shrink (&padding_box, border.top, border.right, 
border.bottom, border.left);
+ 
+@@ -922,7 +922,7 @@ draw_inner_stroke (GtkThemingEngine *engine,
+ 
+   /* create the path to fill */
+   _gtk_rounded_box_init_rect (&border_box, 0, 0, width, height);
+-  _gtk_rounded_box_apply_border_radius (&border_box, engine, state, junction);
++  _gtk_rounded_box_apply_border_radius_for_engine (&border_box, engine, 
state, junction);
+   padding_box = border_box;
+   _gtk_rounded_box_shrink (&padding_box, inner_border->top,
+                                          inner_border->right,
+@@ -1052,7 +1052,7 @@ draw_outer_stroke (GtkThemingEngine *engine,
+ 
+   /* create the path to fill */
+   _gtk_rounded_box_init_rect (&border_box, 0, 0, width, height);
+-  _gtk_rounded_box_apply_border_radius (&border_box, engine, state, junction);
++  _gtk_rounded_box_apply_border_radius_for_engine (&border_box, engine, 
state, junction);
+   padding_box = border_box;
+   _gtk_rounded_box_shrink (&padding_box, outer_border->top,
+                                          outer_border->right,

Reply via email to