Ilan12346-maya / XinputBridge

GNU General Public License v3.0
63 stars 1 forks source link

Immediately crashes when starting service on Samsung #6

Closed dstarikov closed 4 months ago

dstarikov commented 5 months ago

The app crashes as soon as I push the button to start the overlay service. The draw-on-top-of-other-apps permission has been granted to the app. I am using a ps5 controller connected via USB - it is detected by the gamepad info screen in the app.

This is happening on the latest release as well as the previous one on my Galaxy Z Fold 4, running OneUI 6.0 and Android 14

Here is a logcat I pulled from the crash:

04-22 22:44:12.710 19787 19787 E AndroidRuntime: Process: com.ilan12346.xinputbridge, PID: 19787 04-22 22:44:12.710 19787 19787 E AndroidRuntime: java.lang.RuntimeException: Unable to start service com.ilan12346.xinputbridge.OverlayService@277a1ac with Intent { cmp=com.ilan12346.xinputbridge/.OverlayService }: java.lang.ArrayIndexOutOfBoundsException: length=64; index=64 04-22 22:44:12.710 19787 19787 E AndroidRuntime: at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:5286) 04-22 22:44:12.710 19787 19787 E AndroidRuntime: at android.app.ActivityThread.-$$Nest$mhandleServiceArgs(Unknown Source:0) 04-22 22:44:12.710 19787 19787 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2531) 04-22 22:44:12.710 19787 19787 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:106) 04-22 22:44:12.710 19787 19787 E AndroidRuntime: at android.os.Looper.loopOnce(Looper.java:230) 04-22 22:44:12.710 19787 19787 E AndroidRuntime: at android.os.Looper.loop(Looper.java:319) 04-22 22:44:12.710 19787 19787 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:8913) 04-22 22:44:12.710 19787 19787 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method) 04-22 22:44:12.710 19787 19787 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:608) 04-22 22:44:12.710 19787 19787 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103) 04-22 22:44:12.710 19787 19787 E AndroidRuntime: Caused by: java.lang.ArrayIndexOutOfBoundsException: length=64; index=64 04-22 22:44:12.710 19787 19787 E AndroidRuntime: at com.ilan12346.xinputbridge.OverlayService.onStartCommand(Unknown Source:143) 04-22 22:44:12.710 19787 19787 E AndroidRuntime: at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:5268) 04-22 22:44:12.710 19787 19787 E AndroidRuntime: ... 9 more

ynixt commented 5 months ago

The app crashes as soon as I push the button to start the overlay service. The draw-on-top-of-other-apps permission has been granted to the app. I am using a ps5 controller connected via USB - it is detected by the gamepad info screen in the app.

This is happening on the latest release as well as the previous one on my Galaxy Z Fold 4, running OneUI 6.0 and Android 14

Here is a logcat I pulled from the crash:

Just to confirm: did you clicked first on "grant permissions" button?

dstarikov commented 5 months ago

Yes. The permission is granted. Screenshot_20240423_155302_Settings.jpg

Ilan12346-maya commented 5 months ago

The app crashes as soon as I push the button to start the overlay service.

Is this also the Case If you fold it and use the Front Screen? Thanks for the logcat

dstarikov commented 5 months ago

Huh....

I just tried using it when folded closed for the first time and it seems to work. After that, it seems to now be working fine in unfolded mode as well.

Seems like running it when folded closed fixed the issue, or perhaps it was from rebooting my phone.

Since then, I have tried uninstalling the app and re-installing it in unfolded mode only. The issue hasn't come back for me - perhaps it was something with my phone that rebooting fixed.

It it is working correctly with termux + termux-x11 now: Screenshot_20240423_183924_TermuxX11

Awesome work on this, thanks guys!

dstarikov commented 5 months ago

On a side note, is there any reason why XinputBridge needs to be a separate app?

This project is building off of the work from this repo, right? xinput-bridge

I've been thinking about implementing similar project myself, but was thinking to do this directly within termux-x11.

Have you considered trying to integrate this functionality directly into the termux-x11 app itself instead? That would completely eliminate the need for an overlay I imagine.

Are there any source files or documentation on building winefiles for this project?

ynixt commented 5 months ago

On a side note, is there any reason why XinputBridge needs to be a separate app?

This project is building off of the work from this repo, right? xinput-bridge

I've been thinking about implementing similar project myself, but was thinking to do this directly within termux-x11.

Have you considered trying to integrate this functionality directly into the termux-x11 app itself instead? That would completely eliminate the need for an overlay I imagine.

Are there any source files or documentation on building winefiles for this project?

Currently is on a side project because was easier to made! Just it. You're completely welcome to try to implement directly on x11. The current DLLs was reused from winlator, here is the source

Ilan12346-maya commented 4 months ago

It have nothing To-Do with this Project, only Like Same Name

In Future i will intigration it to termux x11 but at First it should be Rock stable 💪🏻

Working on.

Ilan12346-maya commented 4 months ago

Will add termux x11 with XinputBridge intigration later

IMG_20240508_044542_904

The App and the modified termuxx11 App will live Side by Side