在Unity编辑器中,一切都很完美,但应用程序在手机启动屏幕后崩溃。这是我得到的错误:
2020.04.04 15:27:24.973 1668 1704 Error CRASH *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
2020.04.04 15:27:24.973 1668 1704 Error CRASH Version '2019.3.7f1 (6437fd74d35d)', Build type 'Development', Scripting Backend 'mono', CPU 'armeabi-v7a'
2020.04.04 15:27:24.973 1668 1704 Error CRASH Build fingerprint: 'samsung/dream2ltexIn Unity editor, everything works perfectly however app crashes after splash screen on the phone. Here it is the error I get::24.973 1668 1704 Error CRASH ABI: 'arm'
2020.04.04 15:27:24.973 1668 1704 Error CRASH Timestamp: 2020-04-04 15:27:24+0300
2020.04.04 15:27:24.973 1668 1704 Error CRASH pid: 1668, tid: 1704, name: UnityMain >>> com.notoli.meji <<<
2020.04.04 15:27:24.973 1668 1704 Error CRASH uid: 10409
2020.04.04 15:27:24.973 1668 1704 Error CRASH signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x4
2020.04.04 15:27:24.973 1668 1704 Error CRASH Cause: null pointer dereference
2020.04.04 15:27:24.973 1668 1704 Error CRASH r0 00000000 r1 00000000 r2 cc1fde04 r3 40000000
2020.04.04 15:27:24.973 1668 1704 Error CRASH r4 cc1fde04 r5 cc1fddec r6 bd531ca4 r7 cc1fddec
2020.04.04 15:27:24.974 1668 1704 Error CRASH r8 00000000 r9 cfead8e0 r10 cc1fdf88 r11 c9489e30
2020.04.04 15:27:24.974 1668 1704 Error CRASH ip edae6cf8 sp cc1fddc8 lr bd48bd0d pc bd48bc28
2020.04.04 15:27:24.974 1668 1704 Error CRASH
2020.04.04 15:27:24.974 1668 1704 Error CRASH backtrace:
2020.04.04 15:27:24.974 1668 1704 Error CRASH #00 pc 0010bc28 /data/app/com.notoli.meji-sbhhgQXmtpr_eZ7fRCmdkw==/lib/arm/libFirebaseCppApp-6_5_0.so (firebase::database::(anonymous namespace)::MakeKey(firebase::App*, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&)+8) (BuildId: c9e65d0479d62a87564f97624f1db521)
2020.04.04 15:27:24.974 1668 1704 Error CRASH #01 pc 0010bd09 /data/app/com.notoli.meji-sbhhgQXmtpr_eZ7fRCmdkw==/lib/arm/libFirebaseCppApp-6_5_0.so (firebase::database::Database::DeleteInternal()+120) (BuildId: c9e65d0479d62a87564f97624f1db521)
2020.04.04 15:27:24.974 1668 1704 Error CRASH #02 pc 0010bc05 /data/app/com.notoli.meji-sbhhgQXmtpr_eZ7fRCmdkw==/lib/arm/libFirebaseCppApp-6_5_0.so (firebase::database::Database::GetInstance(firebase::App*, char const*, firebase::InitResult*)+296) (BuildId: c9e65d0479d62a87564f97624f1db521)
2020.04.04 15:27:24.974 1668 1704 Error CRASH #03 pc 001014e5 /data/app/com.notoli.meji-sbhhgQXmtpr_eZ7fRCmdkw==/lib/arm/libFirebaseCppApp-6_5_0.so (Firebase_Database_CSharp_InternalFirebaseDatabase_GetInstanceInternal+28) (BuildId: c9e65d0479d62a87564f97624f1db521)
2020.04.04 15:27:24.974 1668 1704 Error CRASH #04 pc 00008422 <anonymous:e470c000>
2020.04.04 15:27:24.974 1668 1704 Error CRASH
2020.04.04 15:27:24.974 1668 1704 Error CRASH managed backtrace:
2020.04.04 15:27:24.974 1668 1704 Error CRASH #00 (wrapper managed-to-native) Firebase.Database.Internal.DatabaseInternalPINVOKE:InternalFirebaseDatabase_GetInstanceInternal (System.Runtime.InteropServices.HandleRef,string,int&)
2020.04.04 15:27:24.974 1668 1704 Error CRASH #01 Firebase.Database.Internal.InternalFirebaseDatabase:GetInstanceInternal (Firebase.FirebaseApp,string,Firebase.InitResult&) <Z:tmptmp.KRJyESkVRCfirebasedatabaseclientunityproxyInternalFirebaseDatabase.cs:137>
2020.04.04 15:27:24.974 1668 1704 Error CRASH #02 Firebase.Database.FirebaseDatabase:GetInstance (Firebase.FirebaseApp,string) <Z:tmptmp.KRJyESkVRCfirebasedatabaseclientunityproxyFirebaseDatabase.cs:159>
2020.04.04 15:27:24.974 1668 1704 Error CRASH #03 Firebase.Database.FirebaseDatabase:GetInstance (Firebase.FirebaseApp) <Z:tmptmp.KRJyESkVRCfirebasedatabaseclientunityproxyFirebaseDatabase.cs:109>
2020.04.04 15:27:24.974 1668 1704 Error CRASH #04 Firebase.Database.FirebaseDatabase:get_DefaultInstance () <Z:tmptmp.KRJyESkVRCfirebasedatabaseclientunityproxyFirebaseDatabase.cs:92>
2020.04.04 15:27:24.975 1668 1704 Error CRASH #05 Database:Start () <D:strategy - Kopya (3)AssetsScriptsDatabase.cs:28>
2020.04.04 15:27:24.975 1668 1704 Error CRASH #06 (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr)
2020.04.04 15:27:25.476 1668 1704 Error CRASH Tombstone written to: /storage/emulated/0/Android/data/com.notoli.meji/files/tombstone_00
如果有任何解释,我将不胜感激。
谢谢你的回答Patrick!我犯了两个愚蠢的错误,其中一个是我把它放在closer和opener({}(来启动函数(而vs从未提到过这一点(,另一个是(很可能是导致崩溃的那个(我到数据库的链接有一些额外的(xxx.xxx/j/。"j"不应该在那里(