Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 52833 - LIBSDL-1.2.7 fails when USB joystick is connected
Summary: LIBSDL-1.2.7 fails when USB joystick is connected
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
: 53223 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-06-02 17:30 UTC by Gustavo Ribeiro Alves
Modified: 2004-09-23 19:20 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Proposed patch to solve the joystick problem (patch-SDL_sysjoystick,1.76 KB, patch)
2004-06-06 23:53 UTC, Gustavo Ribeiro Alves
Details | Diff
ebuild for libsdl-1.2.7 with joystick fixed (libsdl-1.2.7-r2.ebuild,2.70 KB, text/plain)
2004-06-07 00:21 UTC, Gustavo Ribeiro Alves
Details
1.2.7-joystick.patch (1.2.7-joystick.patch,914 bytes, patch)
2004-07-13 03:37 UTC, Alan Swanson
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gustavo Ribeiro Alves 2004-06-02 17:30:15 UTC
Lib SDL fails with 

Fatal signal: Floating Point Exception (SDL Parachute Deployed)

When an usb joystick is connected.

If the joystick is removed everything runs fine.

I tested the following games and found the problem 
games-emulator/gens
games-arcade/kobodeluxe

Supertux loads but can't read the joystick and gives this error:
Datadir: /usr/share/games/supertux
Warning: Could not open joystick -1.
The Simple DirectMedia error that occured was:
There are 1 joysticks available
 




Reproducible: Always
Steps to Reproduce:
1.Plug the joystick
2.Start an SDL game


Actual Results:  
Fatal signal: Floating Point Exception (SDL Parachute Deployed)

Expected Results:  
Game running

I'm using vanilla sources 2.6.6, xorg-x11 and ati-drivers.
Comment 1 Gustavo Ribeiro Alves 2004-06-02 18:15:39 UTC
This appears to be fixed on 1.2.8 according to http://www.libsdl.org/cvs.php .



Changes for Fri Apr 23:

    * 1.2.8: Compile most of the blitter assembly on Opteron
    * 1.2.8: Compile CPU detection code on Opteron
    * 1.2.8: Fixed floating point exception with Linux 2.6 joysticks
    * 1.2.8: Fixed toggling SDL_NOFRAME on X11 video modes
    * 1.2.8: Fixed loading ESD and aRts function pointers
    * 1.2.8: IRIX uses libGL.so, not libGL.so.1
    * 1.2.8: Fixed typo in fatal signal handling code
    * 1.2.8: Fix potential deadlock in MacOS X joystick code
    * 1.2.8: Build FSAA code on all versions of MacOS X
    * 1.2.8: Avoid using kernel headers for byte swapping macros 

Changes for Tue Feb 17:

    * 1.2.7: Added a test program for dynamically loading OpenGL 
Comment 2 Gustavo Ribeiro Alves 2004-06-06 23:53:47 UTC
Created attachment 32834 [details, diff]
Proposed patch to solve the joystick problem

This patch is a diff from the SDL_sysjoystick file from SDL 1.2.7 and a patch
they made to solve the problem. I haven't tested it yet.
Comment 3 Gustavo Ribeiro Alves 2004-06-07 00:21:52 UTC
Created attachment 32836 [details]
ebuild for libsdl-1.2.7 with joystick fixed

It appears to be working. Just copy the last patch as 1.2.7-joystick.patch to
the files directory and run an ebuild digest.
Comment 4 Mr. Bones. (RETIRED) gentoo-dev 2004-06-07 00:48:42 UTC
Added to libsdl-1.2.7-r1.ebuild.  Please try it out.
Comment 5 Gustavo Ribeiro Alves 2004-06-07 08:47:17 UTC
Don't ask me why, but the file 1.2.7-joystick.patch included on portage is not working. If you use the one provided here the ebuild compiles.

The only diference between the files is the header:
===================================================================
RCS file: /home/sdlweb/libsdl.org/cvs/SDL12/src/joystick/linux/SDL_sysjoystick.c,v
retrieving revision 1.13
retrieving revision 1.14

 
Comment 6 Mr. Bones. (RETIRED) gentoo-dev 2004-06-07 12:13:57 UTC
No, it's because the fricking patch has rcs keywords in it that cvs expands.
I should have checked it more closely.
Comment 7 Mr. Bones. (RETIRED) gentoo-dev 2004-06-07 12:15:31 UTC
Resync and try it again please.
Comment 8 SpanKY gentoo-dev 2004-06-07 15:44:15 UTC
*** Bug 53223 has been marked as a duplicate of this bug. ***
Comment 9 Gustavo Ribeiro Alves 2004-06-09 16:05:26 UTC
Joystick works on jscalibrator.

The games stoped crashing but the joystick is not working on SDL. The games find the joystick but get bogus axis readings from SDL.

Comment 10 Mr. Bones. (RETIRED) gentoo-dev 2004-06-10 14:32:39 UTC
ok, still broken.
Comment 11 Mr. Bones. (RETIRED) gentoo-dev 2004-07-08 15:51:01 UTC
export SDL_JOYSTICK_DEVICE=/dev/input/js0

Has been recommended as a possible work around.  Try that and see if it's any fun.
Comment 12 Gustavo Ribeiro Alves 2004-07-08 21:09:23 UTC
OK That seems to work! I'm still having some axis calibration problems tought. 
Comment 13 Alan Swanson 2004-07-13 03:37:08 UTC
Created attachment 35302 [details, diff]
1.2.7-joystick.patch

Unfortunately the supplied patch is (very) wrong, I know because I fixed it for
SDL's CVS. Attached is correct patch from revision 1.15 of SDL_sysjoystick.c.
This should be fixed quickly.

Remember to read newer CVS commits in case the one you are looking at was
incorrect.
Comment 14 Mr. Bones. (RETIRED) gentoo-dev 2004-09-23 19:20:51 UTC
I think this is all taken care of in libsdl-1.2.7-r2.ebuild.  Reopen if I'm wrong.