nagyistoce / macifom

Automatically exported from code.google.com/p/macifom
0 stars 0 forks source link

Binding PlayStation 3 controller button crashes macifom #3

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Select PS3 controller as controller 1
2. Double click button assignment to assign key
3. Press PS3 controller button

What is the expected output? What do you see instead?
macifom crashes with a seg fault (bad access)

What version of the product are you using? On what operating system?
r91, OS X 10.6.5

Please provide any additional information below.

Original issue reported on code.google.com by i...@consoleemu.com on 8 Dec 2010 at 7:55

Attachments:

GoogleCodeExporter commented 9 years ago
Yipes - it certainly shouldn't crash. I'll look into what's going on here. 
Thanks for the backtrace.

Original comment by auston.s...@gmail.com on 10 Dec 2010 at 5:06

GoogleCodeExporter commented 9 years ago
I'm having a very similar problem. Instead of it crashing when I assign 
buttons, it crashes immediately after opening it. I can't even enter settings 
or anything before it crashes.
If my PlayStation 3 controller isn't synced (via bluetooth), I can start games 
fine. When it's synced, it crashes.

Original comment by jbwzrd...@gmail.com on 22 Apr 2011 at 1:39

GoogleCodeExporter commented 9 years ago
Same problem with playstation 3 controller. Problem wont start if ps3 control 
is synced with my mac

Original comment by madm...@gmail.com on 19 Jun 2011 at 7:34

GoogleCodeExporter commented 9 years ago
Yep, here too.  Program will not even open if the PS3 controller is synced via 
Bluetooth.

Original comment by nam...@gmail.com on 8 Aug 2011 at 6:25

GoogleCodeExporter commented 9 years ago
With some basic investigation, I found that this patch seems to fix the 
behavior.  Apparently sometimes the PS3 controller is sending very large values 
along, and IOHIDValueGetIntegerValue will crash on it.  I noticed a similar bit 
of code in the Dolphin codebase.

--- NESControllerInterface.m    (revision 101)
+++ NESControllerInterface.m    (working copy)
@@ -137,6 +137,10 @@
    NESControllerButton button;
    NESControllerInterface *controllerInterface = (NESControllerInterface *)context;

+    // IOHIDValueGetIntegerValue crashes if the value length is too long
+    if( IOHIDValueGetLength(value) > 2 )
+        return;
+    
    element = IOHIDValueGetElement(value);
    hidDevice = IOHIDElementGetDevice(element);
    cookie = IOHIDElementGetCookie(element);

Original comment by kee...@gmail.com on 5 Dec 2011 at 1:24

GoogleCodeExporter commented 9 years ago
How do you apply the patch?

Original comment by Jbeea...@gmail.com on 18 May 2012 at 10:52

GoogleCodeExporter commented 9 years ago
I second that! How do you apply the patch? We aren't idiots, but we're not all 
programmers here.

Original comment by footprin...@gmail.com on 21 May 2012 at 6:11

GoogleCodeExporter commented 9 years ago
Hi, Is there instructions on how to apply the patch?

Original comment by tbor...@gmail.com on 2 Jul 2012 at 12:53

GoogleCodeExporter commented 9 years ago
Hi, has there been any progress made on the ps3 controller issue? I have no 
idea how to use the code that is proposed above, if anyone could explain? 

Original comment by F2Je...@gmail.com on 16 Dec 2012 at 2:29