Bug 640694 - Joystick analogue hat event causes segmentation fault in programs
Joystick analogue hat event causes segmentation fault in programs
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: SDL (Show other bugs)
6.0
i686 Linux
low Severity medium
: rc
: ---
Assigned To: Petr Pisar
Lukas Zachar
: Patch
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-10-06 11:58 EDT by Petr Pisar
Modified: 2012-04-03 11:20 EDT (History)
4 users (show)

See Also:
Fixed In Version: SDL-1.2.14-3.el6
Doc Type: Bug Fix
Doc Text:
Cause Using joystick analog hat in a SDL application. Consequence Application crashes. Fix Data structure defining analog part of joystick has been updated to match data structure passed by kernel to SDL library. Result Analog hat state is properly passed by kernel to SDL library and it is interpreted accurately by the library.
Story Points: ---
Clone Of: 624241
Environment:
Last Closed: 2012-04-03 11:20:25 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
Fix (645 bytes, patch)
2010-10-06 12:01 EDT, Petr Pisar
no flags Details | Diff

  None (edit)
Description Petr Pisar 2010-10-06 11:58:03 EDT
+++ This bug was initially created as a clone of Bug #624241 +++

Description of problem:
sdlmame and gens-gs crash with segmentation fault if analog hat on USB wired Logitech Rumblepad 2 is moved

Version-Release number of selected component (if applicable):
Fedora 13, kernel 2.6.33.6-147.2.4.fc13.i686.PAE
(Problem existed on previous kernels)

How reproducible:
Always reproducible

Steps to Reproduce:
This is one way - 
1.Start application
2.On Mame (emulator) press TAB and select setup key inputs for user interface, select any option, move analog hat up on Rumplepad
3. On Gens-gs (Genesis Emulator) go into a game, move analog hat up on Rumblepad
  
Actual results:
application freezes, then drop back to shell with error segmentation fault

Expected results:
accepts input; on mame it should show "DPad-up" or similar appropriate message in key input list


Additional info:
-My hardware: Phenom II x2 550 BE CPU; Asus M3N-H/HDMI Motherboard; nvidia 9800 graphics card
-It is complete supposition this is an SDL problem, on the basis both these applications are SDL Based
-Keypresses from the Rumblepad are accepted, only direction inputs cause crash; Crash is also reproducable when running ROM in either emulator with same result
-Rumblepad does not crash the joypad configuration utility - works as expected
-I have had this bug for about a month, not seen it reported anywhere else, not been cured with kernel update (or yum-update in general) I wondered if it might be related to updated rumblepad drivers in kernel? as new problem with Fedora 13, previously okay in Fedora 11
-Please contact me for further information if needed. Thankyou for your help.

--- Additional comment from ppisar@redhat.com on 2010-08-16 09:15:21 GMT ---

Yet another hardware related problem :( Please submit backtrace from debugger after crash. You can use `abrt' or `abrt-gui' tool to proceed it with handy user interface. Only such way developers get idea, what's wrong.

I found similar bug report in Ubuntu <https://bugs.launchpad.net/ubuntu/+source/libsdl1.2/+bug/504878>. Referenced patch <http://hg.libsdl.org/SDL/rev/42012a6afb5b> is not part of Fedora 13 SDL package.

I will prepare new SDL package build for you.

--- Additional comment from ppisar@redhat.com on 2010-08-16 11:04:55 GMT ---

I applied patch from <http://hg.libsdl.org/SDL/rev/42012a6afb5b>
 and built i686 package that can be downloaded from <http://koji.fedoraproject.org/koji/getfile?taskID=2403449&name=SDL-1.2.14-8.fc13.i686.rpm>.

Could you test it? Be ware the package is not digitally signed. You can install it list this:

$ wget --content-disposition 'http://koji.fedoraproject.org/koji/getfile?taskID=2403449&name=SDL-1.2.14-8.fc13.i686.rpm'
# yum --nogpgcheck localinstall SDL-1.2.14-8.fc13.i686.rpm

Does it fix the problem for you?


--- Additional comment from gbirchley@blueyonder.co.uk on 2010-08-16 16:15:15 GMT ---

(In reply to comment #4)
> Unfortunately, you did not install the new package because you had installed
> SDL-devel package already and as such yum could not resolve missing development
> package.
> 
> Download the SDL-devel package from
> <https://koji.fedoraproject.org/koji/taskinfo?taskID=2403449> (The output
> section) and do the `yum localinstall' with both packages as arguments:
> 
> # yum --nogpgcheck localinstall SDL-1.2.14-8.fc13.i686.rpm
> SDL-devel-1.2.14-8.fc13.i686.rpm
> 
> If it complained about missing debug or static SDL package, you wold need to
> download (from the same page) and install them too.

 Success! Thank-you for your help!

In case anyone should be following these instructions note the url to type into the browser is
http://koji.fedoraproject.org/koji/taskinfo?taskID=2403449
rather than https://...

Thankyou again very much Petr,

Giles

--- Additional comment from ppisar@redhat.com on 2010-08-17 09:10:25 GMT ---

*** Bug 597125 has been marked as a duplicate of this bug. ***

--- Additional comment from ppisar@redhat.com on 2010-08-17 09:11:09 GMT ---

*** Bug 597964 has been marked as a duplicate of this bug. ***

--- Additional comment from ppisar@redhat.com on 2010-08-17 09:11:46 GMT ---

*** Bug 597970 has been marked as a duplicate of this bug. ***

--- Additional comment from updates@fedoraproject.org on 2010-08-17 09:34:02 GMT ---

SDL-1.2.14-8.fc14 has been submitted as an update for Fedora 14.
http://admin.fedoraproject.org/updates/SDL-1.2.14-8.fc14

--- Additional comment from ppisar@redhat.com on 2010-08-17 09:39:32 GMT ---

*** Bug 618883 has been marked as a duplicate of this bug. ***
------

Maintainer summary:
This bug is caused by incompatibility between SDL and Linux-2.6 in area of joystick data structures. Reproducer needs a hardware (joystick with analogue hats (=sticks)) and user interaction. This problem has been solved by upstream.
Comment 1 Petr Pisar 2010-10-06 12:01:00 EDT
Created attachment 451925 [details]
Fix

Patch provided by upstream fixing this issue.
Comment 2 RHEL Product and Program Management 2011-01-07 10:30:54 EST
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unfortunately unable to
address this request at this time. Red Hat invites you to
ask your support representative to propose this request, if
appropriate and relevant, in the next release of Red Hat
Enterprise Linux. If you would like it considered as an
exception in the current release, please ask your support
representative.
Comment 3 RHEL Product and Program Management 2011-07-05 19:42:14 EDT
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unfortunately unable to
address this request at this time. Red Hat invites you to
ask your support representative to propose this request, if
appropriate and relevant, in the next release of Red Hat
Enterprise Linux. If you would like it considered as an
exception in the current release, please ask your support
representative.
Comment 8 Petr Pisar 2012-01-10 12:09:56 EST
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Cause
    Using joystick analogue hat in a SDL application.
Consequence
    Application crashes.
Fix
    Data structure defining analogue part of joystick has been
    updated to match data structure passed by kernel to SDL
    library.
Result
    Analogue hat state is properly passed by kernel to SDL
    library and it is interpreted accurately by the library.
Comment 10 Petr Pisar 2012-01-11 04:34:00 EST
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1,11 +1,11 @@
 Cause
-    Using joystick analogue hat in a SDL application.
+    Using joystick analog hat in a SDL application.
 Consequence
     Application crashes.
 Fix
-    Data structure defining analogue part of joystick has been
+    Data structure defining analog part of joystick has been
     updated to match data structure passed by kernel to SDL
     library.
 Result
-    Analogue hat state is properly passed by kernel to SDL
+    Analog hat state is properly passed by kernel to SDL
     library and it is interpreted accurately by the library.
Comment 12 errata-xmlrpc 2012-04-03 11:20:25 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2012-0446.html

Note You need to log in before you can comment on or make changes to this bug.