We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 2264 - Crash with either ouya controller or xbox 360 controller connected to the ouya
Summary: Crash with either ouya controller or xbox 360 controller connected to the ouya
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: joystick (show other bugs)
Version: HG 2.0
Hardware: ARM Android (All)
: P2 major
Assignee: Gabriel Jacobo
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-23 11:08 UTC by Martin Gerhardy
Modified: 2013-11-23 17:59 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Gerhardy 2013-11-23 11:08:07 UTC
adb logcat | ndk-stack -sym android-project/obj/local/armeabi
********** Crash dump: **********
Build fingerprint: 'OUYA/ouya_1_1/ouya_1_1:4.1.2/JZO54L-OUYA/676:user/test-keys'
pid: 1729, tid: 1729, name: g.caveexpresshd  >>> org.caveexpresshd <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000008
Stack frame #00  pc 00041158 /data/data/org.caveexpresshd/lib/libSDL2.so (SDL_PrivateJoystickAxis+23): Routine SDL_PrivateJoystickAxis in jni/SDL/src/joystick/SDL_joystick.c:501
Stack frame #01  pc 0004197b /data/data/org.caveexpresshd/lib/libSDL2.so (Android_OnJoy+42): Routine Android_OnJoy in jni/SDL/src/joystick/android/SDL_sysjoystick.c:342
Stack frame #02  pc 0003a49f /data/data/org.caveexpresshd/lib/libSDL2.so (Java_org_libsdl_app_SDLActivity_onNativeJoy+8): Routine Java_org_libsdl_app_SDLActivity_onNativeJoy in jni/SDL/src/core/android/SDL_android.c:171
Stack frame #03  pc 0001de30  /system/lib/libdvm.so (dvmPlatformInvoke+112)
Stack frame #04  pc 0004cdcb  /system/lib/libdvm.so (dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*)+394)
Stack frame #05  pc 0004eee7  /system/lib/libdvm.so (dvmResolveNativeMethod(unsigned int const*, JValue*, Method const*, Thread*)+174)
Stack frame #06  pc 00027260  /system/lib/libdvm.so
Stack frame #07  pc 0002b8b0  /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+180)
Stack frame #08  pc 0005f5ad  /system/lib/libdvm.so (dvmCallMethodV(Thread*, Method const*, Object*, bool, JValue*, std::__va_list)+272)
Stack frame #09  pc 0004bce9  /system/lib/libdvm.so
Stack frame #10  pc 0004a33d  /system/lib/libandroid_runtime.so
Stack frame #11  pc 00058fdf  /system/lib/libandroid_runtime.so (android::NativeInputEventReceiver::consumeEvents(_JNIEnv*, bool, long long)+250)
Stack frame #12  pc 00059215  /system/lib/libandroid_runtime.so
Stack frame #13  pc 0001de30  /system/lib/libdvm.so (dvmPlatformInvoke+112)
Stack frame #14  pc 0004cdcb  /system/lib/libdvm.so (dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*)+394)
Stack frame #15  pc 00027260  /system/lib/libdvm.so
Stack frame #16  pc 0002b8b0  /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+180)
Stack frame #17  pc 0005f873  /system/lib/libdvm.so (dvmInvokeMethod(Object*, Method const*, ArrayObject*, ArrayObject*, ClassObject*, bool)+374)
Stack frame #18  pc 00066dc9  /system/lib/libdvm.so
Stack frame #19  pc 00027260  /system/lib/libdvm.so
Stack frame #20  pc 0002b8b0  /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+180)
Stack frame #21  pc 0005f5ad  /system/lib/libdvm.so (dvmCallMethodV(Thread*, Method const*, Object*, bool, JValue*, std::__va_list)+272)
Stack frame #22  pc 000493bb  /system/lib/libdvm.so
Stack frame #23  pc 00047c0d  /system/lib/libandroid_runtime.so
Stack frame #24  pc 000486ef  /system/lib/libandroid_runtime.so (android::AndroidRuntime::start(char const*, char const*)+390)
Stack frame #25  pc 00000dcf  /system/bin/app_process
Crash dump is completed


It looks like the given joystick pointer is garbage. It did not make a difference whether the controllers where connected before or after game start.

Also getting some unknown keycodes with Ouya controller.
I/SDL     ( 2266): Unknown keycode 96
I/SDL     ( 2266): Unknown keycode 96
I/SDL     ( 2266): Unknown keycode 97
I/SDL     ( 2266): Unknown keycode 97
I/SDL     ( 2266): Unknown keycode 99
I/SDL     ( 2266): Unknown keycode 99
I/SDL     ( 2266): Unknown keycode 100
I/SDL     ( 2266): Unknown keycode 100
Comment 1 Martin Gerhardy 2013-11-23 11:29:46 UTC
This is a different one. Not pressing the buttons, but using the stick for cursor movement.

********** Crash dump: **********
Build fingerprint: 'OUYA/ouya_1_1/ouya_1_1:4.1.2/JZO54L-OUYA/676:user/test-keys'
pid: 2857, tid: 2857, name: g.caveexpresshd  >>> org.caveexpresshd <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000008
Stack frame #00  pc 00041158  /data/data/org.caveexpresshd/lib/libSDL2.so (SDL_PrivateJoystickAxis+23): Routine SDL_PrivateJoystickAxis in jni/SDL/src/joystick/SDL_joystick.c:501
Stack frame #01  pc 0004197b  /data/data/org.caveexpresshd/lib/libSDL2.so (Android_OnJoy+42): Routine Android_OnJoy in jni/SDL/src/joystick/android/SDL_sysjoystick.c:338
Stack frame #02  pc 0003a49f  /data/data/org.caveexpresshd/lib/libSDL2.so (Java_org_libsdl_app_SDLActivity_onNativeJoy+8): Routine Java_org_libsdl_app_SDLActivity_onNativeJoy in jni/SDL/src/core/android/SDL_android.c:171
Stack frame #03  pc 0001de30  /system/lib/libdvm.so (dvmPlatformInvoke+112)
Stack frame #04  pc 0004cdcb  /system/lib/libdvm.so (dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*)+394)
Stack frame #05  pc 0004eee7  /system/lib/libdvm.so (dvmResolveNativeMethod(unsigned int const*, JValue*, Method const*, Thread*)+174)
Stack frame #06  pc 00027260  /system/lib/libdvm.so
Stack frame #07  pc 0002b8b0  /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+180)
Stack frame #08  pc 0005f5ad  /system/lib/libdvm.so (dvmCallMethodV(Thread*, Method const*, Object*, bool, JValue*, std::__va_list)+272)
Stack frame #09  pc 0004bce9  /system/lib/libdvm.so
Stack frame #10  pc 0003fca5  /system/lib/libdvm.so
Stack frame #11  pc 0004a33d  /system/lib/libandroid_runtime.so
Stack frame #12  pc 00058fdf  /system/lib/libandroid_runtime.so (android::NativeInputEventReceiver::consumeEvents(_JNIEnv*, bool, long long)+250)
Stack frame #13  pc 00059215  /system/lib/libandroid_runtime.so
Stack frame #14  pc 0001de30  /system/lib/libdvm.so (dvmPlatformInvoke+112)
Stack frame #15  pc 0004cdcb  /system/lib/libdvm.so (dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*)+394)
Stack frame #16  pc 00027260  /system/lib/libdvm.so
Stack frame #17  pc 0002b8b0  /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+180)
Stack frame #18  pc 0005f873  /system/lib/libdvm.so (dvmInvokeMethod(Object*, Method const*, ArrayObject*, ArrayObject*, ClassObject*, bool)+374)
Stack frame #19  pc 00066dc9  /system/lib/libdvm.so
Stack frame #20  pc 00027260  /system/lib/libdvm.so
Stack frame #21  pc 0002b8b0  /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+180)
Stack frame #22  pc 0005f5ad  /system/lib/libdvm.so (dvmCallMethodV(Thread*, Method const*, Object*, bool, JValue*, std::__va_list)+272)
Stack frame #23  pc 000493bb  /system/lib/libdvm.so
Stack frame #24  pc 00047c0d  /system/lib/libandroid_runtime.so
Stack frame #25  pc 000486ef  /system/lib/libandroid_runtime.so (android::AndroidRuntime::start(char const*, char const*)+390)
Stack frame #26  pc 00000dcf  /system/bin/app_process
Comment 2 Martin Gerhardy 2013-11-23 11:31:02 UTC
sorry, that was the wrong one: here is the correct one:

********** Crash dump: **********
Build fingerprint: 'OUYA/ouya_1_1/ouya_1_1:4.1.2/JZO54L-OUYA/676:user/test-keys'
pid: 2729, tid: 2729, name: g.caveexpresshd  >>> org.caveexpresshd <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000020
Stack frame #00  pc 0004130c  /data/data/org.caveexpresshd/lib/libSDL2.so (SDL_PrivateJoystickButton+39): Routine SDL_PrivateJoystickButton in jni/SDL/src/joystick/SDL_joystick.c:630
Stack frame #01  pc 000418ff  /data/data/org.caveexpresshd/lib/libSDL2.so (Android_OnPadDown+54): Routine Android_OnPadDown in jni/SDL/src/joystick/android/SDL_sysjoystick.c:314
Stack frame #02  pc 0003a485  /data/data/org.caveexpresshd/lib/libSDL2.so (Java_org_libsdl_app_SDLActivity_onNativePadDown+6): Routine Java_org_libsdl_app_SDLActivity_onNativePadDown in jni/SDL/src/core/android/SDL_android.c:155
Stack frame #03  pc 0001de30  /system/lib/libdvm.so (dvmPlatformInvoke+112)
Stack frame #04  pc 0004cdcb  /system/lib/libdvm.so (dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*)+394)
Stack frame #05  pc 0004eee7  /system/lib/libdvm.so (dvmResolveNativeMethod(unsigned int const*, JValue*, Method const*, Thread*)+174)
Stack frame #06  pc 00027260  /system/lib/libdvm.so
Stack frame #07  pc 0002b8b0  /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+180)
Stack frame #08  pc 0005f5ad  /system/lib/libdvm.so (dvmCallMethodV(Thread*, Method const*, Object*, bool, JValue*, std::__va_list)+272)
Stack frame #09  pc 0004bce9  /system/lib/libdvm.so
Stack frame #10  pc 0003fca5  /system/lib/libdvm.so
Stack frame #11  pc 0004a33d  /system/lib/libandroid_runtime.so
Stack frame #12  pc 00058fdf  /system/lib/libandroid_runtime.so (android::NativeInputEventReceiver::consumeEvents(_JNIEnv*, bool, long long)+250)
Stack frame #13  pc 000590f5  /system/lib/libandroid_runtime.so (android::NativeInputEventReceiver::handleEvent(int, int, void*)+92)
Stack frame #14  pc 00014935  /system/lib/libutils.so (android::Looper::pollInner(int)+516)
Stack frame #15  pc 000149f9  /system/lib/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+104)
Stack frame #16  pc 0005e3ab  /system/lib/libandroid_runtime.so (android::NativeMessageQueue::pollOnce(_JNIEnv*, int)+22)
Stack frame #17  pc 0001de30  /system/lib/libdvm.so (dvmPlatformInvoke+112)
Stack frame #18  pc 0004cdcb  /system/lib/libdvm.so (dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*)+394)
Stack frame #19  pc 00027260  /system/lib/libdvm.so
Stack frame #20  pc 0002b8b0  /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+180)
Stack frame #21  pc 0005f873  /system/lib/libdvm.so (dvmInvokeMethod(Object*, Method const*, ArrayObject*, ArrayObject*, ClassObject*, bool)+374)
Stack frame #22  pc 00066dc9  /system/lib/libdvm.so
Stack frame #23  pc 00027260  /system/lib/libdvm.so
Stack frame #24  pc 0002b8b0  /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+180)
Stack frame #25  pc 0005f5ad  /system/lib/libdvm.so (dvmCallMethodV(Thread*, Method const*, Object*, bool, JValue*, std::__va_list)+272)
Stack frame #26  pc 000493bb  /system/lib/libdvm.so
Stack frame #27  pc 00047c0d  /system/lib/libandroid_runtime.so
Stack frame #28  pc 000486ef  /system/lib/libandroid_runtime.so (android::AndroidRuntime::start(char const*, char const*)+390)
Stack frame #29  pc 00000dcf  /system/bin/app_process
Crash dump is completed
Comment 3 Martin Gerhardy 2013-11-23 11:46:10 UTC
oh. btw. I'm using the joystick api, not the gamecontroller api - does this make a difference?
Comment 4 Martin Gerhardy 2013-11-23 11:47:55 UTC
also this might be of interest, too. There are 6 joysticks connected. All at startup - so I don't think that this is related to the missing hotplug support for android. No further device was removed or added in the meanwhile.

I/caveexpress 1.3( 3366): INFO: found joystick Xbox 360 Wireless Receiver
I/caveexpress 1.3( 3366): INFO: found joystick Xbox 360 Wireless Receiver
I/caveexpress 1.3( 3366): INFO: found joystick Xbox 360 Wireless Receiver
I/caveexpress 1.3( 3366): INFO: found joystick Xbox 360 Wireless Receiver
I/caveexpress 1.3( 3366): INFO: found joystick OUYA Game Controller
I/caveexpress 1.3( 3366): INFO: found joystick Android Accelerometer
Comment 5 Gabriel Jacobo 2013-11-23 12:48:39 UTC
Let me know if this fixes it: https://hg.libsdl.org/SDL/rev/ffbdb99af7bd
Comment 6 Martin Gerhardy 2013-11-23 17:59:52 UTC
wonderful Grabriel. the crash is fixed.