[GRASS5] Driver Update

Glynn Clements glynn.clements at virgin.net
Wed Apr 25 03:14:54 EDT 2001


Justin Hickey wrote:

> > Do you have strace() or similar? 
> 
> Hmmpf. It figures that strace on SGI is different from Linux. The best I
> can do here is provide you with a system call trace, but I don't know if
> that will be useful to you. Please let me know if you want it anyway.

Yes; for the XDRIVER process (I'm fairly sure that the client side is OK).

> > If so, a trace of the XDRIVER 
> > process would help a lot. If not, could you add some printf()s to
> > src/display/devices/lib/main.c and see if that tells us anything.
> 
> The following is the output with some fprintf()'s and some comments by
> me (preceeded with //)
> 
> using default visual which is TrueColor
> Visual is read-only or using a private colormap
> ncolors: 32768
> allocating memory...
> About to call prepare_connection_sock
> About to call get_connection_sock
> Graphics driver [x0] started
> About to call Do-work (0)
> About to call get_connection_sock
> About to call Do-work (1)

This implies the connection has been accepted.

> About to call Do-work (1)

This seems to suggest that it has successfully read and processed one
command.

> // Slight pause here
> Warning - no response from graphics monitor <x0>.
> Check to see if the mouse is still active.
> ERROR - no response from graphics monitor <x0>.
> About to call close(_wfd)

Uh Oh. Something caused the command loop to terminate; the latest
version of lib/main.c prints an error message if an abnormal
termination occurs. It would be useful to know which of the three
possible cases occurred. The choices are:

            if (setjmp(save))

Indicates that SIGPIPE was caught (write to broken pipe).

            if (get_command(&c) != 0)

Driver got EOF while expecting command; this the "normal" case.

            if (process_command(c))

Driver got EOF while expecting command parameters/data.

> About to call get_connection_sock
> Problem selecting x0. Will try once more
> About to call Do-work (0)
> About to call get_connection_sock
> About to call Do-work (1)

The client connects a second time. This kind of fault-tolerance is a
bit unexpected; maybe necessary when using FIFOs, though.

> About to call Do-work (1)
> // Again the pause
> Warning - no response from graphics monitor <x0>.
> Check to see if the mouse is still active.
> ERROR - no response from graphics monitor <x0>.
> About to call close(_wfd)

Again, the loop terminates the second time around.

> // d.mon ends
> About to call get_connection_sock
> About to call Do-work (0)
> About to call get_connection_sock
> About to call Do-work (0)
> // These 2 lines are continually printed until I close the monitor
> // window

Yep; XDRIVER continually alternates between checking for new
connections and processing X events.

> I don't know if this is helpful to you or not. Please let me know if you
> want me to place print statements in other places in the code.

Before each of the three "break"s from the inner loop would be useful.

-- 
Glynn Clements <glynn.clements at virgin.net>

---------------------------------------- 
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo at geog.uni-hannover.de with
subject 'unsubscribe grass5'



More information about the grass-dev mailing list