[mercury-users] Tcl/Tk

Julien Fischer juliensf at csse.unimelb.edu.au
Fri Jun 15 21:03:26 AEST 2007


On Fri, 15 Jun 2007, Tomas By wrote:

> On Thu, June 7, 2007 00:46, Ralph Becket wrote:
>> Compile in a debugging grade then run the program to completion under
>> mdb.  [...]
>
> Hello again,
>
> I have changed things around in the application, from using a few big
> `map's to using many small ones, which made a huge difference. Earlier it
> was Win 3.1 style interaction (Move the mouse pointer and the app crashes.
> will I reach the save menu before it crashes? Maybe if I move really
> slowly. No, better hurry...) but now it crashes only occasionally. I have
> been getting all kinds of errors: "cannot allocate", "cannot deallocate",
> internal-looking stuff from Tcl, and what looked like binary data being
> passed to Tcl as a command string. Oh, and "script jumped interpreter"
> also, my favourite.
>
> Maybe this is a silly question, but is there any connection between the
> Mercury garbage collector and Tcl? I thought Tcl would be handling its own
> memory.

No, the Mercury Tcl binding redfined malloc to use the garbage collector.
See the comment at mtcltk.m:339 for details.

> I'm a bit sceptical about getting anywhere with the debugger. Hasn't the
> problem happened long before the actual segmentation fault?

For problems of this nature you'are probably better off with gdb
and hlc.gc.ll_debug, or, if on Linux, valgrind.

Julien.
--------------------------------------------------------------------------
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