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

Michael Barton michael.barton at asu.edu
Mon Aug 23 14:10:25 EDT 2004



On 8/23/04 10:35 AM, "Glynn Clements" <glynn.clements at virgin.net> wrote:

> 
> Michael Barton wrote:
> 
>>>> Except, d.what.vect is partly broken--on Mac's at least.
>>> 
>>> Bus error directly after first mouse click, correct?
>>> (Needs to be compiled with debugging info and run though a debugger..)
>> 
>> It gives a "broken pipe" error. Here is the very consistent scenario (with
>> one exception detailed below).
>> 
>> Run d.what.vect first time. Works great in all ways.
>> 
>> Quit d.what.vect (i.e., right mouse click).
>> 
>> Run d.what.vect second time (and all subsequent times). Works fine in
>> terminal mode. In default mode (i.e., displaying tcl window), nothing
>> happens on the first mouse click. On the 2nd mouse click (and all subsequent
>> clicks), it gives a broken pipe error.
> 
> This sounds like an OSX Tcl/Tk issue. Does the GUI dialog use the OSX
> wish or a Unix/X11 wish?

This is an interesting thought. All the rest of tcltk for GRASS appears to
go through the X11 tcltk version. In fact, tcltkgrass won't run if tcltk for
x11 is not installed and available. Is it possible that this particular
command is somehow bypassing the x11 version and trying to call the Mac OSX
version? 

Michael

> 
> If stdout isn't a tty (and, when run via gui.tcl, it isn't),
> d.what.vect sends the output to both stdout and stderr. gui.tcl runs
> the command using "open {| <command> 2>@ stdout} r", so its stdout
> will be a pipe (with wish on the other end) and stderr will be the
> original stdout (i.e. the terminal).
> 
> If the read end of stdout is closed, the next time that d.what.vect
> tries to write to it, d.what.vect will receive SIGPIPE, the default
> action for which is to print "Broken pipe" and terminate the
> application.
> 
> My open(n) manpage says:
> 
>        Macintosh
> ...
>               Opening  a  command pipeline is not supported under |
>               Macintosh, since applications do  not  support  the |
>               concept of standard input or output.                |
> 
> I presume that this refers to pre-OSX versions. However, the
> experience of OpenOSX' attempts to use the OSX Tcl/Tk for tcltkgrass
> suggest that the OSX Tcl/Tk may still have some issues regarding
> spawning commands and standard descriptors.

______________________________
Michael Barton, Professor & Curator
School of Human Diversity and Social Change
Arizona State University
Tempe, AZ  85287-2402
USA

voice: 480-965-6262; fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton




More information about the grass-dev mailing list