View · Search · Index
No registered users in community xowiki
in last 10 minutes

Re: [Xotcl] how to track a segmentation fault problem in Xotcl?

From: Catherine Letondal <letondal_at_pasteur.fr>
Date: Sat, 03 Jan 2004 18:29:46 +0100

Catherine Letondal wrote:
>
> Zoran Vasiljevic wrote:
> > On Friday 29 August 2003 16:26, Catherine Letondal wrote:
> > > Hi,
> > >
> > > I have just re-installed Xotcl 1.0.2 version and succedeed in running my
> > > application with some minor changes since the last xotcl version I used on
> > > this platform (Sparc/Solaris 7) was the 0.9 :-)
> > >
> > > I have a segmentation fault that occurs when a command is called from a Tk
> > > menu. The command is attached to the popup by a:
> > > add command -command
> > > statement on a menu Tk widget that is raised by a tk_popup.
> > >
> > > However, the very same command, when called from the tcl (xowish)
> > > interpreter, works and does not produce any core dump. And most menu items
> > > also work well.
> > >
> > > So my question is: how do I debug such a situation?
> > > Thanks for any help...
> >

It seems that I have subscribed to this problem :-)
This time it is on a debian/linux (an old one) where xotcl 1.0.2
was successfully compiled (although make test hangs, I don't know why).

It's the same symptom:
A Tk window built by a command either is correctly displayed if the
command is called directly from the "wish", or causes a seg fault if the
command is called from a Tk menu.
I have compiled xotcl/tcl/tk/itk/itcl with --enable-symbols
(I haven't recompiled other libraries such as blt though). Unfortunately,
my gdb is broken - but since the symptom is the same, here is the report
of gdb for the last time it happended (it was tcl 8.3 and now it is 8.4):


> #0 0xfed5c580 in Tcl_PopCallFrame () from /local/lib/libtcl8.3.so
> #1 0xfed69950 in TclObjInterpProc () from /local/lib/libtcl8.3.so
> #2 0xfed61f98 in EvalObjv () from /local/lib/libtcl8.3.so
> #3 0xfed625dc in Tcl_EvalEx () from /local/lib/libtcl8.3.so
> #4 0xfed627cc in Tcl_Eval () from /local/lib/libtcl8.3.so
> #5 0xfed28114 in Tcl_GlobalEval () from /local/lib/libtcl8.3.so
> #6 0xfee26058 in Tk_BindEvent () from /local/lib/libtk8.3.so
> #7 0xfee2aaac in TkBindEventProc () from /local/lib/libtk8.3.so
> #8 0xfee308a0 in Tk_HandleEvent () from /local/lib/libtk8.3.so
> #9 0xfee30ca4 in WindowEventProc () from /local/lib/libtk8.3.so
> #10 0xfed5f960 in Tcl_ServiceEvent () from /local/lib/libtcl8.3.so
> #11 0xfed5fcf8 in Tcl_DoOneEvent () from /local/lib/libtcl8.3.so
> #12 0xfee30d08 in Tk_MainLoop () from /local/lib/libtk8.3.so
> #13 0xfee3bb7c in Tk_MainEx () from /local/lib/libtk8.3.so
> #14 0x2be9c in main ()
>

So, if anyone has an idea of why this happens everytime I reinstall
xotcl... :-(

Thanks in advance,

--
Catherine Letondal -- Pasteur Institute Computing Center