I have both packages in my project using unity 2018.2.6f1. After the initialization (CheckAndFixDependenciesAsync part) everything is working fine except when I close the app, I get a crash on xcode:
Thread 1: EXC_BAD_ACCESS (code=1, address=0x1267ddc48)
Here is the code that xcode is pointing at:
public:
//internal
static FORCE_INLINE const VirtualInvokeData& GetInterfaceInvokeDataFromVTable(const Il2CppObject* obj, const Il2CppClass* itf, Il2CppMethodSlot slot)
{
const Il2CppClass* klass = obj->klass;
IL2CPP_ASSERT(klass->initialized);
IL2CPP_ASSERT(slot < itf->method_count);
for (uint16_t i = 0; i < klass->interface_offsets_count; i++)
{
if (klass->interfaceOffsets[i].interfaceType == itf)
{
int32_t offset = klass->interfaceOffsets[i].offset;
IL2CPP_ASSERT(offset != -1);
IL2CPP_ASSERT(offset + slot < klass->vtable_count);
return klass->vtable[offset + slot];
}
}
return GetInterfaceInvokeDataFromVTableSlowPath(obj, itf, slot);
}
specifically on this line:
if (klass->interfaceOffsets[i].interfaceType == itf)
I tried latest 5.4.3 version and tried going back to 5.4.2 without any luck
Hi there,
I got the same problem here.
Hi all,
Could you provide the callstack if available?
Thank you!
Shawn
Hi @chkuang-g
Here is full stacktrace
Libraries/libil2cpp/include/vm/Class.h:107:13InterfaceFuncInvoker0<int>::Invoke(unsigned int, Il2CppClass*, Il2CppObject*)
Classes/Native/Bulk_Firebase.Platform_0.cpp:10430:17FirebaseLogger_LogMessage_m2677119794
Classes/Native/Bulk_Firebase.Platform_0.cpp:10430:17FirebaseLogger_LogMessage_m2677119794
arfirebase::AppLogCallback(firebase::LogLevel, char const*, void*)
arfirebase::LogMessageWithCallbackV(firebase::LogLevel, char const*, char*)
arfirebase::LogWarning(char const*, ...)
arfirebase::CppInstanceManager<firebase::App>::~CppInstanceManager()
/usr/lib/system/libsystem_c.dylib___cxa_finalize_ranges
/usr/lib/system/libsystem_c.dylib_exit
PrivateFrameworks/UIKitCore.framework/UIKitCore-[UIApplication _terminateWithStatus:]
PrivateFrameworks/UIKitCore.framework/UIKitCore___98-[__UICanvasLifecycleMonitor_Compatability deactivateEventsOnly:withContext:forceExit:completion:]_block_invoke.279
PrivateFrameworks/UIKitCore.framework/UIKitCore__runAfterCACommitDeferredBlocks
PrivateFrameworks/UIKitCore.framework/UIKitCore__cleanUpAfterCAFlushAndRunDeferredBlocks
PrivateFrameworks/UIKitCore.framework/UIKitCore__afterCACommitHandler
Frameworks/CoreFoundation.framework/CoreFoundation___CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__
Frameworks/CoreFoundation.framework/CoreFoundation___CFRunLoopDoObservers
Frameworks/CoreFoundation.framework/CoreFoundation___CFRunLoopRun
Frameworks/CoreFoundation.framework/CoreFoundation_CFRunLoopRunSpecific
PrivateFrameworks/GraphicsServices.framework/GraphicsServices_GSEventRunModal
PrivateFrameworks/UIKitCore.framework/UIKitCore_UIApplicationMain
Classes/main.mm:33:9main
/usr/lib/system/libdyld.dylib_start
Thread 1路
/usr/lib/system/libsystem_kernel.dylib___workq_kernreturn
/usr/lib/system/libsystem_pthread.dylib__pthread_wqthread
Thread 2路
/usr/lib/system/libsystem_kernel.dylib___workq_kernreturn
/usr/lib/system/libsystem_pthread.dylib__pthread_wqthread
Thread 3路
/usr/lib/system/libsystem_kernel.dylib_mach_msg_trap
/usr/lib/system/libsystem_kernel.dylib_mach_msg
Frameworks/CoreFoundation.framework/CoreFoundation___CFRunLoopServiceMachPort
Frameworks/CoreFoundation.framework/CoreFoundation___CFRunLoopRun
Frameworks/CoreFoundation.framework/CoreFoundation_CFRunLoopRunSpecific
Frameworks/Foundation.framework/Foundation-[NSRunLoop(NSRunLoop) runMode:beforeDate:]
Frameworks/Foundation.framework/Foundation-[NSRunLoop(NSRunLoop) runUntilDate:]
PrivateFrameworks/UIKitCore.framework/UIKitCore-[UIEventFetcher threadMain]
Frameworks/Foundation.framework/Foundation___NSThread__start__
/usr/lib/system/libsystem_pthread.dylib__pthread_body
/usr/lib/system/libsystem_pthread.dylib__pthread_start
Thread 4路
/usr/lib/system/libsystem_kernel.dylib___workq_kernreturn
/usr/lib/system/libsystem_pthread.dylib__pthread_wqthread
Thread 5路
/usr/lib/system/libsystem_kernel.dylib_mach_msg_trap
/usr/lib/system/libsystem_kernel.dylib_mach_msg
Frameworks/CoreFoundation.framework/CoreFoundation___CFRunLoopServiceMachPort
Frameworks/CoreFoundation.framework/CoreFoundation___CFRunLoopRun
Frameworks/CoreFoundation.framework/CoreFoundation_CFRunLoopRunSpecific
Frameworks/AVFoundation.framework/Frameworks/AVFAudio.framework/AVFAudioGenericRunLoopThread::Entry(void*)
Frameworks/AVFoundation.framework/Frameworks/AVFAudio.framework/AVFAudioCAPThread::Entry(CAPThread*)
/usr/lib/system/libsystem_pthread.dylib__pthread_body
/usr/lib/system/libsystem_pthread.dylib__pthread_start
Thread 6路
/usr/lib/system/libsystem_kernel.dylib_mach_msg_trap
/usr/lib/system/libsystem_kernel.dylib_mach_msg
Frameworks/CoreFoundation.framework/CoreFoundation___CFRunLoopServiceMachPort
Frameworks/CoreFoundation.framework/CoreFoundation___CFRunLoopRun
Frameworks/CoreFoundation.framework/CoreFoundation_CFRunLoopRunSpecific
Frameworks/CoreFoundation.framework/CoreFoundation_CFRunLoopRun
Frameworks/CoreMotion.framework/CoreMotion0x1868ab364 (-0x2fbcc000 + 7353103204)
/usr/lib/system/libsystem_pthread.dylib__pthread_body
/usr/lib/system/libsystem_pthread.dylib__pthread_start
Thread 7路
/usr/lib/system/libsystem_kernel.dylib_mach_msg_trap
/usr/lib/system/libsystem_kernel.dylib_mach_msg
Frameworks/CoreFoundation.framework/CoreFoundation___CFRunLoopServiceMachPort
Frameworks/CoreFoundation.framework/CoreFoundation___CFRunLoopRun
Frameworks/CoreFoundation.framework/CoreFoundation_CFRunLoopRunSpecific
Frameworks/CFNetwork.framework/CFNetwork-[__CoreSchedulingSetRunnable runForever]
Frameworks/Foundation.framework/Foundation___NSThread__start__
/usr/lib/system/libsystem_pthread.dylib__pthread_body
/usr/lib/system/libsystem_pthread.dylib__pthread_start
Thread 8路
/usr/lib/system/libsystem_kernel.dylib_mach_msg_trap
/usr/lib/system/libsystem_kernel.dylib_mach_msg
/usr/lib/system/libsystem_kernel.dylib_thread_suspend
/Users/travis/build/bugsnag/bugsnag-unity/bugsnag-cocoa-build/Source/KSCrash/Source/KSCrash/Recording/Sentry/BSG_KSCrashSentry_MachException.c:210:9ksmachexc_i_handleExceptions
/usr/lib/system/libsystem_pthread.dylib__pthread_body
/usr/lib/system/libsystem_pthread.dylib__pthread_start
Thread 9路
Thread 10路
/usr/lib/system/libsystem_kernel.dylib___psynch_cvwait
/usr/lib/system/libsystem_pthread.dylib__pthread_cond_wait$VARIANT$mp
/usr/lib/libc++.1.dylibstd::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&)
Frameworks/JavaScriptCore.framework/JavaScriptCorevoid std::__1::condition_variable_any::wait<std::__1::unique_lock<bmalloc::Mutex> >(std::__1::unique_lock<bmalloc::Mutex>&)
Frameworks/JavaScriptCore.framework/JavaScriptCorebmalloc::Scavenger::threadRunLoop()
Frameworks/JavaScriptCore.framework/JavaScriptCorebmalloc::Scavenger::threadEntryPoint(bmalloc::Scavenger*)
Frameworks/JavaScriptCore.framework/JavaScriptCorevoid* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (*)(bmalloc::Scavenger*), bmalloc::Scavenger*> >(void*)
/usr/lib/system/libsystem_pthread.dylib__pthread_body
/usr/lib/system/libsystem_pthread.dylib__pthread_start
Thread 11路
/usr/lib/system/libsystem_kernel.dylib_select$DARWIN_EXTSN
Frameworks/CoreFoundation.framework/CoreFoundation___CFSocketManager
/usr/lib/system/libsystem_pthread.dylib__pthread_body
/usr/lib/system/libsystem_pthread.dylib__pthread_start
Thread 12路
/usr/lib/system/libsystem_kernel.dylib___workq_kernreturn
/usr/lib/system/libsystem_pthread.dylib__pthread_wqthread
Thread 13路
/usr/lib/system/libsystem_kernel.dylib___workq_kernreturn
/usr/lib/system/libsystem_pthread.dylib__pthread_wqthread
Thread 14路
/usr/lib/system/libsystem_kernel.dylib___workq_kernreturn
/usr/lib/system/libsystem_pthread.dylib__pthread_wqthread
I see.
I think the reason of this crash is because the Analytics static library is holding a reference of FirebaseApp until the very end of the app life cycle. By the time when CppInstanceManager, which is also an static instance, is destroyed, il2cpp libraries has been unloaded or deallocated already.
I have added a task to track this bug. Will keep you updated.
OK. Thank you!
I'm also getting this issue, any further info or work arounds?
Same here. Don't want to downgrade or leave a broken version in the app store over the christmas 馃
We have the same crashes in our app in new version (Analytics & remote config sdk) Unity 2018.2.8f1
Same here. Really need a fix
@chkuang-g has a fix checked in, we're going through the process of QA'ing a build.
Any updates?
I think we should wait because of the holiday season
any updates ?
I hope you all had a great holiday time and ready to work. Because I didn't have. Please fix this problem or at least give us a work around as soon as possible. I am not able to manage my clients anymore. They demand to fix crashes and this problem even seems to be reason of terminating my contract.
We are managed to fix this issue and will include the fix in the next release.
This issue was introduced in 5.4.2 to fix the race condition when frequently create/destroy FirebaseApp.
The quick workaround is to revert the Firebase SDK version back to 5.4.1. If the app, mostly iOS app, crashes when FirebaseApp/FirebaseDatabase is created/destroyed, try to hold a reference to prevent it from being GCed.
Hope this help and wish you to have a happy new year.
We are also seeing this crash log. Do you know when 5.4.4 will be released that will fix this problem?
I also have this issue. Any news?
Hi, I'm also having this issue but can't replicated it. Two questions. Does anyone know if the user is aware of the crash? 2) Is there an ETA for the update with the fix? Thanks.
Hi folks,
Good news. This issue is fixed in our latest 5.4.4 release.
Please let us know if you are still experiencing similar crash.
Shawn
Most helpful comment
I see.
I think the reason of this crash is because the Analytics static library is holding a reference of FirebaseApp until the very end of the app life cycle. By the time when CppInstanceManager, which is also an static instance, is destroyed, il2cpp libraries has been unloaded or deallocated already.
I have added a task to track this bug. Will keep you updated.