Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when Application.Quit #367

Closed
Ruco opened this issue May 20, 2019 · 10 comments
Closed

Crash when Application.Quit #367

Ruco opened this issue May 20, 2019 · 10 comments

Comments

@Ruco
Copy link

Ruco commented May 20, 2019

Please fill in the following fields:

Unity editor version: 2018.1.9f2
Firebase Unity SDK version: 6.0.0
Firebase plugins in use (Auth, Database, etc.): Analytics, Crashlytics, RemoteConfig
Additional SDKs you are using (Facebook, AdMob, etc.): AdMob (+ FAN & InMobi as mediation networks)
Platform you are using the Unity editor on (Mac, Windows, or Linux): Windows
Platform you are targeting (iOS, Android, and/or desktop): Android

Please describe the issue here:

When calling Application.Quit(), often, but not always. A crash occurs.
Relevant parts of logcat:

05-20 16:42:15.347: E/firebase(20113): false

05-20 16:42:15.347: E/Unity(20113): false
05-20 16:42:15.347: E/Unity(20113):
05-20 16:42:15.347: E/Unity(20113): (Filename: ./Runtime/Export/Debug.bindings.h Line: 43)
05-20 16:42:15.347: E/firebase(20113): Crashlytics object 0xc48d30b0 should be deleted before the App 0xc4a8b8a0 it depends upon.
05-20 16:42:15.381: E/CRASH(20113): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000005
05-20 16:42:15.381: E/CRASH(20113): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
05-20 16:42:15.381: E/CRASH(20113): Build fingerprint: 'asus/WW_Z01RD/ASUS_Z01R_1:9/PPR1.180610.009/WW_90.11.162.58_20190424:user/release-keys'
05-20 16:42:15.381: E/CRASH(20113): Revision: '0'
05-20 16:42:15.381: E/CRASH(20113): pid: 20113, tid: 20390, name: Thread-301 >>> com.xxx.xxx <<<
05-20 16:42:15.381: E/CRASH(20113): r0 00000005 r1 a8c0eab8 r2 cab7f460 r3 c7d7f328
05-20 16:42:15.381: E/CRASH(20113): r4 cab7f460 r5 a8c0eab8 r6 a8c0eab8 r7 cd13cc20
05-20 16:42:15.381: E/CRASH(20113): r8 eadcf3cc r9 c7d7f328 sl cab7f460 fp c7d7f370
05-20 16:42:15.381: E/CRASH(20113): ip bfba0fa8 sp c7d7f2d8 lr bfaff2ad pc bfb117c6 cpsr 0000000b
05-20 16:42:15.381: E/CRASH(20113): backtrace:
05-20 16:42:15.904: E/CRASH(20113): #00 pc 0010e7c6 /data/app/com.xxx.xxx-N4Qj5I0d7_6GYVJ35YlefA==/lib/arm/libFirebaseCppApp-6.0.0.so (firebase::util::JObjectReference::JObjectReference(firebase::util::JObjectReference const&)+31)
05-20 16:42:15.905: E/CRASH(20113): #1 pc 000fc2a9 /data/app/com.xxx.xxx-N4Qj5I0d7_6GYVJ35YlefA==/lib/arm/libFirebaseCppApp-6.0.0.so (firebase::crashlytics::internal::CrashlyticsInternal::LogException(char const*, char const*, std::__ndk1::vector<firebase::crashlytics::Frame, std::__ndk1::allocatorfirebase::crashlytics::Frame >)+28)
05-20 16:42:15.905: E/CRASH(20113): #2 pc 000fc70d /data/app/com.xxx.xxx-N4Qj5I0d7_6GYVJ35YlefA==/lib/arm/libFirebaseCppApp-6.0.0.so (firebase::crashlytics::Crashlytics::LogException(char const*, char const*, std::_ndk1::vector<firebase::crashlytics::Frame, std::ndk1::allocatorfirebase::crashlytics::Frame >)+26)
05-20 16:42:15.905: E/CRASH(20113): #3 pc 000fb37b /data/app/com.xxx.xxx-N4Qj5I0d7_6GYVJ35YlefA==/lib/arm/libFirebaseCppApp-6.0.0.so (Firebase_Crashlytics_CSharp_FirebaseCrashlyticsInternal_LogException+54)
05-20 16:42:15.905: E/CRASH(20113): memory near r1:
05-20 16:42:15.905: E/CRASH(20113): a8c0ea98 00000000 00000000 e1869300 a107bf90 ................
05-20 16:42:15.905: E/CRASH(20113): a8c0eaa8 00000000 00000000 00000000 00000000 ................
05-20 16:42:15.905: E/CRASH(20113): a8c0eab8 6c707041 74616369 456e6f69 70656378 ApplicationExcep
05-20 16:42:15.905: E/CRASH(20113): a8c0eac8 6e6f6974 00000000 00000010 00000000 tion............
05-20 16:42:15.905: E/CRASH(20113): a8c0ead8 00000010 00000013 c1d356c8 00000040 .........V..@...
05-20 16:42:15.905: E/CRASH(20113): a8c0eae8 0000000e 00000000 34303931 30303232 ........19042200
05-20 16:42:15.905: E/CRASH(20113): a8c0eaf8 30303030 0000005a 00000010 79746972 0000Z.......rity
05-20 16:42:15.905: E/CRASH(20113): a8c0eb08 c1d35708 a8c0eb20 00000003 00000000 .W.. ...........
05-20 16:42:15.905: E/CRASH(20113): a8c0eb18 00000010 5f6e6f69 00000026 00000013 ....ion
&.......
05-20 16:42:15.905: E/CRASH(20113): a8c0eb28 cabbcf48 00000040 00000010 00000000 H...@...........
05-20 16:42:15.905: E/CRASH(20113): a8c0eb38 00000018 00000004 e330f8a8 00000000 ..........0.....
05-20 16:42:15.905: E/CRASH(20113): a8c0eb48 00000010 00000000 c1d35748 a8c0eb68 ........HW..h...
05-20 16:42:15.905: E/CRASH(20113): a8c0eb58 00000002 00000000 00000010 00000000 ................
05-20 16:42:15.905: E/CRASH(20113): a8c0eb68 0000000a 00000013 a8c0eb80 00000040 ............@...
05-20 16:42:15.905: E/CRASH(20113): a8c0eb78 0000000b 00000000 6c6e654d 6150206f ........Menlo Pa
05-20 16:42:15.905: E/CRASH(20113): a8c0eb88 00006b72 00000000 65726946 65736162 rk......Firebase
05-20 16:42:15.905: E/CRASH(20113): memory near r5:
05-20 16:42:15.905: E/CRASH(20113): a8c0ea98 00000000 00000000 e1869300 a107bf90 ................
05-20 16:42:15.906: E/CRASH(20113): a8c0eaa8 00000000 00000000 00000000 00000000 ................
05-20 16:42:15.906: E/CRASH(20113): a8c0eab8 6c707041 74616369 456e6f69 70656378 ApplicationExcep
05-20 16:42:15.906: E/CRASH(20113): a8c0eac8 6e6f6974 00000000 00000010 00000000 tion............
05-20 16:42:15.906: E/CRASH(20113): a8c0ead8 00000010 00000013 c1d356c8 00000040 .........V..@...
05-20 16:42:15.906: E/CRASH(20113): a8c0eae8 0000000e 00000000 34303931 30303232 ........19042200
05-20 16:42:15.906: E/CRASH(20113): a8c0eaf8 30303030 0000005a 00000010 79746972 0000Z.......rity
05-20 16:42:15.906: E/CRASH(20113): a8c0eb08 c1d35708 a8c0eb20 00000003 00000000 .W.. ...........
05-20 16:42:15.906: E/CRASH(20113): a8c0eb18 00000010 5f6e6f69 00000026 00000013 ....ion
&.......
05-20 16:42:15.906: E/CRASH(20113): a8c0eb28 cabbcf48 00000040 00000010 00000000 H...@...........
05-20 16:42:15.906: E/CRASH(20113): a8c0eb38 00000018 00000004 e330f8a8 00000000 ..........0.....
05-20 16:42:15.906: E/CRASH(20113): a8c0eb48 00000010 00000000 c1d35748 a8c0eb68 ........HW..h...
05-20 16:42:15.906: E/CRASH(20113): a8c0eb58 00000002 00000000 00000010 00000000 ................
05-20 16:42:15.906: E/CRASH(20113): a8c0eb68 0000000a 00000013 a8c0eb80 00000040 ............@...
05-20 16:42:15.906: E/CRASH(20113): a8c0eb78 0000000b 00000000 6c6e654d 6150206f ........Menlo Pa
05-20 16:42:15.906: E/CRASH(20113): a8c0eb88 00006b72 00000000 65726946 65736162 rk......Firebase
05-20 16:42:15.906: E/CRASH(20113): memory near r6:
05-20 16:42:15.906: E/CRASH(20113): a8c0ea98 00000000 00000000 e1869300 a107bf90 ................
05-20 16:42:15.906: E/CRASH(20113): a8c0eaa8 00000000 00000000 00000000 00000000 ................
05-20 16:42:15.906: E/CRASH(20113): a8c0eab8 6c707041 74616369 456e6f69 70656378 ApplicationExcep
05-20 16:42:15.906: E/CRASH(20113): a8c0eac8 6e6f6974 00000000 00000010 00000000 tion............
05-20 16:42:15.907: E/CRASH(20113): a8c0ead8 00000010 00000013 c1d356c8 00000040 .........V..@...
05-20 16:42:15.907: E/CRASH(20113): a8c0eae8 0000000e 00000000 34303931 30303232 ........19042200
05-20 16:42:15.907: E/CRASH(20113): a8c0eaf8 30303030 0000005a 00000010 79746972 0000Z.......rity
05-20 16:42:15.907: E/CRASH(20113): a8c0eb08 c1d35708 a8c0eb20 00000003 00000000 .W.. ...........
05-20 16:42:15.907: E/CRASH(20113): a8c0eb18 00000010 5f6e6f69 00000026 00000013 ....ion
&.......
05-20 16:42:15.907: E/CRASH(20113): a8c0eb28 cabbcf48 00000040 00000010 00000000 H...@...........
05-20 16:42:15.907: E/CRASH(20113): a8c0eb38 00000018 00000004 e330f8a8 00000000 ..........0.....
05-20 16:42:15.907: E/CRASH(20113): a8c0eb48 00000010 00000000 c1d35748 a8c0eb68 ........HW..h...
05-20 16:42:15.907: E/CRASH(20113): a8c0eb58 00000002 00000000 00000010 00000000 ................
05-20 16:42:15.907: E/CRASH(20113): a8c0eb68 0000000a 00000013 a8c0eb80 00000040 ............@...
05-20 16:42:15.907: E/CRASH(20113): a8c0eb78 0000000b 00000000 6c6e654d 6150206f ........Menlo Pa
05-20 16:42:15.907: E/CRASH(20113): a8c0eb88 00006b72 00000000 65726946 65736162 rk......Firebase
05-20 16:42:15.907: E/CRASH(20113): memory near ip:
05-20 16:42:15.907: E/CRASH(20113): bfba0f88 bfb0bf39 bfade409 bfb0c02d bfade447 9.......-...G...
05-20 16:42:15.907: E/CRASH(20113): bfba0f98 bfb0c0c1 bfb0c2c5 bfb0bd37 bfb0bd19 ........7.......
05-20 16:42:15.907: E/CRASH(20113): bfba0fa8 bfb117c7 bfb0f7f9 bfade4cd bfadf1d9 ................
05-20 16:42:15.907: E/CRASH(20113): bfba0fb8 bfadf22d bfb0fb71 bfb0fd95 bfadf25d -...q.......]...
05-20 16:42:15.907: E/CRASH(20113): bfba0fc8 bfadf1fd bfade495 bfb0d58d bfb0d4dd ................
05-20 16:42:15.907: E/CRASH(20113): bfba0fd8 bfade745 bfade79b bfade7e7 bfb18279 E...........y...
05-20 16:42:15.907: E/CRASH(20113): bfba0fe8 bfb119e5 bfadf21d bfb11efd bfadef65 ............e...
05-20 16:42:15.907: E/CRASH(20113): bfba0ff8 bfb1156d bfb1022d bfb11f45 bfb15d9b m...-...E....]..
05-20 16:42:15.907: E/CRASH(20113): bfba1008 bfb15ed9 bfb15e55 bfb15e4f bfb15ead .^..U^..O^...^..
05-20 16:42:15.907: E/CRASH(20113): bfba1018 bfb15e75 bfb15f09 bfade581 bfade681 u^..._..........
05-20 16:42:15.908: E/CRASH(20113): bfba1028 bfb173e1 bfb15c95 bfb14c69 bfb14ae5 .s.....iL...J..
05-20 16:42:15.908: E/CRASH(20113): bfba1038 bfade66d bfb14b25 bfadf2cd bfb149c5 m...%K.......I..
05-20 16:42:15.908: E/CRASH(20113): bfba1048 bfadf2fb ead30fa5 bfae2679 bfae26cd ........y&...&..
05-20 16:42:15.908: E/CRASH(20113): bfba1058 bfadf4bb bfae15b5 bfae2693 bfae168b .........&......
05-20 16:42:15.908: E/CRASH(20113): bfba1068 bfadf541 bfae16e9 ead2cf1b bfadb0b3 A...............
05-20 16:42:15.908: E/CRASH(20113): bfba1078 bfae1495 bfae16a9 bfae170d ead2cf1f ................
05-20 16:42:15.908: E/CRASH(20113): code around pc:
05-20 16:42:15.908: E/CRASH(20113): bfb117a4 b5704770 46084604 680e460d e8b8f7bf pGp..F.F.F.h....
05-20 16:42:15.908: E/CRASH(20113): bfb117b4 60266869 6802b119 47906d52 46206060 ih&`...hRm.GF 05-20 16:42:15.908: E/CRASH(20113): bfb117c4 6800bd70 bf66f059 2100b510 f7bf4604 p..hY.f....!.F.. 05-20 16:42:15.908: E/CRASH(20113): bfb117d4 4620e8ae b570bd10 4604460d e8a0f7bf .. F..p..F.F.... 05-20 16:42:15.908: E/CRASH(20113): bfb117e4 46066861 6830b129 46306d82 20004790 ah.F).0h.m0F.G. 05-20 16:42:15.908: E/CRASH(20113): bfb117f4 b12d6060 46296830 46306d42 60604790 -.0h)FBm0F.G``
05-20 16:42:15.908: E/CRASH(20113): bfb11804 b510bd70 46046849 e890f7bf bd104620 p...Ih.F.... F..
05-20 16:42:15.908: E/CRASH(20113): bfb11814 4604b5bc 490f480e 44794478 68096800 ...F.H.IxDyD.h.h
05-20 16:42:15.908: E/CRASH(20113): bfb11824 e88af7bf 4621480c 68004478 f7bf6800 .....H!FxD.h.h..
05-20 16:42:15.908: E/CRASH(20113): bfb11834 6820e88a 2200a901 69032500 47984620 .. h...".%.i F.G
05-20 16:42:15.908: E/CRASH(20113): bfb11844 28009901 4629bf18 b0024608 bf00bdb0 ...(..)F.F......
05-20 16:42:15.908: E/CRASH(20113): bfb11854 0008f054 0008f056 0008f04c 47109800 T...V...L......G
05-20 16:42:15.908: E/CRASH(20113): bfb11864 bf20f059 bf26f059 4605b5b0 e858f7bf Y. .Y.&....F..X.
05-20 16:42:15.908: E/CRASH(20113): bfb11874 b1496869 48054604 6e024478 f7cc4620 ihI..F.HxD.n F..
05-20 16:42:15.908: E/CRASH(20113): bfb11884 4620ff51 ec96f7b9 bf00bdb0 000941e4 Q. F.........A..
05-20 16:42:15.908: E/CRASH(20113): bfb11894 4605b5b0 e844f7bf b1496869 48054604 ...F..D.ihI..F.H
05-20 16:42:15.908: E/CRASH(20113): code around lr:
05-20 16:42:15.908: E/CRASH(20113): bfaff28c 47f0e92d 4607b08c 44784827 78006800 -..G...F'HxD.h.x
05-20 16:42:15.909: E/CRASH(20113): bfaff29c d0452800 46996838 460e4692 efaaf7cb .(E.8h.F.F.F....
05-20 16:42:15.909: E/CRASH(20113): bfaff2ac 0820f10d 46294605 f7cf4640 2000eaa4 .. ..F)F@F.....
05-20 16:42:15.909: E/CRASH(20113): bfaff2bc e9cd9006 46300004 ea14f7cb 4602ac04 ......0F.......F
05-20 16:42:15.909: E/CRASH(20113): bfaff2cc 46204631 fed7f7dd 46204918 f7cb4479 1F F.....I FyD..
05-20 16:42:15.909: E/CRASH(20113): bfaff2dc 4620ece6 f7cb4651 ae01ece2 46304621 .. FQF......!F0F
05-20 16:42:15.909: E/CRASH(20113): bfaff2ec ea42f7cb 46314638 4643464a ea88f7cf ..B.8F1FJFCF....
05-20 16:42:15.909: E/CRASH(20113): bfaff2fc 46304607 f810f7d7 463b480d 68414478 .F0F.....H;FxDAh
05-20 16:42:15.909: E/CRASH(20113): bfaff30c 46286bc2 ff3cf7ff 46284a0a 447a2104 .k(F..<..J(F.!zD
05-20 16:42:15.909: E/CRASH(20113): bfaff31c ebe8f7cd f7d64620 4640ffff ea76f7cf .... F....@f..v.
05-20 16:42:15.909: E/CRASH(20113): bfaff32c e8bdb00c bf0087f0 000a14f2 00087d18 .............}..
05-20 16:42:15.909: E/CRASH(20113): bfaff33c 000a5e30 00087a04 43f8e92d 68004681 0^...z..-..C.F.h
05-20 16:42:15.909: E/CRASH(20113): bfaff34c 4690461d f7cb460e 4604ef56 07c07830 .F.F.F..V..F0x..
05-20 16:42:15.909: E/CRASH(20113): bfaff35c 1c71bf0c 682068b1 229cf8d0 47904620 ..q..h h..." F.G
05-20 16:42:15.909: E/CRASH(20113): bfaff36c 46284606 f7cf4631 4f11ea58 46334620 .F(F1F..X..O F3F
05-20 16:42:15.909: E/CRASH(20113): bfaff37c 68f9447f f7df69ba 4606fe6b 46314628 .D.h.i..k..F(F1F

Any help that can be offered with this will be highly appreciated.
Already spent way too much time on this issue.
Thanks

@Ruco Ruco added the new New issue. label May 20, 2019
@MichaelPageArtrix
Copy link

MichaelPageArtrix commented May 20, 2019

Hi I'm also having this on both Android and iOS.

For me itt seems that the error "object xxxxxxx should be deleted before the app xxxxxxx it depends upon" which is shown for auth, database and functions has been set to an exception for Functions.

You can see below that there are three of these debug logs - one for database, auth and functions. Only the functions is throwing an exception.

From your log it seems like crashlytics might be doing the same thing possibly.

Auth object 0xb59f1f90 should be deleted before the App 0xc40bdc20 it depends upon.
05-21 09:25:26.510 14888 14925 W Unity   :
05-21 09:25:26.510 14888 14925 W Unity   : (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)
05-21 09:25:26.510 14888 14925 W Unity   :
05-21 09:25:26.512 14888 14925 W Unity   : Database object 0xc2789e48 should be deleted before the App 0xc40bdc20 it depends upon.
05-21 09:25:26.512 14888 14925 W Unity   :
05-21 09:25:26.512 14888 14925 W Unity   : (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)
05-21 09:25:26.512 14888 14925 W Unity   :
05-21 09:25:26.532 14888 14925 E Unity   : false
05-21 09:25:26.532 14888 14925 E Unity   : UnityEngine.DebugLogHandler:Internal_Log()
05-21 09:25:26.532 14888 14925 E Unity   : UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
05-21 09:25:26.532 14888 14925 E Unity   : UnityEngine.Logger:Log(LogType, Object)
05-21 09:25:26.532 14888 14925 E Unity   : UnityEngine.Debug:LogError(Object)
05-21 09:25:26.532 14888 14925 E Unity   : Firebase.Platform.FirebaseLogger:LogMessage(PlatformLogLevel, String) (at Z:\tmp\tmp.HS4g6QPeVa\firebase\app\client\unity\src\Unity\FirebaseLogger.cs:19)
05-21 09:25:26.532 14888 14925 E Unity   : Firebase.LogUtil:LogMessage(LogLevel, String) (at Z:\tmp\tmp.IBVQRwCCZa\firebase\app\client\unity\proxy\LogUtil.cs:63)
05-21 09:25:26.532 14888 14925 E Unity   : Firebase.AppUtilPINVOKE:FirebaseApp_ReleaseReferenceInternal()
05-21 09:25:26.532 14888 14925 E Unity   : Firebase.FirebaseApp:ReleaseReferenceInternal(FirebaseApp) (at Z:\tmp\tmp.IBVQRwCCZa\firebase\app\client\unity\proxy\FirebaseApp.cs:971)
05-21 09:25:26.532 14888 14925 E Unity   : Firebase.FirebaseApp:RemoveReference() (at Z:\tmp\tmp.IBVQRwCCZa\firebase\app\client\unity\proxy\FirebaseApp.cs:265)
05-21 09:25:26.532 14888 14925 E Unity   : Firebase.FirebaseApp:Dispose() (at Z:\tmp\tmp.IBVQRwCCZa\firebase\app\client\unity\proxy\FirebaseApp.cs:51)
05-21 09:25:26.532 14888 14925 E Unity   : ArtrixAccounts:OnListenerDestroy() (at D:\Development\monster_claw_artrix_internal\trunk\mc_client\Assets\Scripts\ArtrixAccounts
05-21 09:25:26.658 14888 14925 D Unity   : Uploading Crash Report
05-21 09:25:26.663 14888 14925 E Unity   : ApplicationException: Functions object 0xc33f2c80 should be deleted before the App 0xc40bdc20 it depends upon.
05-21 09:25:26.663 14888 14925 E Unity   :   at Firebase.FirebaseApp.ReleaseReferenceInternal (Firebase.FirebaseApp app) [0x00015] in Z:\tmp\tmp.IBVQRwCCZa\firebase\app\client\unity\proxy\FirebaseApp.cs:972
05-21 09:25:26.663 14888 14925 E Unity   :   at Firebase.FirebaseApp.RemoveReference () [0x00066] in Z:\tmp\tmp.IBVQRwCCZa\firebase\app\client\unity\proxy\FirebaseApp.cs:265
05-21 09:25:26.663 14888 14925 E Unity   :   at Firebase.FirebaseApp.Dispose () [0x00000] in Z:\tmp\tmp.IBVQRwCCZa\firebase\app\client\unity\proxy\FirebaseApp.cs:51

@chkuang-g
Copy link
Contributor

This is similar to the first issue reported in #368

As described in #368, I think this is due to FirebaseApp got finalized before FirebaseCrashlytics and it asserted at C++ level. This actually should be allowed. We can change that pretty fast.

At the meantime, please just try to catch the exception thrown from Application.Quit(). I am a bit skeptical if this helps. Another option is to downgrade the Firebase SDK to any one prior to 5.6.0, which is the version introducing the issue. You should be able to download the older SDK using the link like the following (replace the version number if needed)
https://dl.google.com/firebase/sdk/unity/firebase_unity_sdk_5.5.0.zip

Sorry for the inconvenience and we are working on the fix for this.

@chkuang-g chkuang-g added type: bug and removed new New issue. labels May 21, 2019
@Ruco
Copy link
Author

Ruco commented May 21, 2019

Thank you very much for the help.

Try / catching the exception indeed doesn't help.
I will try downgrading the firebase plugins now. Or would it be better to wait for the new version?
Since you say the change can be made pretty fast. And the newer versions fixed other issues for us.
How much time before a new release are we talking? Thanks

@giliwerner
Copy link

giliwerner commented May 21, 2019

We are seeing the same issue in our app:

05-21 16:38:07.091 22932 22974 I Unity : Crashlytics object 0x83ff0160 should be deleted before the App 0x8d84c920 it depends upon.
05-21 16:38:07.091 22932 22974 I Unity : Stack:at Firebase.FirebaseApp.ReleaseReferenceInternal (Firebase.FirebaseApp app)
05-21 16:38:07.091 22932 22974 I Unity : at Firebase.FirebaseApp.RemoveReference ()

We added in the "OnApplicationQuit" callback the following lines:

if (_firebaseApp != null)
{
      _firebaseApp.Dispose();
      _firebaseApp = null;
}

We added these lines to fix a SIGSEV crash we encountered when opening the app without internet, then closing the app, then opening it again with internet. Without this Dispose call, it would crash every time in this flow.

It appears that in our case, the trigger of the error message ("Crashlytics object xxxxx should be deleted before the App xxxxxxx it depends upon") is the call to Dispose.

Will your fix solve this case as well?
When can we expect a new Crashlytics version with a fix for this?

We are using:
Unity editor version: 2018.4.0f1
Firebase Unity SDK version: 6.0.0
Firebase plugins in use (Auth, Database, etc.): Crashlytics, Messaging
Platform you are using the Unity editor on (Mac, Windows, or Linux): Mac
Platform you are targeting (iOS, Android, and/or desktop): Android

@chkuang-g
Copy link
Contributor

The fix is ready and will be in the next release.

I will update once the release is live.

@AllanRW
Copy link

AllanRW commented Jun 3, 2019

I've same error on Android after update from 5.6.1 > 6.0.0, any ETA for the next release?

Unity editor version: 2019.1.5f1
Firebase Unity SDK version: 6.0.0
Firebase plugins in use (Auth, Database, etc.): Crashlytics, Analytics, Remote Config
Platform you are using the Unity editor on (Mac, Windows, or Linux): Mac
Platform you are targeting (iOS, Android, and/or desktop): Android/iOS

@ryanmeier
Copy link

@AllanRW We're finalizing the next release, and it should hopefully be out today or tomorrow. I'll update this issue once it's live.

@ryanmeier
Copy link

@Ruco @MichaelPageArtrix @giliwerner @AllanRW
Version 6.1.0 of the Firebase Unity SDK is now available, which should fix this issue. If you run into any more issues, please feel free to let us know!

@giliwerner
Copy link

I updated to the latest Firebase unity plugin (6.1.1), but I still see an issue when closing the app with Application.Quit()...

I see these lines in the adb logs:
06-12 18:18:40.833 12847 12904 D firebase: Deleting app __FIRAPP_DEFAULT (0x84f727c0)
06-12 18:18:40.833 12847 12904 I Unity : Deleting app __FIRAPP_DEFAULT (0x84f727c0)
06-12 18:18:40.833 12847 12904 W firebase: Crashlytics object 0x8c7ff580 should be deleted before the App 0x84f727c0 it depends upon.
06-12 18:18:40.858 12847 12904 W Unity : Crashlytics object 0x8c7ff580 should be deleted before the App 0x84f727c0 it depends upon.
06-12 18:18:40.858 12847 12904 W Unity : UnityEngine.Logger:Log(LogType, Object)
06-12 18:18:40.858 12847 12904 W Unity :
06-12 18:18:40.858 12847 12904 W Unity : (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)
06-12 18:18:40.858 12847 12904 W Unity :
06-12 18:18:40.858 12847 13130 W art : Native thread exiting without having called DetachCurrentThread (maybe it's going to use a pthread_key_create destructor?): Thread[78,tid=13130,Native,Thread*=0x84c70e00,peer=0x1316d160,"Thread-3683"]
06-12 18:18:40.858 12847 12904 D firebase: Cancel pending callbacks for ""
06-12 18:18:40.858 12847 12904 I Unity : Cancel pending callbacks for ""

And when doing this flow, thee app fails to load (opening the app will only display a black screen):

  1. open the app
  2. report a non-fatal error to crashlytics
  3. exit the app with Application.Quit()
  4. open the app
    The screen is black and no matter how long I wait the app won't load.

@chkuang-g
Copy link
Contributor

chkuang-g commented Jun 12, 2019

@giliwerner

"Crashlytics object 0x8c7ff580 should be deleted before the App 0x84f727c0 it depends upon." is just a warning message and it should not do any harm. Are you seeing any issue, like crash, other than the black screen problem?

Regarding to the black screen issue, are you able to reproduce it using Crashlytics quickstart, ex. add Application.Quit() in the sample. Also, could you provide the log when you see the black screen?

Thank you

@firebase firebase locked and limited conversation to collaborators Oct 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants