problems with setvaluator (was "questions about a device driver")

Dan Christensen jdchrist at watcgl.waterloo.edu
Fri Jun 2 04:21:03 AEST 1989


I write:
>Everything below was tried on an IRIS 4D/120GTX unless otherwise stated.
>
>4) Override existing valuators and buttons with setvaluator and
>   gl_changedevice respectively.  This does work but has a couple of
>   problems.  First of all, the message
>   
>     ERROR #23 in kernal: severity=2, sevaluator: <some number>
>   
>   appears in the console window once every couple of seconds, especially
>   when the MOUSEX and MOUSEY valuators are being overridden and the
>   tracker crosses a window boundary.  This only started to happen since
>   we switched from an IRIS 4D/70G to our IRIS 4D/120GTX.

I investigated this error message further.  I believe that there is a
bug somewhere.  When the following code is executed on our machine, many
error messages just like the one above appear in our console window with
a variety of numbers replacing <some number>.  Some of the numbers,
roughly in order of most frequent to least frequent, are:  3, 5, 873, 637,
195 and -4071.

#include <gl.h>
#include <device.h>

main()
{
  short i=0;

  while( TRUE )
  {
    setvaluator( (Device) MOUSEX, i, (short) 0, (short) 1000 );
    i = (i+1)%1000;
    sginap(1);
  }
}

The error occurs if the sginap is removed or if the nap value is 1 or
2.  It occurs most frequently with a smaller delay.  It occurs most
often when the tracker crosses a window boundary.  Note that with a nap
value of 1 this corresponds to 100 tracker movements per seconds which
is only about an inch or two per second on the screen.  I should be
able to move the tracker faster than this.  Why is this occuring?  Is
there a way to get around it?  Why didn't it happen on our IRIS 4D/70G?

It is quite frustrating that problems like these aren't documented in the
man pages.

----
Dan Christensen, Computer Graphics Lab,	         jdchrist at watcgl.uwaterloo.ca
University of Waterloo, Waterloo, Ont.	         jdchrist at watcgl.waterloo.edu



More information about the Comp.sys.sgi mailing list