joystick segs

Zinx Verituse zinx at
Sat Apr 26 03:45:55 EDT 2003

Got ArmyOps installed, and have done same basic testing..
I will be unable to test anything but the very first training
due to driver issues (z-buffer is highly broken in ATI's drivers,
and they don't seem to care.  Targets are not all visible.)

For the curious, here's screenshots of z-buffer
issues (ATI driver problem -- it happens in rtcw too):

On to the real issue!

Setting UseJoystick to True in the SDLDrv.SDLClient section
results in a segmentation fault, when a joystick is available:

[ 1]  ./ [0x4087027a]
[ 2]  /lib/ [0x40c4375a]
[ 3]  /lib/ [0x40a289d8]
[ 4]  /home/zinx/games/armyops160/System/ [0x46f1ee4f]
[ 5]  ./ [0x40237ebb]
[ 6]  ./ [0x402358fd]
[ 7]  ./ [0x40202bad]
[ 8]  ./armyops-bin [0x804dd9e]
[ 9]  ./armyops-bin(main+0x1c24) [0x8050054]
[10]  /lib/ [0x40a17a51]
[11]  ./armyops-bin(GetFullName__C7UObjectPw+0x55) [0x804c711]
Signal: SIGSEGV [segmentation fault]

gdb reports something very slightly different:
#0  0x402343c4 in UInput::DirectAxis () from ./
#1  0x46eb4e4f in USDLViewport::UpdateInput ()
   from /home/zinx/games/armyops160/System/
#2  0x40235ebb in UInput::ResetInput () from ./
(gdb) disassemble $eip $eip+5
Dump of assembler code from 0x402343c4 to 0x402343f6:
0x402343c4 <DirectAxis__6UInput9EInputKeyff+36>:        cmpl   $0x0,0x4(%eax)
0x402343c8 <DirectAxis__6UInput9EInputKeyff+40>:        
    je     0x402343d0 <DirectAxis__6UInput9EInputKeyff+48>
(gdb) print /x $eax
$1 = 0xed13c9c
(gdb) print *(int*)($eax+4)
Cannot access memory at address 0xed13ca0

So, I'm guessing uninitialized pointer, or corrupted pointer.

Other points of interest:

It doesn't happen if a joystick wasn't detected anyway.

listing of joystick device nodes:
lr-xr-xr-x    1 root     root            9 2003-04-26 01:46 /dev/js0 -> input/js0
cr--r--r--    1 root     root      13,   0 1969-12-31 18:00 /dev/input/js0
crw-rw----    1 root     root      13,  65 1969-12-31 18:00 /dev/input/event1

Zinx Verituse

More information about the armyops mailing list