[GRASS5] d.legend and d.out.png

Glynn Clements glynn.clements at virgin.net
Wed Sep 22 14:18:52 EDT 2004

Moritz Lennert wrote:

> I only get a form process when d.what.vect works. When it doesn't work
> (i.e. silently dies after two clicks), I never see the form process come
> up, so I can't attach to it.

AFAICT, the form process is started at the end of the first pass
through the loop, i.e. after the first click.

This would explain why it dies after two clicks. After each click,
F_open() is called. On the first call, it starts the form process, and
sets a flag to indicate that it is running. On subsequent calls, it
will use the existing process.

If the form window never appears, that suggests that it dies shortly
after startup, which is going to make it hard to debug. The only thing
which I can suggest is to add a sleep() call to the top of main() in
lib/form/form.c, so that you get a chance to attach a debugger to it.

> When d.what.vect works, I can attach to the form process in gdb, but then
> I get no reaction from GRASS anymore until I detach in gdb.

Note that attaching to a process results in the process being
suspended; you have to type "continue" in gdb to resume execution.

> I can send you the results of a strace -p <form pid> during a successful
> session with d.what.vect. But I guess this won't help ?

No. It's an unsuccessful session that we're interested in.

Glynn Clements <glynn.clements at virgin.net>

More information about the grass-dev mailing list