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

[BUG] Controllers not supported with Android 12 #2254

Closed
Timbo303 opened this issue Nov 18, 2021 · 10 comments
Closed

[BUG] Controllers not supported with Android 12 #2254

Timbo303 opened this issue Nov 18, 2021 · 10 comments
Labels
bug Something isn't working

Comments

@Timbo303
Copy link

Describe the bug

Any Controller I try crashes the entire game after one single controller input. Everything else works just fine otherwise.

java.lang.NullPointerException: Attempt to invoke virtual method 'void java.lang.reflect.Field.setInt(java.lang.Object, int)' on a null object reference
at net.kdt.pojavlaunch.customcontrols.gamepad.GamepadDpad.setDummyEventKeycode(GamepadDpad.java:76)
at net.kdt.pojavlaunch.customcontrols.gamepad.GamepadDpad.convertEvent(GamepadDpad.java:67)
at net.kdt.pojavlaunch.customcontrols.gamepad.Gamepad.update(Gamepad.java:158)
at net.kdt.pojavlaunch.BaseMainActivity.dispatchGenericMotionEvent(BaseMainActivity.java:593)
at androidx.appcompat.view.WindowCallbackWrapper.dispatchGenericMotionEvent(WindowCallbackWrapper.java:79)
at com.android.internal.policy.DecorView.dispatchGenericMotionEvent(DecorView.java:958)
at android.view.ViewRootImpl$ViewPostImeInputStage.processGenericMotionEvent(ViewRootImpl.java:7724)
at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:7442)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:6773)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:6830)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:6796)
at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:6994)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:6804)
at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:7051)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:6777)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:6830)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:6796)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:6804)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:6777)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:6830)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:6796)
at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:7027)
at android.view.ViewRootImpl$ImeInputStage.onFinishedInputEvent(ViewRootImpl.java:7214)
at android.view.inputmethod.InputMethodManager$PendingEvent.run(InputMethodManager.java:3387)
at android.view.inputmethod.InputMethodManager.invokeFinishedInputEventCallback(InputMethodManager.java:2948)
at android.view.inputmethod.InputMethodManager.finishedInputEvent(InputMethodManager.java:2939)
at android.view.inputmethod.InputMethodManager$ImeInputEventSender.onInputEventFinished(InputMethodManager.java:3364)
at android.view.InputEventSender.dispatchInputEventFinished(InputEventSender.java:154)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:335)
at android.os.Looper.loopOnce(Looper.java:186)
at android.os.Looper.loop(Looper.java:313)
at android.app.ActivityThread.main(ActivityThread.java:8582)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:563)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1133)

The log file and images/videos

No response

Steps To Reproduce

1. Start game with android 12 and any controller connected to phone
2. Press any input after startup
3. Grats your game crashes.

Expected Behavior

Basically not a crash

Platform

- Device model: Samsung S21 5G
- CPU architecture: Snapdragon 888
- Android version: 12
- PojavLauncher version: Any

Anything else?

No response

@Timbo303 Timbo303 added the bug Something isn't working label Nov 18, 2021
@Mathias-Boulay
Copy link
Contributor

duplicate from #2217, but at least it confirms the common denominator is android 12 behavior.
Sadly I don't have an android 12 device, so looking at this matter is going to take some time

@Timbo303
Copy link
Author

Timbo303 commented Nov 18, 2021 via email

@Mathias-Boulay
Copy link
Contributor

@Timbo303 no problem, just buy me one 😂

@ajit850
Copy link

ajit850 commented Nov 20, 2021

@Timbo303 no problem, just buy me one 😂

😂😂😂😂

@Vixeliz
Copy link

Vixeliz commented Nov 23, 2021

Also happening here android 12 s21 ultra

@Vixeliz
Copy link

Vixeliz commented Nov 23, 2021

New control revision doesn't seem to fix it by the way

@Mathias-Boulay
Copy link
Contributor

Known, the small cleanup PR will though
#2267

@Vixeliz
Copy link

Vixeliz commented Nov 23, 2021

Ok awesome! Is there any github action to get a build of that pr?

@Mathias-Boulay
Copy link
Contributor

Not yet, but you won't have to wait too much

@Mathias-Boulay
Copy link
Contributor

merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants