This is the mail archive of the
guile-gtk@sources.redhat.com
mailing list for the Guile project.
Re: general debugging question + Segfault in guile-gtk
On Thu, 28 Nov 2002 23:34:59 +0100
Daniel Skarda <0rfelyus@ucw.cz> wrote:
> Stan Pinte <alto_stan@wanadoo.be> writes:
> > Program received signal SIGSEGV, Segmentation fault.
> > [Switching to Thread 1024 (LWP 1112)]
> > 0x4039c174 in sgtk_arg_cleanup (a=0xbfffe64c, obj=0x2174) at guile-gtk.c:2026
> > 2026 if (BOXED_INFO (obj)->cleanup)
> > (gdb) bt
> > #0 0x4039c174 in sgtk_arg_cleanup (a=0xbfffe64c, obj=0x2174) at guile-gtk.c:2026
>
> Oops, thats my code, fresh new code.... Mea culpa.
>
> Aha! 0x2174 is #f (SCM_BOOL_F) (no, I am not a wizard, I am using gdb.... :-)
>
> GuileGtk converts callbacks parameters to scheme types (according to
> information from Gtk). Than it tries to clean-up data - and I forgot that
> structures can also be converted to #f (which is not a boxed type).
>
> if (BOXED_INFO (obj)->cleanup)
>
> should be replaced by
>
> if (BOXED_P (obj) && BOXED_INFO(obj)->cleanup)
>
> Hope that this stops your problems. I am going to commit the fix to CVS ASAP.
I verified, and it is ok!
Thanks a lot,
Stan.
>
> Thank you for bug report,
> 0.
>
--
Stanislas Pinte
Computer Consultant
Alto Software
20 Pl St Jacques
B-4000 Liège
web: http://www.altosw.be
email: alto_stan@wanadoo.be