Segfault in SDL_SYS_JoystickUpdate () from ./libSDL-1.1.so.0

Here’s what makes UT/SDL segfault:
I start ut, play a map, ut loads the next map, segfault :-/
I dunno where this segfault comes from… I’ve had no probs until
yesterday :frowning:
Here’s gdb’s output:
(gdb) run
Starting program: /usr/local/games/ut/System/ut-bin
(no debugging symbols found)…(no debugging symbols found)…
(no debugging symbols found)…[New Thread 1024 (LWP 1893)]
(no debugging symbols found)…
(no debugging symbols found)…(no debugging symbols found)…
(no debugging symbols found)…(no debugging symbols found)…
(no debugging symbols found)…(no debugging symbols found)…
(no debugging symbols found)…(no debugging symbols found)…
(no debugging symbols found)…(no debugging symbols found)…
(no debugging symbols found)…(no debugging symbols found)…
(no debugging symbols found)…(no debugging symbols found)…
(no debugging symbols found)…(no debugging symbols found)…
(no debugging symbols found)…[New Thread 2049 (LWP 1895)]
[New Thread 1026 (LWP 1896)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 1893)]
0x4045965a in SDL_SYS_JoystickUpdate () from ./libSDL-1.1.so.0

not much, eh?
should i build SDL with debug enabled or is this a known problem?
both joysticks seem to be ok (when catting /dev/js{0,1} i get those weird
chars :wink:

Here’s what makes UT/SDL segfault:
I start ut, play a map, ut loads the next map, segfault :-/

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 1893)]
0x4045965a in SDL_SYS_JoystickUpdate () from ./libSDL-1.1.so.0

Try the latest SDL CVS code:
http://www.libsdl.org/cvs.html

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment

Here’s what makes UT/SDL segfault:
I start ut, play a map, ut loads the next map, segfault :-/

Program received signal SIGSEGV, Segmentation fault. [Switching to
Thread 1024 (LWP 1893)] 0x4045965a in SDL_SYS_JoystickUpdate () from
./libSDL-1.1.so.0

Try the latest SDL CVS code:
http://www.libsdl.org/cvs.html

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment

aren’t you the one who made SDL? :slight_smile:

well… the problem is that UT has it’s own libSDL-1.1.so.0 file in it’s
system directory… I compiled and installed SDL from the 1.1.8 tar.gz,
moved UT’s out of it’s system directory and tried to start it, but it
tells me about an undefined symbol
(./ut-bin: relocation error: /usr/local/lib/libSDL-1.1.so.0: undefined symbol:
_ConvertX86p16_16BGR565)
:-/

Any ideas how i could fix this?

Btw: this problem started to occour yesterday, i was playing UT without
any segfault for about half a year now and i didn’t change anything in
it’s configuration nor did i remove/change any files in ut’s directory
nor update the kernel or anything… prolly you have the source to “UT’s
libSDL” and can sent me one with debug enabled, dunno :slight_smile:

Thanks,
-Gregor Anich, nobodyOn Wed, 16 Jan 2002 19:27:34 +0100, Sam Lantinga wrote:

hi again!
hermes/x86p_16.asm:GLOBAL _ConvertX86p16_16BGR565
hermes/x86p_16.asm:_ConvertX86p16_16BGR565:
that what i found when grep’ing for “ConvertX86p16_16BGR565” in SDL
1.1.8’s src dir, but i didn’t enable asm cause it gave me an error - may
that be the source of the undefined symbol?

hmm… i really start to hate my prob!!! Ok… this is what i did:
I tried compiling SDL-1.1.8, but nasm gave me errors about short jumps
outta range, i looked at the asm files and found some comments that said
those jumps were outta range, so i removed the SHORT from the jumps (lol

  • i have no idea about asm) to fix the undefined symbol, and recompiled
    SDL with --disable-joystick, started ut, played, segfault… then i made a
    distclean, again configured with disable joystick… now when i wanna
    start UT with my libSDL-1.1.so.0, it tells me the following:
    Unreal engine initialized
    Failed to load ‘SDLDrv’: Can’t find file for package 'SDLDrv’
    Failed to load ‘Class SDLDrv.SDLClient’: Can’t find file for package 'SDLDrv’
    Can’t find file for package 'SDLDrv’
    appError called:
    Can’t find file for package 'SDLDrv’
    Executing UObject::StaticShutdownAfterError
    Signal: SIGIOT [iot trap]
    Aborting.
    Exiting.
    Name subsystem shut down-----------------------------
    when moving UT’s libSDL-1.1.so.0 file back into it’s System directory, it
    works… any ideas? does UT require libSDL with joystick enabled? please
    help me… i love linux but sometimes when i am angry (hmm… pretty
    often :-/) i have to play UT (yah, i know i don’t die when not playing UT)

THANKS!!!
-Gregor Anich, NULL

hey :stuck_out_tongue:
ok… now that i got ut work with my own libSDL
(i enabled joysticks) i found out where it segfaults…
here’s gdb’s output:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 2522)]
0x4045a213 in SDL_SYS_JoystickUpdate (joystick=0x64b) at SDL_sysjoystick.c:685
685 if ( joystick->hwdata->is_hid )-------------------------------------------------------
then i took a look at src/joystick/linux/SDL_sysjoystick.c …
if ( joystick->hwdata->is_hid) is the first line accessing the joystick
pointer, which then segfaults… i guess UT has some probs… but why
did they start all of a sudden??? dunno… i cannot do a backtrace… i
have to run UT in gdb and redirect it’s stdout to a file cause i don’t
get back to the console running UT after it crashes (i have to kill X)…
do u have any ideas how i could do a backtrace after ut crashed? or is
there a switch to disable UT’s use of joystick?

Thanks,
Gregor Anich, extern “C” { var >> sizeof( var ) * 8; }