yasirkula / UnityNativeGallery

A native Unity plugin to interact with Gallery/Photos on Android & iOS (save and/or load images/videos)
MIT License
1.4k stars 199 forks source link

Android 12 specific crash #287

Open maxpushkarev opened 1 year ago

maxpushkarev commented 1 year ago

Description of the bug

Android 12: Application crashes after image selection

Reproduction steps

Platform specs

Additional info

thread.cc:2365] No pending exception expected: java.lang.SecurityException: listen thread.cc:2365] at java.lang.Exception android.os.Parcel.createExceptionOrNull(int, java.lang.String) (Parcel.java:2426) thread.cc:2365] at java.lang.Exception android.os.Parcel.createException(int, java.lang.String) (Parcel.java:2410) thread.cc:2365] at void android.os.Parcel.readException(int, java.lang.String) (Parcel.java:2393) thread.cc:2365] at void android.os.Parcel.readException() (Parcel.java:2335) thread.cc:2365] at void com.android.internal.telephony.ITelephonyRegistry$Stub$Proxy.listenWithEventList(int, java.lang.String, java.lang.String, com.android.internal.telephony.IPhoneStateListener, int[], boolean) (ITelephonyRegistry.java:1036) thread.cc:2365] at void android.telephony.TelephonyRegistryManager.listenFromListener(int, java.lang.String, java.lang.String, android.telephony.PhoneStateListener, int, boolean) (TelephonyRegistryManager.java:250) thread.cc:2365] at void android.telephony.TelephonyManager.listen(android.telephony.PhoneStateListener, int) (TelephonyManager.java:5999) thread.cc:2365] at void com.unity3d.player.UnityPlayer.addPhoneCallListener() ((null):-1) thread.cc:2365] at boolean com.unity3d.player.UnityPlayer.nativeRender() ((null):-2) thread.cc:2365] at boolean com.unity3d.player.UnityPlayer.access$300(com.unity3d.player.UnityPlayer) ((null):-1) thread.cc:2365] at boolean com.unity3d.player.UnityPlayer$e$1.handleMessage(android.os.Message) ((null):-1) thread.cc:2365] at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:102) thread.cc:2365] at boolean android.os.Looper.loopOnce(android.os.Looper, long, int) (Looper.java:201) thread.cc:2365] at void android.os.Looper.loop() (Looper.java:288) thread.cc:2365] at void com.unity3d.player.UnityPlayer$e.run() ((null):-1) thread.cc:2365] Caused by: android.os.RemoteException: Remote stack trace: thread.cc:2365] at com.android.internal.telephony.TelephonyPermissions.enforceCarrierPrivilege(TelephonyPermissions.java:634) thread.cc:2365] at com.android.internal.telephony.TelephonyPermissions.checkReadPhoneState(TelephonyPermissions.java:149) thread.cc:2365] at com.android.internal.telephony.TelephonyPermissions.checkCallingOrSelfReadPhoneState(TelephonyPermissions.java:94) thread.cc:2365] at com.android.server.TelephonyRegistry.checkListenerPermission(TelephonyRegistry.java:3157) thread.cc:2365] at com.android.server.TelephonyRegistry.listen(TelephonyRegistry.java:1024) thread.cc:2365]

yasirkula commented 1 year ago

Might be helpful: https://forum.unity.com/threads/android-12-telephony-crash.1287986/#post-8333406