Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crashing with certain gamepads connected natively [Android 4.0.3] #3022

Closed
PewnyPL opened this issue Jul 31, 2013 · 9 comments
Closed

Crashing with certain gamepads connected natively [Android 4.0.3] #3022

PewnyPL opened this issue Jul 31, 2013 · 9 comments

Comments

@PewnyPL
Copy link
Contributor

PewnyPL commented Jul 31, 2013

Confirmed with Ipega PG-9017 and Steelseries Free. Issue written with Ipega in mind since I own it.

Upon connecting the controller NATIVELY via Bluetooth (bluez stack) in gamepad mode (2 true-analog sticks, dpad, 4 face buttons, start, select, 2 shoulders) the emulator crashes immediately with "Unfortunately, PPSSPP has stopped." upon using dpad or thumbsticks. It happens everywhere, on the splash screen, in menu, in input configuration and in-game. Using the buttons doesn't cause the problem and they are properly recognised by PPSSPP.
The pad reports as (according to Mupen 64 and info found on web)
DPAD: AXIS_HAT_X and AXIS_HAT_Y
Left stick: AXIS_X and AXIS_Y
Right stick: AXIS_Z (left-right) and AXIS_RZ (up-down)

However, in apps that are not using/are unaware of the Android's gamepad API, DPAD and Left stick poth report as DPAD_UP, DPAD_DOWN, DPAD_LEFT, DPAD_RIGHT (keycodes 19,20,21,22 respectively)., while right stick doesn't send any keycodes at all.

Confirmed with Google Play version and Automatic build for rev 1044.

Website with keycodes for the gamepad: http://www.infinityreviews.com/2013/04/ipega-bluetooth-controller-review.html
Related thread on PPSSPP forums: http://forums.ppsspp.org/showthread.php?tid=5185

@hrydgard
Copy link
Owner

Thanks for reporting, that's not good. DPAD/stick mapping seems to be the same as Shield, which works fine.

Any chance you can dig out the crash callstack from the ADB log?

@PewnyPL
Copy link
Contributor Author

PewnyPL commented Jul 31, 2013

Here's what I got by running adb logcat -d > logcat.txt with PPSSPP running and pressing the key mid-dump:

D/AndroidRuntime(15438): Shutting down VM

W/dalvikvm(15438): threadid=1: thread exiting with uncaught exception (group=0x40a9c228)

E/AndroidRuntime(15438): FATAL EXCEPTION: main

E/AndroidRuntime(15438): java.lang.NullPointerException

E/AndroidRuntime(15438): at com.henrikrydgard.libnative.NativeActivity.onGenericMotionEvent(NativeActivity.java:405)

E/AndroidRuntime(15438): at android.app.Activity.dispatchGenericMotionEvent(Activity.java:2467)

E/AndroidRuntime(15438): at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchGenericMotionEvent(PhoneWindow.java:1923)

E/AndroidRuntime(15438): at android.view.ViewRootImpl.deliverGenericMotionEvent(ViewRootImpl.java:3322)

E/AndroidRuntime(15438): at android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2701)

E/AndroidRuntime(15438): at android.view.ViewRootImpl.processInputEvents(ViewRootImpl.java:930)

E/AndroidRuntime(15438): at android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2704)

E/AndroidRuntime(15438): at android.os.Handler.dispatchMessage(Handler.java:99)

E/AndroidRuntime(15438): at android.os.Looper.loop(Looper.java:156)

E/AndroidRuntime(15438): at android.app.ActivityThread.main(ActivityThread.java:4977)

E/AndroidRuntime(15438): at java.lang.reflect.Method.invokeNative(Native Method)

E/AndroidRuntime(15438): at java.lang.reflect.Method.invoke(Method.java:511)

E/AndroidRuntime(15438): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)

E/AndroidRuntime(15438): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)

E/AndroidRuntime(15438): at dalvik.system.NativeStart.main(Native Method)

V/AudioTrack(15438): start 0x2304f58

V/AudioTrack(15438): start 0x2304f58

V/AudioTrack(15438): start 0x2304f58

V/AudioTrack(15438): start 0x2304f58

V/AudioTrack(15438): start 0x2304f58

E/EmbeddedLogger( 1591): App crashed! Process: org.ppsspp.ppsspp

E/EmbeddedLogger( 1591): App crashed! Package: org.ppsspp.ppsspp v81 (0.8.1)

E/EmbeddedLogger( 1591): Application Label: PPSSPP

W/ActivityManager( 1591): Force finishing activity org.ppsspp.ppsspp/.PpssppActivity

@hrydgard
Copy link
Owner

That's a great callstack :) This might fix the crashing, but I don't know if we'll get any input if the device is null... maybe it's only null in the first message or something.

@PewnyPL
Copy link
Contributor Author

PewnyPL commented Jul 31, 2013

Alright, it doesn't crash now, however, like you said, PPSSPP doesn't get any input from DPAD and axes, the buttons still work. I went into input config and spammed the dpad, this is what showed up a LOT in logcat:
W/NativeActivity(18412): Joystick event but failed to get input device state.

@PewnyPL
Copy link
Contributor Author

PewnyPL commented Jul 31, 2013

Also, this seems to show up with every press of buttons other than DPAD and axes with and without PPSSPP running
D/CAT ( 1800): CatService: Return current sInstance
And this is reaction to axes and dpad when outside PPSSPP:
I/PowerManagerService-JNI( 1591): [Stability] PowerManagerService_userActivity JNI pass power key event to PowerManagerService userActivity()

@hrydgard
Copy link
Owner

What's your Android device? Which version of Android is it running?

@PewnyPL
Copy link
Contributor Author

PewnyPL commented Jul 31, 2013

HTC One V running Android 4.0.3 with Sense 4.0
Stock ROM, Stock Kernel, Not rooted. S-ON and bootloader locked.

@PewnyPL
Copy link
Contributor Author

PewnyPL commented Aug 7, 2013

Resurrecting this. I had a chance to try it on some no-name tablet running Android 4.1.1. The version before Native update crashes, the updated one doesn't but still no input recognised. The device was (AFAIK, it wasn't mine) fully stock and locked.

@PewnyPL
Copy link
Contributor Author

PewnyPL commented Sep 19, 2013

Fixed with an earlier Native update, can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants