monkeyswarm / MobMuPlat

MobMuPlat is an iOS & Android app to host PureData patches with custom visual interfaces and hardware access.
www.mobmuplat.com
Other
182 stars 25 forks source link

MobMuPlat android crashing on 'refresh midi devices' #95

Open digitallilllies opened 1 year ago

digitallilllies commented 1 year ago

Hi, tapping 'Refresh Midi Devices' from the Audio + Midi menu crashes MobMuPlat when there is a midi device connected, but not when there isn't. i.e. i get 'USBMIDI: Found 0 MIDI device(s)' (and no crash) when there are no devices connected, but the app crashes and i get 'USBMIDI: Found 1 MIDI device(s)' when there is one connected.

Samsung S10+ Android 12 MobMuPlat ver 0.39

Thanks :)

monkeyswarm commented 1 year ago
09-02 19:09:33.656  3428  3428 E AndroidRuntime: FATAL EXCEPTION: main
09-02 19:09:33.656  3428  3428 E AndroidRuntime: Process: com.iglesiaintermedia.mobmuplat, PID: 3428
09-02 19:09:33.656  3428  3428 E AndroidRuntime: java.lang.IllegalArgumentException: com.iglesiaintermedia.mobmuplat: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
09-02 19:09:33.656  3428  3428 E AndroidRuntime: Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles.
09-02 19:09:33.656  3428  3428 E AndroidRuntime:    at android.app.PendingIntent.checkFlags(PendingIntent.java:375)
09-02 19:09:33.656  3428  3428 E AndroidRuntime:    at android.app.PendingIntent.getBroadcastAsUser(PendingIntent.java:645)
09-02 19:09:33.656  3428  3428 E AndroidRuntime:    at android.app.PendingIntent.getBroadcast(PendingIntent.java:632)
09-02 19:09:33.656  3428  3428 E AndroidRuntime:    at com.noisepages.nettoyeur.usb.UsbDeviceWithInfo.requestPermission(UsbDeviceWithInfo.java:107)
09-02 19:09:33.656  3428  3428 E AndroidRuntime:    at com.iglesiaintermedia.mobmuplat.UsbMidiController.requestNextDevice(UsbMidiController.java:201)
09-02 19:09:33.656  3428  3428 E AndroidRuntime:    at com.iglesiaintermedia.mobmuplat.UsbMidiController.refreshDevices(UsbMidiController.java:266)
09-02 19:09:33.656  3428  3428 E AndroidRuntime:    at com.iglesiaintermedia.mobmuplat.AudioMidiFragment$3.onClick(AudioMidiFragment.java:90)
09-02 19:09:33.656  3428  3428 E AndroidRuntime:    at android.view.View.performClick(View.java:7455)
09-02 19:09:33.656  3428  3428 E AndroidRuntime:    at android.view.View.performClickInternal(View.java:7432)
09-02 19:09:33.656  3428  3428 E AndroidRuntime:    at android.view.View.access$3700(View.java:835)
09-02 19:09:33.656  3428  3428 E AndroidRuntime:    at android.view.View$PerformClick.run(View.java:28810)
09-02 19:09:33.656  3428  3428 E AndroidRuntime:    at android.os.Handler.handleCallback(Handler.java:938)
09-02 19:09:33.656  3428  3428 E AndroidRuntime:    at android.os.Handler.dispatchMessage(Handler.java:99)
09-02 19:09:33.656  3428  3428 E AndroidRuntime:    at android.os.Looper.loopOnce(Looper.java:201)
09-02 19:09:33.656  3428  3428 E AndroidRuntime:    at android.os.Looper.loop(Looper.java:288)
09-02 19:09:33.656  3428  3428 E AndroidRuntime:    at android.app.ActivityThread.main(ActivityThread.java:7870)
09-02 19:09:33.656  3428  3428 E AndroidRuntime:    at java.lang.reflect.Method.invoke(Native Method)
09-02 19:09:33.656  3428  3428 E AndroidRuntime:    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
09-02 19:09:33.656  3428  3428 E AndroidRuntime:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
09-02 19:09:33.660  2053  3668 I DropBoxManagerService: add tag=data_app_crash isTagEnabled=true flags=0x2
09-02 19:09:33.661  2053  2483 W ActivityTaskManager:   Force finishing activity com.iglesiaintermedia.mobmuplat/.MainActivity
09-02 19:09:33.673  1082  1086 W statsd  : StateTracker not found for state atom 386
09-02 19:09:33.678  2053  2103 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.DROPBOX_ENTRY_ADDED flg=0x10 (has extras) } to com.google.android.gms/.stats.service.DropBoxEntryAddedReceiver
09-02 19:09:33.678  2053  2103 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.DROPBOX_ENTRY_ADDED flg=0x10 (has extras) } to com.google.android.gms/.chimera.GmsIntentOperationService$PersistentTrustedReceiver
09-02 19:09:33.683  3428  3428 I Process : Sending signal. PID: 3428 SIG: 9
09-02 19:09:33.711  2053  2483 I ActivityManager: Process com.iglesiaintermedia.mobmuplat (pid 3428) has died: fg  TOP 
09-02 19:09:33.712  2053  2459 I WindowManager: WIN DEATH: Window{38ae232 u0 com.iglesiaintermedia.mobmuplat/com.iglesiaintermedia.mobmuplat.MainActivity}
digitallilllies commented 1 year ago

?

monkeyswarm commented 1 year ago

That's the crash. The OS is killing the app because it uses SDK >= 31, but a call to a library to request permission (UsbDeviceWithInfo.requestPermission) is missing a required flag.

digitallilllies commented 1 year ago

i see, is there any way i can resolve this? many thanks :)

monkeyswarm commented 1 year ago

No, this needs to be updated in the code, and a new version released.