videokit-ai / videokit

Low-code, cross-platform media SDK for Unity Engine. Register at https://videokit.ai
https://videokit.ai
Apache License 2.0
107 stars 14 forks source link

App Crashes when asking for Camera Permission on Android #83

Closed pnostudiodeveloper closed 5 months ago

pnostudiodeveloper commented 12 months ago

I have not been able to find a way around this - this is currently crippling my app.

Unity 2021.3.31f1

Android 12, 13 tested

Call Stack for Android crash

E Build fingerprint: 'samsung/a14xmue/a14xm:13/TP1A.220624.014/A146U1UEU4BWI5:user/release-keys' E Revision: '0' E ABI: 'arm' E Timestamp: 2023-11-30 09:37:17-0800 E pid: 5683, tid: 5870, name: Thread-109 >>> com.VisualMusicDesign.SeeMusic <<< E uid: 10279 E signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr -------- E r0 00000000 r1 000016ee r2 00000006 r3 a8239bd8 E r4 a8239be8 r5 a8239bd0 r6 00001633 r7 0000016b E r8 00000000 r9 ffffffff r10 a8239bd8 r11 00000000 E ip 000016ee sp a8239bb8 lr eb08651f pc eb086532 E backtrace: E #00 pc 00062532 /apex/com.android.runtime/lib/bionic/libc.so (prop_area::map_prop_area_rw(char const, char const, bool*)+254) (BuildId: f734bc7ed94a319ed18ede42bc901098) E managed backtrace: E #00 (wrapper managed-to-native) UnityEngine.AndroidJNI:CallStaticObjectMethod (intptr,intptr,UnityEngine.jvalue[]) E #01 UnityEngine.AndroidJNISafe:CallStaticObjectMethod (intptr,intptr,UnityEngine.jvalue[]) <0x27> E #02 UnityEngine.AndroidReflection:GetMethodMember (intptr,string,string,bool) <0x11b> E #03 UnityEngine._AndroidJNIHelper:GetMethodID (intptr,string,string,bool) <0x5f> E #04 UnityEngine.AndroidJNIHelper:GetMethodID (intptr,string,string,bool) <0x2b> E #05 UnityEngine._AndroidJNIHelper:GetMethodID (intptr,string,object[],bool) <0x43> E #06 UnityEngine.AndroidJNIHelper:GetMethodID (intptr,string,object[],bool) <0x3b> E #07 UnityEngine.AndroidJavaObject:_Call (string,object[]) <0x87> E #08 UnityEngine.AndroidJavaObject:Call (string,object[]) <0x33> E #09 UnityEngine._AndroidJNIHelper:GetSignature (object) <0x56b> E #10 UnityEngine._AndroidJNIHelper:GetSignature (object[]) <0x67> E #11 UnityEngine._AndroidJNIHelper:GetMethodID (intptr,string,object[],bool) <0x1f> E #12 UnityEngine.AndroidJNIHelper:GetMethodID (intptr,string,object[],bool) <0x2b> E #13 UnityEngine.AndroidJavaObject:_CallStatic (string,object[]) <0x67> E #14 UnityEngine.AndroidJavaObject:CallStatic (string,object[]) <0x23> E #15 UnityEngine.Android.Permission:HasUserAuthorizedPermission (string) <0xb7> E #16 VideoKit.Devices.MediaDevice:g__GetPermissionStatus|27_3 (string) <0x13> E #17 VideoKit.Devices.MediaDevice:CheckPermissionsAndroid (VideoKit.Internal.VideoKit/PermissionType,bool) <0x2f> E #18 VideoKit.Devices.MediaDevice:CheckPermissions (VideoKit.Internal.VideoKit/PermissionType,bool) <0x27> E #19 VideoKit.Devices.AudioDevice:CheckPermissions (bool) <0x17> E #20 MIDIControl/HEGACJCNODG:MoveNext () <0x47> E #21 System.Runtime.CompilerServices.AsyncTaskMethodBuilder:Start<MIDIControl/HEGACJCNODG> (MIDIControl/HEGACJCNODG&) <0xbb> E #22 MIDIControl:GCIEKGPBOJB () <0x9f> E #23 MIDIControl/EOMKNNJCMHP:MoveNext () <0x43> E #24 System.Runtime.CompilerServices.AsyncTaskMethodBuilder:Start<MIDIControl/EOMKNNJCMHP> (MIDIControl/EOMKNNJCMHP&) <0xbb> E #25 MIDIControl:EKCLABCFMMJ () <0x9f> E #26 System.Threading.Tasks.Task`1:InnerInvoke () <0x53> E #27 System.Threading.Tasks.Task:Execute () <0x2b> E #28 System.Threading.Tasks.Task:ExecutionContextCallback (object) <0x47> E #29 System.Threading.ExecutionContext:RunInternal (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool) <0x1bb> E #30 System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool) <0x2b> E #31 System.Threading.Tasks.Task:ExecuteWithThreadLocal (System.Threading.Tasks.Task&) <0x103> E #32 System.Threading.Tasks.Task:ExecuteEntry (bool) <0xc3> E #33 System.Threading.Tasks.Task:System.Threading.IThreadPoolWorkItem.ExecuteWorkItem () <0x17> E #34 System.Threading.ThreadPoolWorkQueue:Dispatch () <0x213> E #35 System.Threading._ThreadPoolWaitCallback:PerformWaitCallback () <0x3f> E #36 (wrapper runtime-invoke) :runtime_invoke_bool (object,intptr,intptr,intptr) E Forwarding signal 6 A Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 5870 (Thread-109), pid 5683 (Design.SeeMusic) ---------------------------- PROCESS ENDED (5683) for package com.VisualMusicDesign.SeeMusic ----------------------------

pnostudiodeveloper commented 12 months ago

The crash happens when checking either:

AudioDevice.Discover() VideoDevice.Discover()

or checking permissions for either audio or video devices.

pnostudiodeveloper commented 11 months ago

Wondering if the 0.0.18 alpha released tonight includes a fix for this?

(I know you had previously mentioned on email to look for a fix in the alpha coming beginning of this week)

olokobayusuf commented 11 months ago

No but this is up next, will follow up on ETA. I've had some delays come up from other issues devs have raised.

pnostudiodeveloper commented 11 months ago

Thank you

pnostudiodeveloper commented 11 months ago

Is there any chance there could be an alpha with a fix for this before Monday?

Thank you

olokobayusuf commented 11 months ago

@pnostudiodeveloper working on it right now, will post updates as I have them.

olokobayusuf commented 11 months ago

Hey @pnostudiodeveloper can you test out VideoKit 0.0.18-alpha.2? Follow the install instructions here. Happy weekend!

pnostudiodeveloper commented 11 months ago

It's working! Thanks very much.

olokobayusuf commented 11 months ago

Sounds good.

olokobayusuf commented 5 months ago

Closing this ahead of the 0.0.18 update.