firebase / firebase-unity-sdk

The Firebase SDK for Unity
http://firebase.google.com
Apache License 2.0
227 stars 37 forks source link

[Bug] iOS application crashes on the second when "docRef.Listen" is called #697

Closed vcLS132 closed 1 year ago

vcLS132 commented 1 year ago

[REQUIRED] Please fill in the following fields:

[REQUIRED] Please describe the issue here:

Only the iOS application crashes on the second run when firestore document listener a.k.a "docRef.Listen" is called. When I reinstall the application and open it for the first time there are no crashes and everything works as it should. Now I close the application and remove it from the recent applications list also. Now when I open it again and make the call for "docRef.Listen" it crashes. Crash reported by the crashlytics is Fatal Exception: InvalidPathValidation (child:) Must be a non-empty string and not contain '.' '#' '$' '[' or ']' Crashed: com.google.firebase.crashlytics.ios.exception SIGABRT ABORT 0x000000020b0ed674 The document that I am trying to access is also present as it can be accessed in the first run and if any changes are made to document data they are also listened by the listener in the application also so everything is working smoothly in the first run. NOTE:- Android application with same code and same everything is not crashing in any scenario. (Please list the full steps to reproduce the issue. Include device logs, Unity logs, and stack traces if available.)

# Crashlytics - Stack trace
# Application: com.tymediaus.kitchenclout
# Platform: apple
# Version: 3.2 (196)
# Issue: a88b60b1b1bdd52133a5dabf5e761279
# Session: fa1227f9af534a4896dbfaa493c54484_DNE_0_v2
# Date: Thu May 04 2023 10:54:40 GMT+0530 (India Standard Time)

Fatal Exception: InvalidPathValidation
0  CoreFoundation                 0x9e38 __exceptionPreprocess
1  libobjc.A.dylib                0x178d8 objc_exception_throw
2  FirebaseDatabase               0x5624c (Missing UUID 061a960472d93b639a01e1743cd3ac1e)
3  FirebaseDatabase               0x1e700 (Missing UUID 061a960472d93b639a01e1743cd3ac1e)
4  UnityFramework                 0x10279a8 firebase::database::internal::DatabaseReferenceInternal::Child(char const*)
5  UnityFramework                 0x1007540 firebase::database::DatabaseReference::Child(char const*) const
6  UnityFramework                 0x1040eb0 Firebase_Database_CSharp_InternalDatabaseReference_Child__SWIG_0
7  UnityFramework                 0x1589020 selector_thread(void*) (.cold.1)
8  UnityFramework                 0x1588f48 selector_thread(void*) (.cold.1)
9  UnityFramework                 0x14a3358 selector_thread(void*) (.cold.1)
10 UnityFramework                 0x142d2bc selector_thread(void*) (.cold.1)
11 UnityFramework                 0x14a2ca8 selector_thread(void*) (.cold.1)
12 UnityFramework                 0x1731e2c selector_thread(void*) (.cold.1)
13 UnityFramework                 0x15ae8c8 selector_thread(void*) (.cold.1)
14 UnityFramework                 0x183d15c selector_thread(void*) (.cold.1)
15 UnityFramework                 0x17444d8 selector_thread(void*) (.cold.1)
16 UnityFramework                 0x159d624 selector_thread(void*) (.cold.1)
17 KitchenClout                   0x399d8 ReversePInvokeWrapper.DocumentReference_DocumentSnapshotsHandler (Firebase.Firestore.cpp)
18 UnityFramework                 0x130475c firebase::firestore::csharp::(anonymous namespace)::ListenerCallback::Run()
19 UnityFramework                 0x1303fa4 firebase::firestore::csharp::(anonymous namespace)::ListenerCallback::Run(firebase::firestore::csharp::(anonymous namespace)::ListenerCallback*)
20 UnityFramework                 0x1304a40 firebase::callback::CallbackMoveValue1<firebase::firestore::csharp::(anonymous namespace)::ListenerCallback>::Run()
21 UnityFramework                 0x10a25a0 firebase::callback::CallbackEntry::Execute()
22 UnityFramework                 0x109fdd4 firebase::callback::CallbackDispatcher::DispatchCallbacks()
23 UnityFramework                 0x109fd1c firebase::callback::PollCallbacks()
24 UnityFramework                 0x115c370 Firebase_App_CSharp_PollCallbacks
25 UnityFramework                 0x1574194 selector_thread(void*) (.cold.1)
26 UnityFramework                 0x15b8cf8 selector_thread(void*) (.cold.1)
27 UnityFramework                 0xc00a0 RuntimeInvoker_TrueVoid(void (*)(), MethodInfo const*, void*, void**) (Il2CppInvokerTable.cpp)
28 UnityFramework                 0xfdf448 il2cpp::vm::Runtime::Invoke(MethodInfo const*, void*, void**, Il2CppException**) + 576 (Runtime.cpp:576)
29 UnityFramework                 0x848178 scripting_method_invoke(ScriptingMethodPtr, ScriptingObjectPtr, ScriptingArguments&, ScriptingExceptionPtr*, bool) + 292 (ScriptingApi_Il2Cpp.cpp:292)
30 UnityFramework                 0x84bd28 ScriptingInvocation::Invoke(ScriptingExceptionPtr*, bool) + 273 (ScriptingInvocation.cpp:273)
31 UnityFramework                 0x8627bc MonoBehaviour::CallUpdateMethod(int) + 534 (MonoBehaviour.cpp:534)
32 UnityFramework                 0x6b6908 void BaseBehaviourManager::CommonUpdate<BehaviourManager>() + 178 (Behaviour.cpp:178)
33 UnityFramework                 0x77d010 ExecutePlayerLoop(NativePlayerLoopSystem*) + 383 (PlayerLoop.cpp:383)
34 UnityFramework                 0x77d050 ExecutePlayerLoop(NativePlayerLoopSystem*) + 407 (PlayerLoop.cpp:407)
35 UnityFramework                 0x77d31c PlayerLoop() + 514 (PlayerLoop.cpp:514)
36 UnityFramework                 0xb4f024 UnityPlayerLoopImpl(bool) + 328 (LibEntryPoint.mm:328)
37 UnityFramework                 0x14e68 -[UnityAppController(Rendering) repaint] + 233 (UnityAppController+Rendering.mm:233)
38 UnityFramework                 0x14df8 -[UnityAppController(Rendering) repaintDisplayLink] + 72 (UnityAppController+Rendering.mm:72)
39 QuartzCore                     0x28ca4 CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long)
40 QuartzCore                     0x3a6f8 display_timer_callback(__CFMachPort*, void*, long, void*)
41 CoreFoundation                 0x7b7f4 __CFMachPortPerform
42 CoreFoundation                 0x98cd0 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__
43 CoreFoundation                 0x9a8d8 __CFRunLoopDoSource1
44 CoreFoundation                 0x7c110 __CFRunLoopRun
45 CoreFoundation                 0x80eb0 CFRunLoopRunSpecific
46 GraphicsServices               0x1368 GSEventRunModal
47 UIKitCore                      0x3a1668 -[UIApplication _run]
48 UIKitCore                      0x3a12cc UIApplicationMain
49 UnityFramework                 0x149d0 -[UnityFramework runUIApplicationMainWithArgc:argv:] + 96 (main.mm:96)
50 KitchenClout                   0x7cec main + 28 (main.mm:28)
51 ???                            0x1ec7e8960 (Missing)

Crashed: com.google.firebase.crashlytics.ios.exception
0  FirebaseCrashlytics            0x1eea8 FIRCLSProcessRecordAllThreads + 184
1  FirebaseCrashlytics            0x1f288 FIRCLSProcessRecordAllThreads + 1176
2  FirebaseCrashlytics            0x164d4 FIRCLSHandler + 48
3  FirebaseCrashlytics            0x111a8 __FIRCLSExceptionRecord_block_invoke + 92
4  libdispatch.dylib              0x3f88 _dispatch_client_callout + 20
5  libdispatch.dylib              0x13574 _dispatch_lane_barrier_sync_invoke_and_complete + 56
6  FirebaseCrashlytics            0x101b4 FIRCLSExceptionRecord + 204
7  FirebaseCrashlytics            0x10cc8 FIRCLSExceptionRecordNSException + 452
8  FirebaseCrashlytics            0xfe0c FIRCLSTerminateHandler() + 404
9  libc++abi.dylib                0x10f28 std::__terminate(void (*)()) + 20
10 libc++abi.dylib                0x13c2c __cxa_get_exception_ptr + 34
11 libc++abi.dylib                0x13bd8 __cxxabiv1::exception_cleanup_func(_Unwind_Reason_Code, _Unwind_Exception*) + 138
12 libobjc.A.dylib                0x17a38 objc_exception_throw + 412
13 FirebaseDatabase               0x5624c +[FValidation validateFrom:validPathString:] + 198
14 FirebaseDatabase               0x1e700 -[FIRDatabaseReference child:] + 108
15 UnityFramework                 0x10279a8 firebase::database::internal::DatabaseReferenceInternal::Child(char const*) + 168
16 UnityFramework                 0x1007540 firebase::database::DatabaseReference::Child(char const*) const + 76
17 UnityFramework                 0x1040eb0 Firebase_Database_CSharp_InternalDatabaseReference_Child__SWIG_0 + 136
18 UnityFramework                 0x1589020 selector_thread(void*) (.cold.1) + 4441477152
19 UnityFramework                 0x1588f48 selector_thread(void*) (.cold.1) + 4441476936
20 UnityFramework                 0x14a3358 selector_thread(void*) (.cold.1) + 4440535896
21 UnityFramework                 0x142d2bc selector_thread(void*) (.cold.1) + 4440052412
22 UnityFramework                 0x14a2ca8 selector_thread(void*) (.cold.1) + 4440534184
23 UnityFramework                 0x1731e2c selector_thread(void*) (.cold.1) + 4443217452
24 UnityFramework                 0x15ae8c8 selector_thread(void*) (.cold.1) + 4441630920
25 UnityFramework                 0x183d15c selector_thread(void*) (.cold.1) + 4444311900
26 UnityFramework                 0x17444d8 selector_thread(void*) (.cold.1) + 4443292888
27 UnityFramework                 0x159d624 selector_thread(void*) (.cold.1) + 4441560612
28 KitchenClout                   0x399d8 ReversePInvokeWrapper.DocumentReference_DocumentSnapshotsHandler (Firebase.Firestore.cpp)
29 UnityFramework                 0x130475c firebase::firestore::csharp::(anonymous namespace)::ListenerCallback::Run() + 10980
30 UnityFramework                 0x1303fa4 firebase::firestore::csharp::(anonymous namespace)::ListenerCallback::Run(firebase::firestore::csharp::(anonymous namespace)::ListenerCallback*) + 9004
31 UnityFramework                 0x1304a40 firebase::callback::CallbackMoveValue1<firebase::firestore::csharp::(anonymous namespace)::ListenerCallback>::Run() + 11720
32 UnityFramework                 0x10a25a0 firebase::callback::CallbackEntry::Execute() + 144
33 UnityFramework                 0x109fdd4 firebase::callback::CallbackDispatcher::DispatchCallbacks() + 116
34 UnityFramework                 0x109fd1c firebase::callback::PollCallbacks() + 68
35 UnityFramework                 0x115c370 Firebase_App_CSharp_PollCallbacks + 12
36 UnityFramework                 0x1574194 selector_thread(void*) (.cold.1) + 4441391508
37 UnityFramework                 0x15b8cf8 selector_thread(void*) (.cold.1) + 4441672952
38 UnityFramework                 0xc00a0 RuntimeInvoker_TrueVoid(void (*)(), MethodInfo const*, void*, void**) (Il2CppInvokerTable.cpp)
39 UnityFramework                 0xfdf448 il2cpp::vm::Runtime::Invoke(MethodInfo const*, void*, void**, Il2CppException**) + 576 (Runtime.cpp:576)
40 UnityFramework                 0x848178 scripting_method_invoke(ScriptingMethodPtr, ScriptingObjectPtr, ScriptingArguments&, ScriptingExceptionPtr*, bool) + 292 (ScriptingApi_Il2Cpp.cpp:292)
41 UnityFramework                 0x84bd28 ScriptingInvocation::Invoke(ScriptingExceptionPtr*, bool) + 273 (ScriptingInvocation.cpp:273)
42 UnityFramework                 0x8627bc MonoBehaviour::CallUpdateMethod(int) + 534 (MonoBehaviour.cpp:534)
43 UnityFramework                 0x6b6908 void BaseBehaviourManager::CommonUpdate<BehaviourManager>() + 178 (Behaviour.cpp:178)
44 UnityFramework                 0x77d010 ExecutePlayerLoop(NativePlayerLoopSystem*) + 383 (PlayerLoop.cpp:383)
45 UnityFramework                 0x77d050 ExecutePlayerLoop(NativePlayerLoopSystem*) + 407 (PlayerLoop.cpp:407)
46 UnityFramework                 0x77d31c PlayerLoop() + 514 (PlayerLoop.cpp:514)
47 UnityFramework                 0xb4f024 UnityPlayerLoopImpl(bool) + 328 (LibEntryPoint.mm:328)
48 UnityFramework                 0x14e68 -[UnityAppController(Rendering) repaint] + 233 (UnityAppController+Rendering.mm:233)
49 UnityFramework                 0x14df8 -[UnityAppController(Rendering) repaintDisplayLink] + 72 (UnityAppController+Rendering.mm:72)
50 QuartzCore                     0x28ca4 CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 820
51 QuartzCore                     0x3a6f8 display_timer_callback(__CFMachPort*, void*, long, void*) + 372
52 CoreFoundation                 0x7b7f4 __CFMachPortPerform + 176
53 CoreFoundation                 0x98cd0 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 60
54 CoreFoundation                 0x9a8d8 __CFRunLoopDoSource1 + 520
55 CoreFoundation                 0x7c110 __CFRunLoopRun + 2264
56 CoreFoundation                 0x80eb0 CFRunLoopRunSpecific + 612
57 GraphicsServices               0x1368 GSEventRunModal + 164
58 UIKitCore                      0x3a1668 -[UIApplication _run] + 888
59 UIKitCore                      0x3a12cc UIApplicationMain + 340
60 UnityFramework                 0x149d0 -[UnityFramework runUIApplicationMainWithArgc:argv:] + 96 (main.mm:96)
61 KitchenClout                   0x7cec main + 28 (main.mm:28)
62 ???                            0x1ec7e8960 (Missing)

Thread
0  libsystem_kernel.dylib         0x12b0 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0xe44 _pthread_wqthread + 364
2  libsystem_pthread.dylib        0xb98 start_wqthread + 8

Thread
0  libsystem_kernel.dylib         0x12b0 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0xe44 _pthread_wqthread + 364
2  libsystem_pthread.dylib        0xb98 start_wqthread + 8

com.google.firebase.firestore.rpc
0  libsystem_kernel.dylib         0x4494 poll + 8
1  grpc                           0x83564 pollset_work(grpc_pollset*, grpc_pollset_worker**, long long) + 1260
2  grpc                           0x853e0 pollset_work(grpc_pollset*, grpc_pollset_worker**, long long) + 72
3  grpc                           0x6886c cq_next(grpc_completion_queue*, gpr_timespec, void*) + 320
4  grpcpp                         0x1a34c grpc::CompletionQueue::AsyncNextInternal(void**, bool*, gpr_timespec) + 60
5  FirebaseFirestore              0x2ebc4 firebase::firestore::remote::Datastore::PollGrpcQueue() + 104
6  FirebaseFirestore              0x1516c4 firebase::firestore::util::Task::ExecuteAndRelease() + 184
7  libdispatch.dylib              0x3f88 _dispatch_client_callout + 20
8  libdispatch.dylib              0xb640 _dispatch_lane_serial_drain + 672
9  libdispatch.dylib              0xc18c _dispatch_lane_invoke + 384
10 libdispatch.dylib              0x16e10 _dispatch_workloop_worker_thread + 652
11 libsystem_pthread.dylib        0xdf8 _pthread_wqthread + 288
12 libsystem_pthread.dylib        0xb98 start_wqthread + 8

com.apple.uikit.eventfetch-thread
0  libsystem_kernel.dylib         0xda8 mach_msg2_trap + 8
1  libsystem_kernel.dylib         0x13a1c mach_msg2_internal + 80
2  libsystem_kernel.dylib         0x13c5c mach_msg_overwrite + 388
3  libsystem_kernel.dylib         0x12ec mach_msg + 24
4  CoreFoundation                 0x7aac4 __CFRunLoopServiceMachPort + 160
5  CoreFoundation                 0x7bd08 __CFRunLoopRun + 1232
6  CoreFoundation                 0x80eb0 CFRunLoopRunSpecific + 612
7  Foundation                     0x42054 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 212
8  Foundation                     0x41f3c -[NSRunLoop(NSRunLoop) runUntilDate:] + 64
9  UIKitCore                      0x4d66a4 -[UIEventFetcher threadMain] + 436
10 Foundation                     0x5b518 __NSThread__start__ + 716
11 libsystem_pthread.dylib        0x16cc _pthread_start + 148
12 libsystem_pthread.dylib        0xba4 thread_start + 8

GC Finalizer
0  libsystem_kernel.dylib         0x167c __psynch_cvwait + 8
1  libsystem_pthread.dylib        0x806c _pthread_cond_wait + 1232
2  UnityFramework                 0xfa78b0 il2cpp::os::posix::PosixWaitObject::Wait(unsigned int, bool) + 120 (PosixWaitObject.cpp:120)
3  UnityFramework                 0xf7b7b0 il2cpp::gc::FinalizerThread(void*) + 431 (BoehmGC.cpp:431)
4  UnityFramework                 0xf9eccc il2cpp::os::Thread::RunWrapper(void*) + 183 (Thread.cpp:183)
5  UnityFramework                 0xfa0f3c il2cpp::os::ThreadImpl::ThreadStartWrapper(void*) + 127 (ThreadImpl.cpp:127)
6  libsystem_pthread.dylib        0x16cc _pthread_start + 148
7  libsystem_pthread.dylib        0xba4 thread_start + 8

Job.Worker 0
0  libsystem_kernel.dylib         0xd24 semaphore_wait_trap + 8
1  libdispatch.dylib              0x4524 _dispatch_sema4_wait + 28
2  libdispatch.dylib              0x4bd8 _dispatch_semaphore_wait_slow + 132
3  UnityFramework                 0xc14460 UnityClassic::Baselib_SystemSemaphore_Acquire(UnityClassic::Baselib_SystemSemaphore_Handle) + 36 (Baselib_SystemSemaphore_DarwinApi.inl.h:36)
4  UnityFramework                 0x7621d0 JobQueue::ProcessJobs(JobQueue::ThreadInfo*, void*) + 33 (Baselib_CappedSemaphore_SemaphoreBased.inl.h:33)
5  UnityFramework                 0x7616e8 JobQueue::WorkLoop(void*) + 1034 (JobQueue.cpp:1034)
6  UnityFramework                 0x7fd290 Thread::RunThreadWrapper(void*) + 81 (Thread.cpp:81)
7  libsystem_pthread.dylib        0x16cc _pthread_start + 148
8  libsystem_pthread.dylib        0xba4 thread_start + 8

Job.Worker 1
0  libsystem_kernel.dylib         0xd24 semaphore_wait_trap + 8
1  libdispatch.dylib              0x4524 _dispatch_sema4_wait + 28
2  libdispatch.dylib              0x4bd8 _dispatch_semaphore_wait_slow + 132
3  UnityFramework                 0xc14460 UnityClassic::Baselib_SystemSemaphore_Acquire(UnityClassic::Baselib_SystemSemaphore_Handle) + 36 (Baselib_SystemSemaphore_DarwinApi.inl.h:36)
4  UnityFramework                 0x7621d0 JobQueue::ProcessJobs(JobQueue::ThreadInfo*, void*) + 33 (Baselib_CappedSemaphore_SemaphoreBased.inl.h:33)
5  UnityFramework                 0x7616e8 JobQueue::WorkLoop(void*) + 1034 (JobQueue.cpp:1034)
6  UnityFramework                 0x7fd290 Thread::RunThreadWrapper(void*) + 81 (Thread.cpp:81)
7  libsystem_pthread.dylib        0x16cc _pthread_start + 148
8  libsystem_pthread.dylib        0xba4 thread_start + 8

Job.Worker 2
0  libsystem_kernel.dylib         0xd24 semaphore_wait_trap + 8
1  libdispatch.dylib              0x4524 _dispatch_sema4_wait + 28
2  libdispatch.dylib              0x4bd8 _dispatch_semaphore_wait_slow + 132
3  UnityFramework                 0xc14460 UnityClassic::Baselib_SystemSemaphore_Acquire(UnityClassic::Baselib_SystemSemaphore_Handle) + 36 (Baselib_SystemSemaphore_DarwinApi.inl.h:36)
4  UnityFramework                 0x7621d0 JobQueue::ProcessJobs(JobQueue::ThreadInfo*, void*) + 33 (Baselib_CappedSemaphore_SemaphoreBased.inl.h:33)
5  UnityFramework                 0x7616e8 JobQueue::WorkLoop(void*) + 1034 (JobQueue.cpp:1034)
6  UnityFramework                 0x7fd290 Thread::RunThreadWrapper(void*) + 81 (Thread.cpp:81)
7  libsystem_pthread.dylib        0x16cc _pthread_start + 148
8  libsystem_pthread.dylib        0xba4 thread_start + 8

Job.Worker 3
0  libsystem_kernel.dylib         0xd24 semaphore_wait_trap + 8
1  libdispatch.dylib              0x4524 _dispatch_sema4_wait + 28
2  libdispatch.dylib              0x4bd8 _dispatch_semaphore_wait_slow + 132
3  UnityFramework                 0xc14460 UnityClassic::Baselib_SystemSemaphore_Acquire(UnityClassic::Baselib_SystemSemaphore_Handle) + 36 (Baselib_SystemSemaphore_DarwinApi.inl.h:36)
4  UnityFramework                 0x7621d0 JobQueue::ProcessJobs(JobQueue::ThreadInfo*, void*) + 33 (Baselib_CappedSemaphore_SemaphoreBased.inl.h:33)
5  UnityFramework                 0x7616e8 JobQueue::WorkLoop(void*) + 1034 (JobQueue.cpp:1034)
6  UnityFramework                 0x7fd290 Thread::RunThreadWrapper(void*) + 81 (Thread.cpp:81)
7  libsystem_pthread.dylib        0x16cc _pthread_start + 148
8  libsystem_pthread.dylib        0xba4 thread_start + 8

Job.Worker 4
0  libsystem_kernel.dylib         0xd24 semaphore_wait_trap + 8
1  libdispatch.dylib              0x4524 _dispatch_sema4_wait + 28
2  libdispatch.dylib              0x4bd8 _dispatch_semaphore_wait_slow + 132
3  UnityFramework                 0xc14460 UnityClassic::Baselib_SystemSemaphore_Acquire(UnityClassic::Baselib_SystemSemaphore_Handle) + 36 (Baselib_SystemSemaphore_DarwinApi.inl.h:36)
4  UnityFramework                 0x7621d0 JobQueue::ProcessJobs(JobQueue::ThreadInfo*, void*) + 33 (Baselib_CappedSemaphore_SemaphoreBased.inl.h:33)
5  UnityFramework                 0x7616e8 JobQueue::WorkLoop(void*) + 1034 (JobQueue.cpp:1034)
6  UnityFramework                 0x7fd290 Thread::RunThreadWrapper(void*) + 81 (Thread.cpp:81)
7  libsystem_pthread.dylib        0x16cc _pthread_start + 148
8  libsystem_pthread.dylib        0xba4 thread_start + 8

Background Job.Worker 0
0  libsystem_kernel.dylib         0xd24 semaphore_wait_trap + 8
1  libdispatch.dylib              0x4524 _dispatch_sema4_wait + 28
2  libdispatch.dylib              0x4bd8 _dispatch_semaphore_wait_slow + 132
3  UnityFramework                 0xc14460 UnityClassic::Baselib_SystemSemaphore_Acquire(UnityClassic::Baselib_SystemSemaphore_Handle) + 36 (Baselib_SystemSemaphore_DarwinApi.inl.h:36)
4  UnityFramework                 0x7621d0 JobQueue::ProcessJobs(JobQueue::ThreadInfo*, void*) + 33 (Baselib_CappedSemaphore_SemaphoreBased.inl.h:33)
5  UnityFramework                 0x7616e8 JobQueue::WorkLoop(void*) + 1034 (JobQueue.cpp:1034)
6  UnityFramework                 0x7fd290 Thread::RunThreadWrapper(void*) + 81 (Thread.cpp:81)
7  libsystem_pthread.dylib        0x16cc _pthread_start + 148
8  libsystem_pthread.dylib        0xba4 thread_start + 8

Background Job.Worker 1
0  libsystem_kernel.dylib         0xd24 semaphore_wait_trap + 8
1  libdispatch.dylib              0x4524 _dispatch_sema4_wait + 28
2  libdispatch.dylib              0x4bd8 _dispatch_semaphore_wait_slow + 132
3  UnityFramework                 0xc14460 UnityClassic::Baselib_SystemSemaphore_Acquire(UnityClassic::Baselib_SystemSemaphore_Handle) + 36 (Baselib_SystemSemaphore_DarwinApi.inl.h:36)
4  UnityFramework                 0x7621d0 JobQueue::ProcessJobs(JobQueue::ThreadInfo*, void*) + 33 (Baselib_CappedSemaphore_SemaphoreBased.inl.h:33)
5  UnityFramework                 0x7616e8 JobQueue::WorkLoop(void*) + 1034 (JobQueue.cpp:1034)
6  UnityFramework                 0x7fd290 Thread::RunThreadWrapper(void*) + 81 (Thread.cpp:81)
7  libsystem_pthread.dylib        0x16cc _pthread_start + 148
8  libsystem_pthread.dylib        0xba4 thread_start + 8

Background Job.Worker 2
0  libsystem_kernel.dylib         0xd24 semaphore_wait_trap + 8
1  libdispatch.dylib              0x4524 _dispatch_sema4_wait + 28
2  libdispatch.dylib              0x4bd8 _dispatch_semaphore_wait_slow + 132
3  UnityFramework                 0xc14460 UnityClassic::Baselib_SystemSemaphore_Acquire(UnityClassic::Baselib_SystemSemaphore_Handle) + 36 (Baselib_SystemSemaphore_DarwinApi.inl.h:36)
4  UnityFramework                 0x7621d0 JobQueue::ProcessJobs(JobQueue::ThreadInfo*, void*) + 33 (Baselib_CappedSemaphore_SemaphoreBased.inl.h:33)
5  UnityFramework                 0x7616e8 JobQueue::WorkLoop(void*) + 1034 (JobQueue.cpp:1034)
6  UnityFramework                 0x7fd290 Thread::RunThreadWrapper(void*) + 81 (Thread.cpp:81)
7  libsystem_pthread.dylib        0x16cc _pthread_start + 148
8  libsystem_pthread.dylib        0xba4 thread_start + 8

Background Job.Worker 3
0  libsystem_kernel.dylib         0xd24 semaphore_wait_trap + 8
1  libdispatch.dylib              0x4524 _dispatch_sema4_wait + 28
2  libdispatch.dylib              0x4bd8 _dispatch_semaphore_wait_slow + 132
3  UnityFramework                 0xc14460 UnityClassic::Baselib_SystemSemaphore_Acquire(UnityClassic::Baselib_SystemSemaphore_Handle) + 36 (Baselib_SystemSemaphore_DarwinApi.inl.h:36)
4  UnityFramework                 0x7621d0 JobQueue::ProcessJobs(JobQueue::ThreadInfo*, void*) + 33 (Baselib_CappedSemaphore_SemaphoreBased.inl.h:33)
5  UnityFramework                 0x7616e8 JobQueue::WorkLoop(void*) + 1034 (JobQueue.cpp:1034)
6  UnityFramework                 0x7fd290 Thread::RunThreadWrapper(void*) + 81 (Thread.cpp:81)
7  libsystem_pthread.dylib        0x16cc _pthread_start + 148
8  libsystem_pthread.dylib        0xba4 thread_start + 8

Background Job.Worker 4
0  libsystem_kernel.dylib         0xd24 semaphore_wait_trap + 8
1  libdispatch.dylib              0x4524 _dispatch_sema4_wait + 28
2  libdispatch.dylib              0x4bd8 _dispatch_semaphore_wait_slow + 132
3  UnityFramework                 0xc14460 UnityClassic::Baselib_SystemSemaphore_Acquire(UnityClassic::Baselib_SystemSemaphore_Handle) + 36 (Baselib_SystemSemaphore_DarwinApi.inl.h:36)
4  UnityFramework                 0x7621d0 JobQueue::ProcessJobs(JobQueue::ThreadInfo*, void*) + 33 (Baselib_CappedSemaphore_SemaphoreBased.inl.h:33)
5  UnityFramework                 0x7616e8 JobQueue::WorkLoop(void*) + 1034 (JobQueue.cpp:1034)
6  UnityFramework                 0x7fd290 Thread::RunThreadWrapper(void*) + 81 (Thread.cpp:81)
7  libsystem_pthread.dylib        0x16cc _pthread_start + 148
8  libsystem_pthread.dylib        0xba4 thread_start + 8

Background Job.Worker 5
0  libsystem_kernel.dylib         0xd24 semaphore_wait_trap + 8
1  libdispatch.dylib              0x4524 _dispatch_sema4_wait + 28
2  libdispatch.dylib              0x4bd8 _dispatch_semaphore_wait_slow + 132
3  UnityFramework                 0xc14460 UnityClassic::Baselib_SystemSemaphore_Acquire(UnityClassic::Baselib_SystemSemaphore_Handle) + 36 (Baselib_SystemSemaphore_DarwinApi.inl.h:36)
4  UnityFramework                 0x7621d0 JobQueue::ProcessJobs(JobQueue::ThreadInfo*, void*) + 33 (Baselib_CappedSemaphore_SemaphoreBased.inl.h:33)
5  UnityFramework                 0x7616e8 JobQueue::WorkLoop(void*) + 1034 (JobQueue.cpp:1034)
6  UnityFramework                 0x7fd290 Thread::RunThreadWrapper(void*) + 81 (Thread.cpp:81)
7  libsystem_pthread.dylib        0x16cc _pthread_start + 148
8  libsystem_pthread.dylib        0xba4 thread_start + 8

Background Job.Worker 6
0  libsystem_kernel.dylib         0xd24 semaphore_wait_trap + 8
1  libdispatch.dylib              0x4524 _dispatch_sema4_wait + 28
2  libdispatch.dylib              0x4bd8 _dispatch_semaphore_wait_slow + 132
3  UnityFramework                 0xc14460 UnityClassic::Baselib_SystemSemaphore_Acquire(UnityClassic::Baselib_SystemSemaphore_Handle) + 36 (Baselib_SystemSemaphore_DarwinApi.inl.h:36)
4  UnityFramework                 0x7621d0 JobQueue::ProcessJobs(JobQueue::ThreadInfo*, void*) + 33 (Baselib_CappedSemaphore_SemaphoreBased.inl.h:33)
5  UnityFramework                 0x7616e8 JobQueue::WorkLoop(void*) + 1034 (JobQueue.cpp:1034)
6  UnityFramework                 0x7fd290 Thread::RunThreadWrapper(void*) + 81 (Thread.cpp:81)
7  libsystem_pthread.dylib        0x16cc _pthread_start + 148
8  libsystem_pthread.dylib        0xba4 thread_start + 8

Background Job.Worker 7
0  libsystem_kernel.dylib         0xd24 semaphore_wait_trap + 8
1  libdispatch.dylib              0x4524 _dispatch_sema4_wait + 28
2  libdispatch.dylib              0x4bd8 _dispatch_semaphore_wait_slow + 132
3  UnityFramework                 0xc14460 UnityClassic::Baselib_SystemSemaphore_Acquire(UnityClassic::Baselib_SystemSemaphore_Handle) + 36 (Baselib_SystemSemaphore_DarwinApi.inl.h:36)
4  UnityFramework                 0x7621d0 JobQueue::ProcessJobs(JobQueue::ThreadInfo*, void*) + 33 (Baselib_CappedSemaphore_SemaphoreBased.inl.h:33)
5  UnityFramework                 0x7616e8 JobQueue::WorkLoop(void*) + 1034 (JobQueue.cpp:1034)
6  UnityFramework                 0x7fd290 Thread::RunThreadWrapper(void*) + 81 (Thread.cpp:81)
7  libsystem_pthread.dylib        0x16cc _pthread_start + 148
8  libsystem_pthread.dylib        0xba4 thread_start + 8

Background Job.Worker 8
0  libsystem_kernel.dylib         0xd24 semaphore_wait_trap + 8
1  libdispatch.dylib              0x4524 _dispatch_sema4_wait + 28
2  libdispatch.dylib              0x4bd8 _dispatch_semaphore_wait_slow + 132
3  UnityFramework                 0xc14460 UnityClassic::Baselib_SystemSemaphore_Acquire(UnityClassic::Baselib_SystemSemaphore_Handle) + 36 (Baselib_SystemSemaphore_DarwinApi.inl.h:36)
4  UnityFramework                 0x7621d0 JobQueue::ProcessJobs(JobQueue::ThreadInfo*, void*) + 33 (Baselib_CappedSemaphore_SemaphoreBased.inl.h:33)
5  UnityFramework                 0x7616e8 JobQueue::WorkLoop(void*) + 1034 (JobQueue.cpp:1034)
6  UnityFramework                 0x7fd290 Thread::RunThreadWrapper(void*) + 81 (Thread.cpp:81)
7  libsystem_pthread.dylib        0x16cc _pthread_start + 148
8  libsystem_pthread.dylib        0xba4 thread_start + 8

Background Job.Worker 9
0  libsystem_kernel.dylib         0xd24 semaphore_wait_trap + 8
1  libdispatch.dylib              0x4524 _dispatch_sema4_wait + 28
2  libdispatch.dylib              0x4bd8 _dispatch_semaphore_wait_slow + 132
3  UnityFramework                 0xc14460 UnityClassic::Baselib_SystemSemaphore_Acquire(UnityClassic::Baselib_SystemSemaphore_Handle) + 36 (Baselib_SystemSemaphore_DarwinApi.inl.h:36)
4  UnityFramework                 0x7621d0 JobQueue::ProcessJobs(JobQueue::ThreadInfo*, void*) + 33 (Baselib_CappedSemaphore_SemaphoreBased.inl.h:33)
5  UnityFramework                 0x7616e8 JobQueue::WorkLoop(void*) + 1034 (JobQueue.cpp:1034)
6  UnityFramework                 0x7fd290 Thread::RunThreadWrapper(void*) + 81 (Thread.cpp:81)
7  libsystem_pthread.dylib        0x16cc _pthread_start + 148
8  libsystem_pthread.dylib        0xba4 thread_start + 8

Background Job.Worker 10
0  libsystem_kernel.dylib         0xd24 semaphore_wait_trap + 8
1  libdispatch.dylib              0x4524 _dispatch_sema4_wait + 28
2  libdispatch.dylib              0x4bd8 _dispatch_semaphore_wait_slow + 132
3  UnityFramework                 0xc14460 UnityClassic::Baselib_SystemSemaphore_Acquire(UnityClassic::Baselib_SystemSemaphore_Handle) + 36 (Baselib_SystemSemaphore_DarwinApi.inl.h:36)
4  UnityFramework                 0x7621d0 JobQueue::ProcessJobs(JobQueue::ThreadInfo*, void*) + 33 (Baselib_CappedSemaphore_SemaphoreBased.inl.h:33)
5  UnityFramework                 0x7616e8 JobQueue::WorkLoop(void*) + 1034 (JobQueue.cpp:1034)
6  UnityFramework                 0x7fd290 Thread::RunThreadWrapper(void*) + 81 (Thread.cpp:81)
7  libsystem_pthread.dylib        0x16cc _pthread_start + 148
8  libsystem_pthread.dylib        0xba4 thread_start + 8

Background Job.Worker 11
0  libsystem_kernel.dylib         0xd24 semaphore_wait_trap + 8
1  libdispatch.dylib              0x4524 _dispatch_sema4_wait + 28
2  libdispatch.dylib              0x4bd8 _dispatch_semaphore_wait_slow + 132
3  UnityFramework                 0xc14460 UnityClassic::Baselib_SystemSemaphore_Acquire(UnityClassic::Baselib_SystemSemaphore_Handle) + 36 (Baselib_SystemSemaphore_DarwinApi.inl.h:36)
4  UnityFramework                 0x7621d0 JobQueue::ProcessJobs(JobQueue::ThreadInfo*, void*) + 33 (Baselib_CappedSemaphore_SemaphoreBased.inl.h:33)
5  UnityFramework                 0x7616e8 JobQueue::WorkLoop(void*) + 1034 (JobQueue.cpp:1034)
6  UnityFramework                 0x7fd290 Thread::RunThreadWrapper(void*) + 81 (Thread.cpp:81)
7  libsystem_pthread.dylib        0x16cc _pthread_start + 148
8  libsystem_pthread.dylib        0xba4 thread_start + 8

Background Job.Worker 12
0  libsystem_kernel.dylib         0xd24 semaphore_wait_trap + 8
1  libdispatch.dylib              0x4524 _dispatch_sema4_wait + 28
2  libdispatch.dylib              0x4bd8 _dispatch_semaphore_wait_slow + 132
3  UnityFramework                 0xc14460 UnityClassic::Baselib_SystemSemaphore_Acquire(UnityClassic::Baselib_SystemSemaphore_Handle) + 36 (Baselib_SystemSemaphore_DarwinApi.inl.h:36)
4  UnityFramework                 0x7621d0 JobQueue::ProcessJobs(JobQueue::ThreadInfo*, void*) + 33 (Baselib_CappedSemaphore_SemaphoreBased.inl.h:33)
5  UnityFramework                 0x7616e8 JobQueue::WorkLoop(void*) + 1034 (JobQueue.cpp:1034)
6  UnityFramework                 0x7fd290 Thread::RunThreadWrapper(void*) + 81 (Thread.cpp:81)
7  libsystem_pthread.dylib        0x16cc _pthread_start + 148
8  libsystem_pthread.dylib        0xba4 thread_start + 8

Background Job.Worker 13
0  libsystem_kernel.dylib         0xd24 semaphore_wait_trap + 8
1  libdispatch.dylib              0x4524 _dispatch_sema4_wait + 28
2  libdispatch.dylib              0x4bd8 _dispatch_semaphore_wait_slow + 132
3  UnityFramework                 0xc14460 UnityClassic::Baselib_SystemSemaphore_Acquire(UnityClassic::Baselib_SystemSemaphore_Handle) + 36 (Baselib_SystemSemaphore_DarwinApi.inl.h:36)
4  UnityFramework                 0x7621d0 JobQueue::ProcessJobs(JobQueue::ThreadInfo*, void*) + 33 (Baselib_CappedSemaphore_SemaphoreBased.inl.h:33)
5  UnityFramework                 0x7616e8 JobQueue::WorkLoop(void*) + 1034 (JobQueue.cpp:1034)
6  UnityFramework                 0x7fd290 Thread::RunThreadWrapper(void*) + 81 (Thread.cpp:81)
7  libsystem_pthread.dylib        0x16cc _pthread_start + 148
8  libsystem_pthread.dylib        0xba4 thread_start + 8

Background Job.Worker 14
0  libsystem_kernel.dylib         0xd24 semaphore_wait_trap + 8
1  libdispatch.dylib              0x4524 _dispatch_sema4_wait + 28
2  libdispatch.dylib              0x4bd8 _dispatch_semaphore_wait_slow + 132
3  UnityFramework                 0xc14460 UnityClassic::Baselib_SystemSemaphore_Acquire(UnityClassic::Baselib_SystemSemaphore_Handle) + 36 (Baselib_SystemSemaphore_DarwinApi.inl.h:36)
4  UnityFramework                 0x7621d0 JobQueue::ProcessJobs(JobQueue::ThreadInfo*, void*) + 33 (Baselib_CappedSemaphore_SemaphoreBased.inl.h:33)
5  UnityFramework                 0x7616e8 JobQueue::WorkLoop(void*) + 1034 (JobQueue.cpp:1034)
6  UnityFramework                 0x7fd290 Thread::RunThreadWrapper(void*) + 81 (Thread.cpp:81)
7  libsystem_pthread.dylib        0x16cc _pthread_start + 148
8  libsystem_pthread.dylib        0xba4 thread_start + 8

Background Job.Worker 15
0  libsystem_kernel.dylib         0xd24 semaphore_wait_trap + 8
1  libdispatch.dylib              0x4524 _dispatch_sema4_wait + 28
2  libdispatch.dylib              0x4bd8 _dispatch_semaphore_wait_slow + 132
3  UnityFramework                 0xc14460 UnityClassic::Baselib_SystemSemaphore_Acquire(UnityClassic::Baselib_SystemSemaphore_Handle) + 36 (Baselib_SystemSemaphore_DarwinApi.inl.h:36)
4  UnityFramework                 0x7621d0 JobQueue::ProcessJobs(JobQueue::ThreadInfo*, void*) + 33 (Baselib_CappedSemaphore_SemaphoreBased.inl.h:33)
5  UnityFramework                 0x7616e8 JobQueue::WorkLoop(void*) + 1034 (JobQueue.cpp:1034)
6  UnityFramework                 0x7fd290 Thread::RunThreadWrapper(void*) + 81 (Thread.cpp:81)
7  libsystem_pthread.dylib        0x16cc _pthread_start + 148
8  libsystem_pthread.dylib        0xba4 thread_start + 8

BatchDeleteObjects
0  libsystem_kernel.dylib         0xd24 semaphore_wait_trap + 8
1  libdispatch.dylib              0x4524 _dispatch_sema4_wait + 28
2  libdispatch.dylib              0x4bd8 _dispatch_semaphore_wait_slow + 132
3  UnityFramework                 0xc14460 UnityClassic::Baselib_SystemSemaphore_Acquire(UnityClassic::Baselib_SystemSemaphore_Handle) + 36 (Baselib_SystemSemaphore_DarwinApi.inl.h:36)
4  UnityFramework                 0x7fe8a0 ThreadedStreamBuffer::HandleOutOfBufferToReadFrom(ThreadedStreamBuffer::DataOffsets) + 41 (Baselib_Semaphore_SemaphoreBased.inl.h:41)
5  UnityFramework                 0x77b42c BatchDeleteStep2Threaded(void*) + 93 (BatchDeleteObjects.cpp:93)
6  UnityFramework                 0x7fd290 Thread::RunThreadWrapper(void*) + 81 (Thread.cpp:81)
7  libsystem_pthread.dylib        0x16cc _pthread_start + 148
8  libsystem_pthread.dylib        0xba4 thread_start + 8

Loading.AsyncRead
0  libsystem_kernel.dylib         0xd24 semaphore_wait_trap + 8
1  libdispatch.dylib              0x4524 _dispatch_sema4_wait + 28
2  libdispatch.dylib              0x4bd8 _dispatch_semaphore_wait_slow + 132
3  UnityFramework                 0xc14460 UnityClassic::Baselib_SystemSemaphore_Acquire(UnityClassic::Baselib_SystemSemaphore_Handle) + 36 (Baselib_SystemSemaphore_DarwinApi.inl.h:36)
4  UnityFramework                 0x6b297c AsyncReadManagerThreaded::ThreadEntry() + 41 (Baselib_Semaphore_SemaphoreBased.inl.h:41)
5  UnityFramework                 0x6b24d4 AsyncReadManagerThreaded::StaticThreadEntry(void*) + 120 (AsyncReadManagerThreaded.cpp:120)
6  UnityFramework                 0x7fd290 Thread::RunThreadWrapper(void*) + 81 (Thread.cpp:81)
7  libsystem_pthread.dylib        0x16cc _pthread_start + 148
8  libsystem_pthread.dylib        0xba4 thread_start + 8

Thread
0  libsystem_pthread.dylib        0xb90 start_wqthread + 254

Thread
0  libdispatch.dylib              0x1e174 _dispatch_mach_merge_msg + 198
1  libdispatch.dylib              0x16d10 _dispatch_workloop_worker_thread + 396
2  libsystem_pthread.dylib        0xdf8 _pthread_wqthread + 288
3  libsystem_pthread.dylib        0xb98 start_wqthread + 8

Thread
0  libsystem_kernel.dylib         0x12b0 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0xe44 _pthread_wqthread + 364
2  libsystem_pthread.dylib        0xb98 start_wqthread + 8

UnityGfxDeviceWorker
0  libsystem_kernel.dylib         0xd24 semaphore_wait_trap + 8
1  libdispatch.dylib              0x4524 _dispatch_sema4_wait + 28
2  libdispatch.dylib              0x4bd8 _dispatch_semaphore_wait_slow + 132
3  UnityFramework                 0xc14460 UnityClassic::Baselib_SystemSemaphore_Acquire(UnityClassic::Baselib_SystemSemaphore_Handle) + 36 (Baselib_SystemSemaphore_DarwinApi.inl.h:36)
4  UnityFramework                 0x7fe8a0 ThreadedStreamBuffer::HandleOutOfBufferToReadFrom(ThreadedStreamBuffer::DataOffsets) + 41 (Baselib_Semaphore_SemaphoreBased.inl.h:41)
5  UnityFramework                 0xaa9d58 GfxDeviceWorker::RunCommand(ThreadedStreamBuffer&) + 395 (GfxDeviceWorker.cpp:395)
6  UnityFramework                 0xb1a1a0 GfxDeviceWorkerAutoreleasePoolProxy + 5309 (GfxDeviceMetal.mm:5309)
7  UnityFramework                 0xab1ad4 GfxDeviceWorker::RunExt(ThreadedStreamBuffer&) + 389 (GfxDeviceWorker.cpp:389)
8  UnityFramework                 0xaa99e8 GfxDeviceWorker::RunGfxDeviceWorker(void*) + 353 (GfxDeviceWorker.cpp:353)
9  UnityFramework                 0x7fd290 Thread::RunThreadWrapper(void*) + 81 (Thread.cpp:81)
10 libsystem_pthread.dylib        0x16cc _pthread_start + 148
11 libsystem_pthread.dylib        0xba4 thread_start + 8

Thread
0  libsystem_kernel.dylib         0xd24 semaphore_wait_trap + 8
1  UnityFramework                 0xf1714c FMOD_OS_Semaphore_Wait(FMOD_OS_SEMAPHORE*) + 3126192
2  UnityFramework                 0xf33788 FMOD::Thread::callback(void*) + 3242476
3  libsystem_pthread.dylib        0x16cc _pthread_start + 148
4  libsystem_pthread.dylib        0xba4 thread_start + 8

AURemoteIO::IOThread
0  libsystem_kernel.dylib         0xda8 mach_msg2_trap + 8
1  libsystem_kernel.dylib         0x13a1c mach_msg2_internal + 80
2  libsystem_kernel.dylib         0x13c5c mach_msg_overwrite + 388
3  libsystem_kernel.dylib         0x12ec mach_msg + 24
4  libEmbeddedSystemAUs.dylib     0xa824c void* caulk::thread_proxy<std::__1::tuple<caulk::thread::attributes, AURemoteIO::IOThread::IOThread(AURemoteIO&, caulk::thread::attributes const&, caulk::mach::os_workgroup_managed const&)::'lambda'(), std::__1::tuple<> > >(void*) + 556
5  libsystem_pthread.dylib        0x16cc _pthread_start + 148
6  libsystem_pthread.dylib        0xba4 thread_start + 8

Thread
0  libsystem_kernel.dylib         0x1268 __semwait_signal + 8
1  libsystem_c.dylib              0x57d8 nanosleep + 220
2  libsystem_c.dylib              0x64a4 usleep + 68
3  UnityFramework                 0xf16d14 FMOD_OS_Time_Sleep(unsigned int) + 3125112
4  UnityFramework                 0xf337f4 FMOD::Thread::callback(void*) + 3242584
5  libsystem_pthread.dylib        0x16cc _pthread_start + 148
6  libsystem_pthread.dylib        0xba4 thread_start + 8

com.apple.CoreMotion.MotionThread
0  libsystem_kernel.dylib         0xda8 mach_msg2_trap + 8
1  libsystem_kernel.dylib         0x13a1c mach_msg2_internal + 80
2  libsystem_kernel.dylib         0x13c5c mach_msg_overwrite + 388
3  libsystem_kernel.dylib         0x12ec mach_msg + 24
4  CoreFoundation                 0x7aac4 __CFRunLoopServiceMachPort + 160
5  CoreFoundation                 0x7bd08 __CFRunLoopRun + 1232
6  CoreFoundation                 0x80eb0 CFRunLoopRunSpecific + 612
7  CoreFoundation                 0xc4cd4 CFRunLoopRun + 64
8  CoreMotion                     0x13ef8 CLMotionActivity::isTypeInVehicle(CLMotionActivity::Type) + 22908
9  libsystem_pthread.dylib        0x16cc _pthread_start + 148
10 libsystem_pthread.dylib        0xba4 thread_start + 8

Loading.PreloadManager
0  libsystem_kernel.dylib         0xd24 semaphore_wait_trap + 8
1  libdispatch.dylib              0x4524 _dispatch_sema4_wait + 28
2  libdispatch.dylib              0x4bd8 _dispatch_semaphore_wait_slow + 132
3  UnityFramework                 0xc14460 UnityClassic::Baselib_SystemSemaphore_Acquire(UnityClassic::Baselib_SystemSemaphore_Handle) + 36 (Baselib_SystemSemaphore_DarwinApi.inl.h:36)
4  UnityFramework                 0x78ac04 PreloadManager::Run() + 41 (Baselib_Semaphore_SemaphoreBased.inl.h:41)
5  UnityFramework                 0x78ab50 PreloadManager::Run(void*) + 183 (PreloadManager.cpp:183)
6  UnityFramework                 0x7fd290 Thread::RunThreadWrapper(void*) + 81 (Thread.cpp:81)
7  libsystem_pthread.dylib        0x16cc _pthread_start + 148
8  libsystem_pthread.dylib        0xba4 thread_start + 8

com.apple.NSURLConnectionLoader
0  libsystem_kernel.dylib         0xda8 mach_msg2_trap + 8
1  libsystem_kernel.dylib         0x13a1c mach_msg2_internal + 80
2  libsystem_kernel.dylib         0x13c5c mach_msg_overwrite + 388
3  libsystem_kernel.dylib         0x12ec mach_msg + 24
4  CoreFoundation                 0x7aac4 __CFRunLoopServiceMachPort + 160
5  CoreFoundation                 0x7bd08 __CFRunLoopRun + 1232
6  CoreFoundation                 0x80eb0 CFRunLoopRunSpecific + 612
7  CFNetwork                      0x257ff0 _CFURLStorageSessionDisableCache + 61088
8  Foundation                     0x5b518 __NSThread__start__ + 716
9  libsystem_pthread.dylib        0x16cc _pthread_start + 148
10 libsystem_pthread.dylib        0xba4 thread_start + 8

CloudJob.Worker 0
0  libsystem_kernel.dylib         0xd24 semaphore_wait_trap + 8
1  libdispatch.dylib              0x4524 _dispatch_sema4_wait + 28
2  libdispatch.dylib              0x4bd8 _dispatch_semaphore_wait_slow + 132
3  UnityFramework                 0xc14460 UnityClassic::Baselib_SystemSemaphore_Acquire(UnityClassic::Baselib_SystemSemaphore_Handle) + 36 (Baselib_SystemSemaphore_DarwinApi.inl.h:36)
4  UnityFramework                 0x7621d0 JobQueue::ProcessJobs(JobQueue::ThreadInfo*, void*) + 33 (Baselib_CappedSemaphore_SemaphoreBased.inl.h:33)
5  UnityFramework                 0x7616e8 JobQueue::WorkLoop(void*) + 1034 (JobQueue.cpp:1034)
6  UnityFramework                 0x7fd290 Thread::RunThreadWrapper(void*) + 81 (Thread.cpp:81)
7  libsystem_pthread.dylib        0x16cc _pthread_start + 148
8  libsystem_pthread.dylib        0xba4 thread_start + 8

Thread
0  libsystem_kernel.dylib         0x167c __psynch_cvwait + 8
1  libsystem_pthread.dylib        0x8098 _pthread_cond_wait + 1276
2  UnityFramework                 0xfa784c il2cpp::os::posix::PosixWaitObject::Wait(unsigned int, bool) + 153 (PosixWaitObject.cpp:153)
3  UnityFramework                 0xf9cdbc monitor_thread(void*) + 156 (ThreadPoolMonitorThread.cpp:156)
4  UnityFramework                 0xfcebec il2cpp::vm::ThreadStart(void*) + 727 (Thread.cpp:727)
5  UnityFramework                 0xf9eccc il2cpp::os::Thread::RunWrapper(void*) + 183 (Thread.cpp:183)
6  UnityFramework                 0xfa0f3c il2cpp::os::ThreadImpl::ThreadStartWrapper(void*) + 127 (ThreadImpl.cpp:127)
7  libsystem_pthread.dylib        0x16cc _pthread_start + 148
8  libsystem_pthread.dylib        0xba4 thread_start + 8

IL2CPP Threadpool worker
0  libsystem_kernel.dylib         0x167c __psynch_cvwait + 8
1  libsystem_pthread.dylib        0x806c _pthread_cond_wait + 1232
2  UnityFramework                 0xfa69c8 il2cpp::os::ConditionVariableImpl::TimedWait(il2cpp::os::FastMutexImpl*, unsigned int) + 51 (ConditionVariableImpl.cpp:51)
3  UnityFramework                 0xf9d654 worker_thread(void*) + 87 (ThreadPoolWorkerThread.cpp:87)
4  UnityFramework                 0xfcebec il2cpp::vm::ThreadStart(void*) + 727 (Thread.cpp:727)
5  UnityFramework                 0xf9eccc il2cpp::os::Thread::RunWrapper(void*) + 183 (Thread.cpp:183)
6  UnityFramework                 0xfa0f3c il2cpp::os::ThreadImpl::ThreadStartWrapper(void*) + 127 (ThreadImpl.cpp:127)
7  libsystem_pthread.dylib        0x16cc _pthread_start + 148
8  libsystem_pthread.dylib        0xba4 thread_start + 8

com.google.firebase.crashlytics.MachExceptionServer
0  libsystem_kernel.dylib         0xda8 mach_msg2_trap + 8
1  libsystem_kernel.dylib         0x13a1c mach_msg2_internal + 80
2  libsystem_kernel.dylib         0x13c5c mach_msg_overwrite + 388
3  libsystem_kernel.dylib         0x12ec mach_msg + 24
4  FirebaseCrashlytics            0x18a50 FIRCLSMachExceptionServer + 108
5  libsystem_pthread.dylib        0x16cc _pthread_start + 148
6  libsystem_pthread.dylib        0xba4 thread_start + 8

Thread
0  libsystem_kernel.dylib         0x167c __psynch_cvwait + 8
1  libsystem_pthread.dylib        0x806c _pthread_cond_wait + 1232
2  UnityFramework                 0xeb9268 Geo::Impl::WaitForMultipleObjects(unsigned int, Geo::Impl::t_HANDLE**, bool, int) + 156 (GeoEvent.cpp:156)
3  UnityFramework                 0xeb9464 Geo::GeoEvent::Wait(unsigned int) + 344 (GeoEvent.cpp:344)
4  UnityFramework                 0xea81ac Enlighten::MultithreadCpuWorkerCommon::CommandThreadFunction(void*) + 1255 (MultithreadCpuWorker.cpp:1255)
5  libsystem_pthread.dylib        0x16cc _pthread_start + 148
6  libsystem_pthread.dylib        0xba4 thread_start + 8

EnlightenWorker
0  libsystem_kernel.dylib         0xd24 semaphore_wait_trap + 8
1  libdispatch.dylib              0x4524 _dispatch_sema4_wait + 28
2  libdispatch.dylib              0x4bd8 _dispatch_semaphore_wait_slow + 132
3  UnityFramework                 0xc14460 UnityClassic::Baselib_SystemSemaphore_Acquire(UnityClassic::Baselib_SystemSemaphore_Handle) + 36 (Baselib_SystemSemaphore_DarwinApi.inl.h:36)
4  UnityFramework                 0x5d0874 TUpdateFunction(void*) + 41 (Baselib_Semaphore_SemaphoreBased.inl.h:41)
5  UnityFramework                 0x7fd290 Thread::RunThreadWrapper(void*) + 81 (Thread.cpp:81)
6  libsystem_pthread.dylib        0x16cc _pthread_start + 148
7  libsystem_pthread.dylib        0xba4 thread_start + 8

com.squareup.SocketRocket.NetworkThread
0  libsystem_kernel.dylib         0xda8 mach_msg2_trap + 8
1  libsystem_kernel.dylib         0x13a1c mach_msg2_internal + 80
2  libsystem_kernel.dylib         0x13c5c mach_msg_overwrite + 388
3  libsystem_kernel.dylib         0x12ec mach_msg + 24
4  CoreFoundation                 0x7aac4 __CFRunLoopServiceMachPort + 160
5  CoreFoundation                 0x7bd08 __CFRunLoopRun + 1232
6  CoreFoundation                 0x80eb0 CFRunLoopRunSpecific + 612
7  Foundation                     0x42054 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 212
8  FirebaseDatabase               0x48b30 -[_FSRRunLoopThread main] + 216
9  Foundation                     0x5b518 __NSThread__start__ + 716
10 libsystem_pthread.dylib        0x16cc _pthread_start + 148
11 libsystem_pthread.dylib        0xba4 thread_start + 8

JavaScriptCore libpas scavenger
0  libsystem_kernel.dylib         0x167c __psynch_cvwait + 8
1  libsystem_pthread.dylib        0x806c _pthread_cond_wait + 1232
2  JavaScriptCore                 0xf7114 scavenger_thread_main + 1364
3  libsystem_pthread.dylib        0x16cc _pthread_start + 148
4  libsystem_pthread.dylib        0xba4 thread_start + 8

com.apple.CFSocket.private
0  libsystem_kernel.dylib         0x190c select$DARWIN_EXTSN + 8
1  libsystem_kernel.dylib         0x190c __select + 8
2  CoreFoundation                 0xcb694 __CFSocketManager + 636
3  libsystem_pthread.dylib        0x16cc _pthread_start + 148
4  libsystem_pthread.dylib        0xba4 thread_start + 8

Thread
0  libsystem_kernel.dylib         0xd24 semaphore_wait_trap + 8
1  UnityFramework                 0xf1714c FMOD_OS_Semaphore_Wait(FMOD_OS_SEMAPHORE*) + 3126192
2  UnityFramework                 0xf33788 FMOD::Thread::callback(void*) + 3242476
3  libsystem_pthread.dylib        0x16cc _pthread_start + 148
4  libsystem_pthread.dylib        0xba4 thread_start + 8

Thread
0  libsystem_kernel.dylib         0x1268 __semwait_signal + 8
1  libsystem_c.dylib              0x57d8 nanosleep + 220
2  libsystem_c.dylib              0x64a4 usleep + 68
3  UnityFramework                 0xf16d14 FMOD_OS_Time_Sleep(unsigned int) + 3125112
4  UnityFramework                 0xf337f4 FMOD::Thread::callback(void*) + 3242584
5  libsystem_pthread.dylib        0x16cc _pthread_start + 148
6  libsystem_pthread.dylib        0xba4 thread_start + 8

IL2CPP Threadpool worker
0  libsystem_kernel.dylib         0x167c __psynch_cvwait + 8
1  libsystem_pthread.dylib        0x806c _pthread_cond_wait + 1232
2  UnityFramework                 0xfa69c8 il2cpp::os::ConditionVariableImpl::TimedWait(il2cpp::os::FastMutexImpl*, unsigned int) + 51 (ConditionVariableImpl.cpp:51)
3  UnityFramework                 0xf9d654 worker_thread(void*) + 87 (ThreadPoolWorkerThread.cpp:87)
4  UnityFramework                 0xfcebec il2cpp::vm::ThreadStart(void*) + 727 (Thread.cpp:727)
5  UnityFramework                 0xf9eccc il2cpp::os::Thread::RunWrapper(void*) + 183 (Thread.cpp:183)
6  UnityFramework                 0xfa0f3c il2cpp::os::ThreadImpl::ThreadStartWrapper(void*) + 127 (ThreadImpl.cpp:127)
7  libsystem_pthread.dylib        0x16cc _pthread_start + 148
8  libsystem_pthread.dylib        0xba4 thread_start + 8

IL2CPP Threadpool worker
0  libsystem_kernel.dylib         0x167c __psynch_cvwait + 8
1  libsystem_pthread.dylib        0x806c _pthread_cond_wait + 1232
2  UnityFramework                 0xfa69c8 il2cpp::os::ConditionVariableImpl::TimedWait(il2cpp::os::FastMutexImpl*, unsigned int) + 51 (ConditionVariableImpl.cpp:51)
3  UnityFramework                 0xf9d654 worker_thread(void*) + 87 (ThreadPoolWorkerThread.cpp:87)
4  UnityFramework                 0xfcebec il2cpp::vm::ThreadStart(void*) + 727 (Thread.cpp:727)
5  UnityFramework                 0xf9eccc il2cpp::os::Thread::RunWrapper(void*) + 183 (Thread.cpp:183)
6  UnityFramework                 0xfa0f3c il2cpp::os::ThreadImpl::ThreadStartWrapper(void*) + 127 (ThreadImpl.cpp:127)
7  libsystem_pthread.dylib        0x16cc _pthread_start + 148
8  libsystem_pthread.dylib        0xba4 thread_start + 8

IL2CPP Threadpool worker
0  libsystem_kernel.dylib         0x167c __psynch_cvwait + 8
1  libsystem_pthread.dylib        0x806c _pthread_cond_wait + 1232
2  UnityFramework                 0xfa69c8 il2cpp::os::ConditionVariableImpl::TimedWait(il2cpp::os::FastMutexImpl*, unsigned int) + 51 (ConditionVariableImpl.cpp:51)
3  UnityFramework                 0xf9d654 worker_thread(void*) + 87 (ThreadPoolWorkerThread.cpp:87)
4  UnityFramework                 0xfcebec il2cpp::vm::ThreadStart(void*) + 727 (Thread.cpp:727)
5  UnityFramework                 0xf9eccc il2cpp::os::Thread::RunWrapper(void*) + 183 (Thread.cpp:183)
6  UnityFramework                 0xfa0f3c il2cpp::os::ThreadImpl::ThreadStartWrapper(void*) + 127 (ThreadImpl.cpp:127)
7  libsystem_pthread.dylib        0x16cc _pthread_start + 148
8  libsystem_pthread.dylib        0xba4 thread_start + 8

Thread
0  libsystem_kernel.dylib         0x167c __psynch_cvwait + 8
1  libsystem_pthread.dylib        0x806c _pthread_cond_wait + 1232
2  grpc                           0x16ec24 gpr_cv_wait + 124
3  grpc                           0x87730 grpc_core::Executor::ThreadMain(void*) + 180
4  grpc                           0x179b38 grpc_core::(anonymous namespace)::ThreadInternalsPosix::ThreadInternalsPosix(char const*, void (*)(void*), void*, bool*, grpc_core::Thread::Options const&)::'lambda'(void*)::__invoke(void*) + 140
5  libsystem_pthread.dylib        0x16cc _pthread_start + 148
6  libsystem_pthread.dylib        0xba4 thread_start + 8

Thread
0  libsystem_kernel.dylib         0x167c __psynch_cvwait + 8
1  libsystem_pthread.dylib        0x806c _pthread_cond_wait + 1232
2  grpc                           0x16ec24 gpr_cv_wait + 124
3  grpc                           0x87730 grpc_core::Executor::ThreadMain(void*) + 180
4  grpc                           0x179b38 grpc_core::(anonymous namespace)::ThreadInternalsPosix::ThreadInternalsPosix(char const*, void (*)(void*), void*, bool*, grpc_core::Thread::Options const&)::'lambda'(void*)::__invoke(void*) + 140
5  libsystem_pthread.dylib        0x16cc _pthread_start + 148
6  libsystem_pthread.dylib        0xba4 thread_start + 8

Thread
0  libsystem_kernel.dylib         0x167c __psynch_cvwait + 8
1  libsystem_pthread.dylib        0x806c _pthread_cond_wait + 1232
2  grpc                           0x16ec24 gpr_cv_wait + 124
3  grpc                           0x17da5c timer_thread(void*) + 552
4  grpc                           0x179b38 grpc_core::(anonymous namespace)::ThreadInternalsPosix::ThreadInternalsPosix(char const*, void (*)(void*), void*, bool*, grpc_core::Thread::Options const&)::'lambda'(void*)::__invoke(void*) + 140
5  libsystem_pthread.dylib        0x16cc _pthread_start + 148
6  libsystem_pthread.dylib        0xba4 thread_start + 8

Thread
0  libsystem_kernel.dylib         0x167c __psynch_cvwait + 8
1  libsystem_pthread.dylib        0x806c _pthread_cond_wait + 1232
2  grpc                           0x16ec14 gpr_cv_wait + 108
3  grpc                           0x17da5c timer_thread(void*) + 552
4  grpc                           0x179b38 grpc_core::(anonymous namespace)::ThreadInternalsPosix::ThreadInternalsPosix(char const*, void (*)(void*), void*, bool*, grpc_core::Thread::Options const&)::'lambda'(void*)::__invoke(void*) + 140
5  libsystem_pthread.dylib        0x16cc _pthread_start + 148
6  libsystem_pthread.dylib        0xba4 thread_start + 8

Thread
0  libsystem_kernel.dylib         0x12b0 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0xe44 _pthread_wqthread + 364
2  libsystem_pthread.dylib        0xb98 start_wqthread + 8

Timer-Scheduler
0  libsystem_kernel.dylib         0x167c __psynch_cvwait + 8
1  libsystem_pthread.dylib        0x8098 _pthread_cond_wait + 1276
2  UnityFramework                 0xfa784c il2cpp::os::posix::PosixWaitObject::Wait(unsigned int, bool) + 153 (PosixWaitObject.cpp:153)
3  UnityFramework                 0xf92730 il2cpp::icalls::mscorlib::System::Threading::WaitHandle::Wait_internal(void**, int, bool, int) + 91 (WaitHandle.cpp:91)
4  UnityFramework                 0x2453dcc selector_thread(void*) (.cold.1) + 4456988108
5  UnityFramework                 0x2453c98 selector_thread(void*) (.cold.1) + 4456987800
6  UnityFramework                 0x2487aa8 selector_thread(void*) (.cold.1) + 4457200296
7  UnityFramework                 0x23fd400 selector_thread(void*) (.cold.1) + 4456633344
8  UnityFramework                 0x243f688 selector_thread(void*) (.cold.1) + 4456904328
9  UnityFramework                 0x24ea710 selector_thread(void*) (.cold.1) + 4457604880
10 UnityFramework                 0x23fd400 selector_thread(void*) (.cold.1) + 4456633344
11 UnityFramework                 0xc00a0 RuntimeInvoker_TrueVoid(void (*)(), MethodInfo const*, void*, void**) (Il2CppInvokerTable.cpp)
12 UnityFramework                 0xfdf448 il2cpp::vm::Runtime::Invoke(MethodInfo const*, void*, void**, Il2CppException**) + 576 (Runtime.cpp:576)
13 UnityFramework                 0xf92230 il2cpp::icalls::mscorlib::System::Threading::ThreadStart(void*) + 158 (Thread.cpp:158)
14 UnityFramework                 0xf9eccc il2cpp::os::Thread::RunWrapper(void*) + 183 (Thread.cpp:183)
15 UnityFramework                 0xfa0f3c il2cpp::os::ThreadImpl::ThreadStartWrapper(void*) + 127 (ThreadImpl.cpp:127)
16 libsystem_pthread.dylib        0x16cc _pthread_start + 148
17 libsystem_pthread.dylib        0xba4 thread_start + 8

Thread
0  libsystem_kernel.dylib         0x4494 poll + 8
1  UnityFramework                 0xfa0c38 il2cpp::os::posix::Poll(pollfd*, int, int) + 26 (PosixHelpers.cpp:26)
2  UnityFramework                 0xfa3cdc il2cpp::os::SocketImpl::Poll(std::__1::vector<il2cpp::os::PollRequest, std::__1::allocator<il2cpp::os::PollRequest> >&, int, int, int*, int*) + 2502 (SocketImpl.cpp:2502)
3  UnityFramework                 0xf9da50 poll_event_wait(void (*)(int, int, void*), void*) + 157 (threadpool-ms-io-poll.cpp:157)
4  UnityFramework                 0xff58fc selector_thread(void*) + 476 (threadpool-ms-io.cpp:476)
5  UnityFramework                 0xfcebec il2cpp::vm::ThreadStart(void*) + 727 (Thread.cpp:727)
6  UnityFramework                 0xf9eccc il2cpp::os::Thread::RunWrapper(void*) + 183 (Thread.cpp:183)
7  UnityFramework                 0xfa0f3c il2cpp::os::ThreadImpl::ThreadStartWrapper(void*) + 127 (ThreadImpl.cpp:127)
8  libsystem_pthread.dylib        0x16cc _pthread_start + 148
9  libsystem_pthread.dylib        0xba4 thread_start + 8

Steps to reproduce:

Have you been able to reproduce this issue with just the Firebase Unity quickstarts (this GitHub project)? What's the issue repro rate? (eg 100%, 1/5 etc)

What happened? How can we make the problem occur? This could be a description, log/console output, etc.

If you have a downloadable sample project that reproduces the bug you're reporting, you will likely receive a faster response on your issue.

Relevant Code:

DocumentReference DOCREF = FirebaseInitModified.Instance.firestoreDatabaseReference.
        Collection("GetSocialUsers").Document(firestoreDbId);
        try
        {
            if (fsListnerCallback == null)
            {
                Debug.Log($"fsListnerCallback null");
                fsListnerCallback += Subscriber_fsListnerCallback;
            }
            FS_Listener_MyGsDocument = DOCREF.Listen(fsListnerCallback);
        }
        catch (FirestoreException exception)
        {
            Debug.Log($"FirestoreException {exception.Message}");
        }
        catch (SystemException exception)
        {
            Debug.Log($"SystemException {exception.Message}");
        }
    }

    public void Subscriber_fsListnerCallback(DocumentSnapshot snapshot)
    {
        Debug.Log($"Subscriber_fsListnerCallback");
        userPropertiesForGame = snapshot.ConvertTo<UserPropertiesForGame>();
        //userPropertiesForGame = listenTask.ConvertTo<UserPropertiesForGame>();
        Event_LinsteningComplete_CurrentUserPublicProperties?.Invoke();
        On_EventCheckForFirestoreTransfer?.Invoke();
    }
![firestoreioscrashsnip](https://user-images.githubusercontent.com/109052511/236126151-ff20d095-f25c-4a55-bebc-4ac547ecc426.PNG)
[com.tymediaus.kitchenclout_issue_a88b60b1b1bdd52133a5dabf5e761279_crash_session_fa1227f9af534a4896dbfaa493c54484_DNE_0_v2_stacktrace.txt](https://github.com/firebase/firebase-unity-sdk/files/11394195/com.tymediaus.kitchenclout_issue_a88b60b1b1bdd52133a5dabf5e761279_crash_session_fa1227f9af534a4896dbfaa493c54484_DNE_0_v2_stacktrace.txt)
dconeybe commented 1 year ago

Based on the stack trace it looks like you are calling DocumentReference.Listen() on a Firestore document. Then, in the listener callback, you are creating a DatabaseReference in Realtime Database. The crash is happening in the creation of the Realtime Database reference. Are you aware that Firestore and Realtime Database, although similar in principle, are completely different database offerings from Firebase an are incompatible? If you are using Firestore then make sure to use Firestore classes and methods and not to accidentally use classes and methods from the Realtime Database API.

vcLS132 commented 1 year ago

Hello, and thanks for the reply. So in short if I remove this code snippet DocumentReference DOCREF = FirebaseInitModified.Instance.firestoreDatabaseReference.Collection("GetSocialUsers").Document(firestoreDbId); from the callback, it should stop the crash. Right? But why is it not crashing on the first run when I install the application and only crashing when I reopen the application?

dconeybe commented 1 year ago

I'm not familiar enough with your code to confidently say what you need to change to fix the crash. For example, I don't know what FirebaseInitModified is (is it a class defined in your application?). It looks like somewhere your app is calling DatabaseReference.Child(...). Could you log the value that you are specifying as the pathString argument to DatabaseReference.Child(...) and let us know what it is?

vcLS132 commented 1 year ago

this is my FirebaseInitModified class. Is has this public FirebaseFirestore firestoreDatabaseReference;

public class FirebaseInitModified : MonoBehaviour { public static FirebaseInitModified Instance; private const string kUserId = "UserId"; public bool Initialized; [SerializeField] FirebaseNotificationController notificationController; public FirebaseApp firebaseApplication; public FirebaseFirestore firestoreDatabaseReference; public DatabaseReference databaseReferenceObject; public FirebaseCloudStorageManager gameObject_FirebaseCloudStorageManager;

private void Awake()
{
    //Debug.Log($"FirebaseInitModified AWAKE START ");
    if (Instance == null)
    {
        Instance = this;
        DontDestroyOnLoad(this.gameObject);
    }
    else
    {
        Destroy(this.gameObject);
        return;
    }
    Firebase.FirebaseApp.LogLevel = Firebase.LogLevel.Debug;
    FirebaseApp.CheckDependenciesAsync().ContinueWithOnMainThread(task =>
    {
        var dependencyStatus = task.Result;
        if (dependencyStatus == DependencyStatus.Available && !Initialized)
        {

            firebaseApplication = FirebaseApp.DefaultInstance;
            databaseReferenceObject = FirebaseDatabase.DefaultInstance.RootReference;
            firestoreDatabaseReference = FirebaseFirestore.DefaultInstance;
            firestoreDatabaseReference.Settings.PersistenceEnabled = false;

            if (gameObject_FirebaseCloudStorageManager != null)
            {
                gameObject_FirebaseCloudStorageManager.gameObject.SetActive(true);
            }
            notificationController.CustomStart();
            FirebaseAnalytics.SetAnalyticsCollectionEnabled(true);
            Crashlytics.IsCrashlyticsCollectionEnabled = true;
            if (SceneManager.GetActiveScene().name == "MenuScene")
            {
                try
                {
                    FirebaseDataController.instance.CustomStart();
                }
                catch (System.Exception)
                {
                    FirebaseDataController dbController = FindObjectOfType<FirebaseDataController>();
                    if (dbController != null)
                    {
                        dbController.CustomStart();
                    }
                }
            }
            Initialized = true;
        }
        else
        {
            Debug.LogError("Firebase Not Available");
        }
    });
}

} I have modified the ".Listen" code snippet by taking the DocumentReference DOCREF = FirebaseInitModified.Instance.firestoreDatabaseReference.Collection("GetSocialUsers").Document(firestoreDbId); as global so that I won't have to call it again when "Listen" callback is called.

dconeybe commented 1 year ago

Ok that is helpful. Nothing in that code sample looks suspicious. Can you also show the code that is calling DatabaseReference.Child(...)?

vcLS132 commented 1 year ago

also in the listen call back I am calling the firebase realtime database function to update certain data on realtime database as well. DatabaseReferenceObject.Child("Users").Child(Globals.userInfo.UserName).Child(TableName).SetRawJsonValueAsync(jsonData); but it does not happen often as it is bound by come conditions so triggering it on the second run is next to impossible. Also I was triggering a call

FirebaseInitModified.Instance.firestoreDatabaseReference.Collection("GetSocialUsers").Document(GsIdLoggedInUser).SetAsync(userPropertiesForGame) so I think this may also be responsible. As I have made this global so I'll try to make another build and see if it still crashes.

dconeybe commented 1 year ago

I can tell you with very high confidence from the stack trace in your opening comment that the crash is happening in a call to DatabaseReference.Child(...). The Firestore code never uses Realtime Database code, so the problematic call to DatabaseReference.Child(...) must be one from your application.

What I recommend to do is to do Debug.LogError() on the value of Globals.userInfo.UserName and TableName prior to each call of DatabaseReferenceObject.Child() to see what values are being passed in. Then, you should be able to see, from the logs, what value was problematic.

vcLS132 commented 1 year ago

ok, I'll try that. But DatabaseReferenceObject.Child() should not cause the issue as the crash is happening in the second scene where I am calling the .Listen for firestore and all the globals and references are assigned in the opening scene or first scene that way it loads game data from Firebase real-time database and if any changes are to be done to the Database then I call this code DatabaseReferenceObject.Child("Users").Child(Globals.userInfo.UserName).Child(TableName).SetRawJsonValueAsync(jsonData); Plus if the code DatabaseReferenceObject.Child was problematic wouldn't it cause the issue in the very first run? Rather that n in the second.

dconeybe commented 1 year ago

Without having seen your code I can't explain why the crash only occurs on subsequent launches. The crash message does say that

Must be a non-empty string and not contain '.' '#' '$' '[' or ']'

So perhaps on the second launch Globals.userInfo.UserName and/or TableName are either empty or contain one of those illegal characters, causing the crash.

It's also possible that the stack trace from the opening comment is a different crash. What would be really helpful would be a minimal app that reproduces the crash. Then I could reproduce the crash for myself and investigate. I realize that's a pretty large undertaking but if you're willing to produce something like that and share it then it could be very helpful. But let's see what we learn from the log output first.

vcLS132 commented 1 year ago

I may have found the Must be a non-empty string and not contain '.' '#' '$' '[' or ']' this part. I have this function public void CheckForFirestoreTransfer() { if (On_EventCheckForFirestoreTransfer != null) { On_EventCheckForFirestoreTransfer -= CheckForFirestoreTransfer; } if (On_IfAutoOverrideTakesPlaceWIthoutPopUp != null) { On_IfAutoOverrideTakesPlaceWIthoutPopUp -= CheckForFirestoreTransfer;//+ }

    //^Debug.Log($"CheckForFirestoreTransfer");
    FirebaseDataController.instance.DatabaseReferenceObject.Child("Users").
    Child(FirebaseDataController.instance.FacbookToken).Child("DataOverride").
    GetValueAsync().ContinueWithOnMainThread(task =>
    {
        if (task.IsCompleted)
        {
            DataSnapshot snapshot = task.Result;
            if (snapshot.Exists)
            {
                string jsonValue = snapshot.GetRawJsonValue();
                //^Debug.Log($"CheckForFirestoreTransfer EXISTS jsonValue {jsonValue}");
                Globals.dataOverride = JsonConvert.DeserializeObject<DataOverride>(jsonValue);
                if (Globals.dataOverride.isOverrideDone)
                {
                    //^Debug.Log($"isOverrideDone {Globals.dataOverride.isOverrideDone}");
                    TransferFirestore();
                    if (Globals.dataOverride.friendsExist)
                    {
                        //^Debug.Log($"friendsExist");
                        if (Globals.dataOverride.friendsToAdd.Count >= 1)
                        {
                            friendsToTransfer.Clear();
                            friendsToTransfer = Globals.dataOverride.friendsToAdd.ToList();
                            AddFriends_TransferGetSocial();
                        }
                    }
                    FirebaseDataController.instance.DatabaseReferenceObject.Child("Users").
                    Child(FirebaseDataController.instance.FacbookToken).Child("DataOverride").RemoveValueAsync();
                    Globals.dataOverride = new DataOverride();
                    //^Debug.Log($"Globals.dataOverride CLEARED");
                }
            }
        }
    });
}

this is from the snipped I present in the opening On_EventCheckForFirestoreTransfer += CheckForFirestoreTransfer; and in the call back I am doing this public void Subscriber_fsListnerCallback(DocumentSnapshot snapshot) { Debug.Log($"Subscriber_fsListnerCallback"); userPropertiesForGame = snapshot.ConvertTo(); //userPropertiesForGame = listenTask.ConvertTo(); Event_LinsteningComplete_CurrentUserPublicProperties?.Invoke(); On_EventCheckForFirestoreTransfer?.Invoke(); } I just realized that this is a special case and usually it is null or to be precise this Child("DataOverride") is not in the realtime database on regular calls and even in the second run this is only when user requests for data transfer between different accounts. So do you thing that this may be the cause of the entire crash?

dconeybe commented 1 year ago

I don't understand your application well enough to speculate on what may be going wrong. I still think the cause of the crash is invoking DatabaseReference.Child(...) with a string whose value is not valid. Can you try logging the strings that you are specifying to DatabaseReference.Child(...) to see if any of them happen to be invalid immediately before the crash?

vcLS132 commented 1 year ago

ok, I'll try the logging method and will let you know.

vcLS132 commented 1 year ago

ok, I'll try the logging method and will let you know.

After applying logs at every step and thoroughly debugging, I found a call at DatabaseReference.Child() was looking for an empty/non-existent child, so it was crashing on ios. Surprisingly same logic and code were not crashing on Android even for the empty/non-existent child. So I applied a simple boolean check and it fixed the crash issue.

Thank you @dconeybe for all the help as I was unable to understand the main issue just by looking at the crash logs.

dconeybe commented 1 year ago

Oh that's great! Thanks for the update and I'm glad you're unblocked.