From: Joe Van Dyk Date: 2005-07-21T04:36:17+09:00 Subject: Re: ruby-gnome2 canvas pixbuf scaling On 7/20/05, Masao Mutoh wrote: > Hi, > > On Wed, 20 Jul 2005 06:34:12 +0900 > Joe Van Dyk wrote: > > > Hi, > > > > According to http://developer.gnome.org/doc/API/gdk-pixbuf/gnomecanvaspixbuf.html#GNOMECANVASPIXBUF--WIDTH-SET > > , to set the width or height of a CanvasPixbuf item, the width-set and > > height-set properties must be set to true. Otherwise, it's not taken > > into account. > > > > I searched the ruby-gnome2 bindings and didn't see any reference to > > width-set or height-set. Does ruby-gnome2 not support manually > > setting the width and height of an CanvasPixbuf item? > > Both of Gnome::CanvasPixbuf#width_set=(val) > and Gnome::CanvasPixbuf#height_set=(val) are available. > > # Have you tried rbbr? if not yet, try it. You can find all of the methods in a class. I've got another question for you. (gdb) backtrace #0 0xffffe002 in ?? () #1 0x42028a73 in abort () from /lib/tls/libc.so.6 #2 0x080bc392 in rb_bug (fmt=0x80d63b0 "Segmentation fault") at error.c:214 #3 0x080a03e8 in sigsegv (sig=11) at signal.c:446 #4 #5 0x400f8f82 in g_type_check_instance_is_a () from /usr/lib/libgobject-2.0.so.0 #6 0x40b7e990 in gnome_canvas_request_redraw () from /usr/lib/libgnomecanvas-2.so.0 #7 0x40b7739c in gnome_canvas_item_construct () from /usr/lib/libgnomecanvas-2.so.0 #8 0x40b773fd in gnome_canvas_item_construct () from /usr/lib/libgnomecanvas-2.so.0 #9 0x400ddb2f in g_object_interface_list_properties () from /usr/lib/libgobject-2.0.so.0 #10 0x400bebe4 in rbgobj_free (holder=0x83627f8) at rbgobject.c:137 #11 0x0806b8fb in rb_gc_call_finalizer_at_exit () at gc.c:1858 #12 0x080539b6 in ruby_finalize_1 () at eval.c:1418 #13 0x08053ac8 in ruby_cleanup (ex=0) at eval.c:1453 #14 0x08053c12 in ruby_stop (ex=0) at eval.c:1484 #15 0x08053c76 in ruby_run () at eval.c:1505 #16 0x080520d5 in main (argc=2, argv=0xbfffdd14, envp=0xbfffdd20) at main.c:46 #17 0x42015574 in __libc_start_main () from /lib/tls/libc.so.6 After I quit my program, it apparently still tries to create canvas items. I'm only creating new canvas items on a size-allocate and mouse click and move events. Why would it be creating new canvas events after the program shutdown process has begun? Are there any good strategies that would avoid having the application seg-fault most of the time on shutdown? Thanks, Joe