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.
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
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.
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.
Added to libsdl-1.2.7-r1.ebuild. Please try it out.
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
No, it's because the fricking patch has rcs keywords in it that cvs expands. I should have checked it more closely.
Resync and try it again please.
*** Bug 53223 has been marked as a duplicate of this bug. ***
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.
ok, still broken.
export SDL_JOYSTICK_DEVICE=/dev/input/js0 Has been recommended as a possible work around. Try that and see if it's any fun.
OK That seems to work! I'm still having some axis calibration problems tought.
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.
I think this is all taken care of in libsdl-1.2.7-r2.ebuild. Reopen if I'm wrong.