[mercury-users] Tcl/Tk
Ralph Becket
rafe at csse.unimelb.edu.au
Thu Jun 7 08:46:08 AEST 2007
Tomas, Wednesday, 6 June 2007:
> Hello all,
>
> I am using the Mercury Tcl/Tk code from `extras' and am having a couple of
> problems:
>
> 1) Seg faults:
>
> *** Mercury runtime: caught segmentation violation ***
> PC at signal: 136059738 (81c1b5a)
> address involved: 0xc
> This may have been caused by a stack overflow, due to unbounded recursion.
> exiting from signal handler
>
> These seem to happen after a while when I am using the GUI. There is also
> a largish data file (Prolog syntax) that cannot be read from the GUI
> without causing a segmentation fault. Reading it before the widgets are
> created works fine.
>
> I tried increasing the "detstack" and "heap" with no effect. Any ideas how
> I can start to try to debug this?
Compile in a debugging grade then run the program to completion under
mdb. mdb should report the last trace event number reached before the
program terminated. Then re-run the program under mdb and `goto n'
where n is that event number. Step through the program until you get to
the call that segfaults. Also, try running `stack' to see if there are
obvious problems there (you can probably ignore stack trace items saying
"2978 calls to foo/7" because in a non-debugging grade these will be
turned into while loops, but if you see a long stack trace with repeated
patterns, you've probably got a tail-call optimisation failure.)
-- Ralph
--------------------------------------------------------------------------
mercury-users mailing list
Post messages to: mercury-users at csse.unimelb.edu.au
Administrative Queries: owner-mercury-users at csse.unimelb.edu.au
Subscriptions: mercury-users-request at csse.unimelb.edu.au
--------------------------------------------------------------------------
More information about the users
mailing list