This is the mail archive of the guile-gtk@sources.redhat.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: general debugging question + Segfault in guile-gtk


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.

Thank you for bug report,
0.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]