BUG segfault in Gdk::Pixbuf

Hi,

sometimes

pixbuf = Gdk::Pixbuf.new path_to_my_svg, size

segfaults. The code in my special case is:

icon_size = *Gtk::IconSize.lookup (Gtk::IconSize::SMALL_TOOLBAR)
pixbuf = Gdk::Pixbuf.new PIXMAP_PATH + ‘/’ + item +‘.svg’, icon_size

I know, that the code is wrong, but it should not lead to a segmentation
fault.

Here is the GDB backtrace:

(gdb) bt
#0 0x0e75f09c in initialize (argc=, argv=, self=1211822976) at rbgdk-pixbuf.c:222
#1 0x0ff11134 in call_cfunc (func=0xe75eb00 ,
recv=1211822976, len=, argc=,
argv=) at eval.c:5749
#2 0x0ff1d398 in rb_call0 (klass=1210540680, recv=1211822976, id=2961,
oid=2961, argc=2, argv=0xbfe19000, body=0x483d6440, flags=2) at
eval.c:5904
#3 0x0ff1d514 in rb_call (klass=1210540680, recv=1211822976, mid=2961,
argc=2, argv=0xbfe19000, scope=1, self=6) at eval.c:6151
#4 0x0ff1e1c8 in rb_obj_call_init (obj=1211822976, argc=2,
argv=0xbfe19000) at eval.c:7770
#5 0x0ff5468c in rb_class_new_instance (argc=2, argv=0xbfe19000,
klass=) at object.c:1644
#6 0x0ff11134 in call_cfunc (func=0xff54640 <rb_class_new_instance>,
recv=1210540680, len=, argc=,
argv=)
at eval.c:5749
#7 0x0ff1d398 in rb_call0 (klass=1208400192, recv=1210540680, id=3361,
oid=3361, argc=2, argv=0xbfe19000, body=0x4806a308, flags=0) at
eval.c:5904
#8 0x0ff1d514 in rb_call (klass=1208400192, recv=1210540680, mid=3361,
argc=2, argv=0xbfe19000, scope=0, self=1211828352) at eval.c:6151
#9 0x0ff17d34 in rb_eval (self=1211828352, n=) at
eval.c:3492
#10 0x0ff19318 in rb_eval (self=1211828352, n=) at
eval.c:3687
#11 0x0ff19118 in rb_eval (self=1211828352, n=) at
eval.c:2961
#12 0x0ff1bb6c in rb_yield_0 (val=1211824008, self=1211828352,
klass=, flags=0, avalue=0) at eval.c:5077
#13 0x0fef1184 in rb_ary_each (ary=1211824032) at array.c:1261
#14 0x0ff11110 in call_cfunc (func=0xfef1120 <rb_ary_each>,
recv=1211824032, len=, argc=,
argv=) at eval.c:5752
#15 0x0ff1d398 in rb_call0 (klass=1208361144, recv=1211824032, id=4001,
oid=4001, argc=0, argv=0x0, body=0x48061bc0, flags=0) at eval.c:5904
#16 0x0ff1d514 in rb_call (klass=1208361144, recv=1211824032, mid=4001,
argc=0, argv=0x0, scope=0, self=1211828352) at eval.c:6151
#17 0x0ff17d34 in rb_eval (self=1211828352, n=) at
eval.c:3492
#18 0x0ff1aef0 in rb_eval (self=1211828352, n=) at
eval.c:3222
#19 0x0ff1d24c in rb_call0 (klass=1211945712, recv=1211828352, id=88897,
oid=88897, argc=4, argv=0xbfe25a20, body=0x483cf2a0, flags=) at eval.c:6055
#20 0x0ff1d514 in rb_call (klass=1211945712, recv=1211828352, mid=88897,
argc=4, argv=0xbfe25a20, scope=1, self=1211828352) at eval.c:6151
#21 0x0ff17e44 in rb_eval (self=1211828352, n=) at
eval.c:3507
#22 0x0ff1d24c in rb_call0 (klass=1211945712, recv=1211828352, id=88761,
oid=88761, argc=0, argv=0x0, body=0x483d0638, flags=) at eval.c:6055
#23 0x0ff1d514 in rb_call (klass=1211945712, recv=1211828352, mid=88761,
argc=0, argv=0x0, scope=2, self=1211828352) at eval.c:6151
#24 0x0ff17e80 in rb_eval (self=1211828352, n=) at
eval.c:3513
#25 0x0ff1d24c in rb_call0 (klass=1211945712, recv=1211828352, id=88729,
oid=88729, argc=0, argv=0x0, body=0x483d24f8, flags=) at eval.c:6055
#26 0x0ff1d514 in rb_call (klass=1211945712, recv=1211828352, mid=88729,
argc=0, argv=0x0, scope=2, self=1211828352) at eval.c:6151
#27 0x0ff17e80 in rb_eval (self=1211828352, n=) at
eval.c:3513
#28 0x0ff1d24c in rb_call0 (klass=1211945712, recv=1211828352, id=2961,
oid=2961, argc=0, argv=0x0, body=0x483d2900, flags=) at eval.c:6055
#29 0x0ff1d514 in rb_call (klass=1211945712, recv=1211828352, mid=2961,
argc=0, argv=0x0, scope=1, self=6) at eval.c:6151
#30 0x0ff1e1c8 in rb_obj_call_init (obj=1211828352, argc=0, argv=0x0) at
eval.c:7770
#31 0x0ff5468c in rb_class_new_instance (argc=0, argv=0x0, klass=) at object.c:1644
#32 0x0ff11134 in call_cfunc (func=0xff54640 <rb_class_new_instance>,
recv=1211945712, len=, argc=,
argv=)
at eval.c:5749
#33 0x0ff1d398 in rb_call0 (klass=1208400192, recv=1211945712, id=3361,
oid=3361, argc=0, argv=0x0, body=0x4806a308, flags=0) at eval.c:5904
#34 0x0ff1d514 in rb_call (klass=1208400192, recv=1211945712, mid=3361,
argc=0, argv=0x0, scope=0, self=1208394144) at eval.c:6151
#35 0x0ff17d34 in rb_eval (self=1208394144, n=) at
eval.c:3492
#36 0x0ff192b4 in rb_eval (self=1208394144, n=) at
eval.c:3677
#37 0x0ff2ae04 in ruby_exec_internal () at eval.c:1641
#38 0x0ff2ae6c in ruby_exec () at eval.c:1661
#39 0x0ff2aebc in ruby_run () at eval.c:1671
#40 0x10001afc in main (argc=2, argv=0xbfe336e4, envp=) at main.c:48

Cheers, detlef

http://det.cable.nu

On Wed, Apr 22, 2009 at 10:41 PM, Detlef R. [email protected]
wrote:

I know, that the code is wrong, but it should not lead to a segmentation fault.

You may try in C with the same SVGs? It might be a bug related to
specific/broken SVG content in the underlying libraries…


Guillaume C. - Guillaume Cottenceau