Re: [Fxruby-users] segfault with FXTreeList in Ruby 1.8.0
Status: Inactive
Brought to you by:
lyle
From: Lyle J. <jl...@cf...> - 2003-08-25 23:13:41
|
Joel VanderWerf wrote: > Has anyone seen this? I'm getting a segfault in a finalizer for a > FXTreeList. It happens in 1.8.0, but not 1.7.3. > > Here's the backtrace: > > Program received signal SIGSEGV, Segmentation fault. > 0x0805947b in rb_longjmp (tag=6, mesg=0) at eval.c:3924 > 3924 JUMP_TAG(tag); > (gdb) bt > #0 0x0805947b in rb_longjmp (tag=6, mesg=0) at eval.c:3924 > #1 0x080594f1 in rb_exc_raise (mesg=1087374512) at eval.c:3931 > #2 0x080bfe08 in rb_raise (exc=1075655904, > fmt=0x80dafe0 "wrong argument type %s (expected %s)") at error.c:694 > #3 0x080befb4 in rb_check_type (x=0, t=135298648) at error.c:254 > #4 0x40339825 in SWIG_ConvertPtr (obj=1087378452, ptr=0xbfffede0, > ty=0x406d0580, flags=1) at librb.c:403 > #5 0x405a00c2 in _wrap_FXTreeItem_setFocus (argc=1, argv=0xbfffeff0, > self=1087378452) at treelist_wrap.cpp:685 <snip> I snipped it here because this part alone has some questionable stuff going on. At frame #5, we see that _wrap_FXTreeItem_setFocus() called SWIG_ConvertPtr(), to extract the pointer to the C++ FXTreeItem object from the Ruby FXTreeItem instance. In both frames 4 and 5, the Ruby instance has a VALUE of 1087378452. But then by the time we get to the call to rb_check_type() at frame #3, this value has become zero (x=0). Are you running under Linux? Have you tried to valgrind it yet? |