quickstart-unity icon indicating copy to clipboard operation
quickstart-unity copied to clipboard

[Bug] unity ios crash log can't restore li2cpp stack symbol but the third party Library is fine

Open meichen8050753 opened this issue 4 years ago • 19 comments

[REQUIRED] Please fill in the following fields:

  • Unity editor version: 2018.4.23f1
  • Firebase Unity SDK version: 8.6.2
  • Source you installed the SDK: .unitypackage
  • Problematic Firebase Component: Crashlytics
  • Other Firebase Components in use: Google Analytics
  • Additional SDKs you are using: none
  • Platform you are using the Unity editor on: mac
  • Platform you are targeting: iOS
  • Scripting Runtime: IL2CPP

[REQUIRED] Please describe the issue here:

问题截图

Steps to reproduce:

1、Create empty unity project 2、Set up filebase sdk width Crashlytics and Analytics 3、Write some crash code and trigger with button click event. 4、Build the project with ios and install on the iphone 5、Open The Xcode Project And Run Product->Archive 6、Open the Xcode Organizer window and Find the dSYM file in .xcarchive 7、Upload dSYM file width command "/path/to/pods/directory/FirebaseCrashlytics/upload-symbols -gsp /path/to/GoogleService-Info.plist -p ios /path/to/dSYMs" 8、Click the button and the app will crash 9、See the creash report on firebse crashlytics

Relevant Code

Code.zip

meichen8050753 avatar Dec 06 '21 10:12 meichen8050753

Thanks for reporting this, @meichen8050753. I noticed that you've uploaded a dSYM file. Could you provide your complete steps in doing this? The symbols are supposedly uploaded automatically by the Firebase Unity Editor plugin.

paulinon avatar Dec 06 '21 14:12 paulinon

Thanks for reporting this, @meichen8050753. I noticed that you've uploaded a dSYM file. Could you provide your complete steps in doing this? The symbols are supposedly uploaded automatically by the Firebase Unity Editor plugin. Thanks for replay. I have added the upload dSYM file steps

meichen8050753 avatar Dec 07 '21 02:12 meichen8050753

Thanks for clarifying, @meichen8050753. While we're trying to replicate the issue, I would like to ask for more context about this. When you mentioned that a third-party library does fine, could you provide its differences between the stack traces returned by the Firebase SDK and those of the third-party library? Could you also share the expected stack trace output by the Firebase SDK?

Also, have you encountered a missing dSYMs banner in your console?

paulinon avatar Dec 07 '21 18:12 paulinon

Thanks for replay, @paulinon The third-party library as the screenshot shows, the criware libs call stak is readable, it can restore the call stack. but the li2cpp part not, it not readable ,and I can't get any infomation form it. image

my expected stack trace output is restore the complete stack information, like this.

This is the crash log captured and restored by bugly image

this is orgin crash log image

I don't quite understand what this is encountered a missing dSYMs banner in console, and how should I check this point.

meichen8050753 avatar Dec 08 '21 05:12 meichen8050753

Hi @meichen8050753,

In your dSYMs tab, could you confirm if you have no required dSYMs (whether required or optional)? Could you also confirm if your app is bitcode-enabled?

paulinon avatar Dec 08 '21 15:12 paulinon

I confirm my bitcode-disabled image

the dSYMs tab do you mean : Debug information format? image

meichen8050753 avatar Dec 09 '21 03:12 meichen8050753

Hi @meichen8050753, I meant the dSYMs tab in your Crashlytics dashboard. Do you have any missing dSYMs (required or optional) as seen in your dashboard? If you do, could you try if uploading the missing dSYMs makes a difference?

Additionally, could you verify if using the simulator returns a similar set of crashes?

paulinon avatar Dec 09 '21 15:12 paulinon

Hi @paulinon I confirmed that there was no mission dSYMs (required or optional) image

I'll test it later with the simulator. Did you try to reproduce the problem with the same steps?

meichen8050753 avatar Dec 09 '21 16:12 meichen8050753

@paulinon I trid the same step on iOS similar , but I found no crash log report on firebase Crashlytics dashboard

meichen8050753 avatar Dec 13 '21 02:12 meichen8050753

@paulinon @lahirumaramba @jamesdaniels @google-oss-bot Is anyone here?

meichen8050753 avatar Dec 15 '21 03:12 meichen8050753

I also have a similar case. In my case the symbol in the ios il2cpp code shows as
void firebase::ReferenceCountedFutureImpl::CompleteWithResultInternal<firebase::auth::SignInResult>.

Crashed: com.apple.main-thread
0  libsystem_platform.dylib       0x5e0c _platform_memset + 108
1  UnityFramework                 0x1461858 GC_clear_stack_inner + 489 (mark_rts.c:489)
2  UnityFramework                 0x1461874 GC_clear_stack_inner + 56 (mark.c:56)
3  UnityFramework                 0x1461874 GC_clear_stack_inner + 56 (mark.c:56)
4  UnityFramework                 0x1461874 GC_clear_stack_inner + 56 (mark.c:56)
5  UnityFramework                 0x1461874 GC_clear_stack_inner + 56 (mark.c:56)
6  UnityFramework                 0x1461874 GC_clear_stack_inner + 56 (mark.c:56)
7  UnityFramework                 0x1461874 GC_clear_stack_inner + 56 (mark.c:56)
8  UnityFramework                 0x1461874 GC_clear_stack_inner + 56 (mark.c:56)
9  UnityFramework                 0x1461874 GC_clear_stack_inner + 56 (mark.c:56)
10 UnityFramework                 0x145e21c GC_malloc_kind_global + 368 (misc.c:368)
11 UnityFramework                 0x1495570 il2cpp::vm::Object::AllocatePtrFree(unsigned long, Il2CppClass*) + 67 (Object.cpp:67)
12 UnityFramework                 0x1493ac4 il2cpp::vm::String::NewSize(int) + 113 (String.cpp:113)
13 UnityFramework                 0x14939b0 il2cpp::vm::String::NewLen(char const*, unsigned int) + 86 (String.cpp:86)
14 UnityFramework                 0xd79bb4 scripting_string_new(char const*, unsigned int) + 534 (ScriptingApi_Il2Cpp.cpp:534)
15 UnityFramework                 0xdf05ac PlayerPrefs_CUSTOM_GetString(ScriptingBackendNativeStringPtrOpaque*, ScriptingBackendNativeStringPtrOpaque*) + 2708112 (CoreBindings.gen.cpp:2708112)
16 UnityFramework                 0x1ff8d88 void firebase::ReferenceCountedFutureImpl::CompleteWithResultInternal<firebase::auth::SignInResult>(firebase::FutureHandle const&, int, char const*, firebase::auth::SignInResult const&) (.cold.1) + 4391013768
17 UnityFramework                 0x1ff8b18 void firebase::ReferenceCountedFutureImpl::CompleteWithResultInternal<firebase::auth::SignInResult>(firebase::FutureHandle const&, int, char const*, firebase::auth::SignInResult const&) (.cold.1) + 4391013144
18 UnityFramework                 0x15e9fa4 void firebase::ReferenceCountedFutureImpl::CompleteWithResultInternal<firebase::auth::SignInResult>(firebase::FutureHandle const&, int, char const*, firebase::auth::SignInResult const&) (.cold.1) + 4380467108
19 UnityFramework                 0x1ff9cc4 void firebase::ReferenceCountedFutureImpl::CompleteWithResultInternal<firebase::auth::SignInResult>(firebase::FutureHandle const&, int, char const*, firebase::auth::SignInResult const&) (.cold.1) + 4391017668
20 UnityFramework                 0x1ff9ce8 void firebase::ReferenceCountedFutureImpl::CompleteWithResultInternal<firebase::auth::SignInResult>(firebase::FutureHandle const&, int, char const*, firebase::auth::SignInResult const&) (.cold.1) + 4391017704
21 UnityFramework                 0x1ff9ce8 void firebase::ReferenceCountedFutureImpl::CompleteWithResultInternal<firebase::auth::SignInResult>(firebase::FutureHandle const&, int, char const*, firebase::auth::SignInResult const&) (.cold.1) + 4391017704
22 UnityFramework                 0x1ff9ce8 void firebase::ReferenceCountedFutureImpl::CompleteWithResultInternal<firebase::auth::SignInResult>(firebase::FutureHandle const&, int, char const*, firebase::auth::SignInResult const&) (.cold.1) + 4391017704
23 UnityFramework                 0x1ff9ce8 void firebase::ReferenceCountedFutureImpl::CompleteWithResultInternal<firebase::auth::SignInResult>(firebase::FutureHandle const&, int, char const*, firebase::auth::SignInResult const&) (.cold.1) + 4391017704
24 UnityFramework                 0x1ff9ce8 void firebase::ReferenceCountedFutureImpl::CompleteWithResultInternal<firebase::auth::SignInResult>(firebase::FutureHandle const&, int, char const*, firebase::auth::SignInResult const&) (.cold.1) + 4391017704
25 UnityFramework                 0x1ff9ce8 void firebase::ReferenceCountedFutureImpl::CompleteWithResultInternal<firebase::auth::SignInResult>(firebase::FutureHandle const&, int, char const*, firebase::auth::SignInResult const&) (.cold.1) + 4391017704
26 UnityFramework                 0x1ff9ce8 void firebase::ReferenceCountedFutureImpl::CompleteWithResultInternal<firebase::auth::SignInResult>(firebase::FutureHandle const&, int, char const*, firebase::auth::SignInResult const&) (.cold.1) + 4391017704
27 UnityFramework                 0x1ff9ce8 void firebase::ReferenceCountedFutureImpl::CompleteWithResultInternal<firebase::auth::SignInResult>(firebase::FutureHandle const&, int, char const*, firebase::auth::SignInResult const&) (.cold.1) + 4391017704
28 UnityFramework                 0x1ff9ce8 void firebase::ReferenceCountedFutureImpl::CompleteWithResultInternal<firebase::auth::SignInResult>(firebase::FutureHandle const&, int, char const*, firebase::auth::SignInResult const&) (.cold.1) + 4391017704
29 UnityFramework                 0x1ff9ce8 void firebase::ReferenceCountedFutureImpl::CompleteWithResultInternal<firebase::auth::SignInResult>(firebase::FutureHandle const&, int, char const*, firebase::auth::SignInResult const&) (.cold.1) + 4391017704
30 UnityFramework                 0x1ff9b28 void firebase::ReferenceCountedFutureImpl::CompleteWithResultInternal<firebase::auth::SignInResult>(firebase::FutureHandle const&, int, char const*, firebase::auth::SignInResult const&) (.cold.1) + 4391017256
31 UnityFramework                 0x1747430 void firebase::ReferenceCountedFutureImpl::CompleteWithResultInternal<firebase::auth::SignInResult>(firebase::FutureHandle const&, int, char const*, firebase::auth::SignInResult const&) (.cold.1) + 4381897776
32 UnityFramework                 0x16d9b94 void firebase::ReferenceCountedFutureImpl::CompleteWithResultInternal<firebase::auth::SignInResult>(firebase::FutureHandle const&, int, char const*, firebase::auth::SignInResult const&) (.cold.1) + 4381449108
33 UnityFramework                 0x1238f4 RuntimeInvoker_TrueVoid_t700C6383A2A510C2CF4DD86DABD5CA9FF70ADAC5(void (*)(), MethodInfo const*, void*, void**) + 83256 (Il2CppInvokerTable.cpp:83256)
34 UnityFramework                 0x14b8eec il2cpp::vm::Runtime::Invoke(MethodInfo const*, void*, void**, Il2CppException**) + 576 (Runtime.cpp:576)
35 UnityFramework                 0xd796f4 scripting_method_invoke(ScriptingMethodPtr, ScriptingObjectPtr, ScriptingArguments&, ScriptingExceptionPtr*, bool) + 292 (ScriptingApi_Il2Cpp.cpp:292)
36 UnityFramework                 0xd84edc ScriptingInvocation::Invoke(ScriptingExceptionPtr*, bool) + 273 (ScriptingInvocation.cpp:273)
37 UnityFramework                 0xd93858 MonoBehaviour::InvokeMethodOrCoroutineChecked(ScriptingMethodPtr, ScriptingObjectPtr, ScriptingExceptionPtr*) + 830 (MonoBehaviour.cpp:830)
38 UnityFramework                 0xd93ae8 MonoBehaviour::InvokeMethodOrCoroutineChecked(ScriptingMethodPtr, ScriptingObjectPtr) + 851 (MonoBehaviour.cpp:851)
39 UnityFramework                 0xd94380 MonoBehaviour::DelayedStartCall(Object*, void*) + 456 (MonoBehaviour.cpp:456)
40 UnityFramework                 0xbf96ac DelayedCallManager::Update(int) + 187 (CallDelayed.cpp:187)
41 UnityFramework                 0xca7d00 ExecutePlayerLoop(NativePlayerLoopSystem*) + 383 (PlayerLoop.cpp:383)
42 UnityFramework                 0xca7d40 ExecutePlayerLoop(NativePlayerLoopSystem*) + 407 (PlayerLoop.cpp:407)
43 UnityFramework                 0xca800c PlayerLoop() + 514 (PlayerLoop.cpp:514)
44 UnityFramework                 0x1054510 UnityPlayerLoopImpl(bool) + 332 (LibEntryPoint.mm:332)
45 UnityFramework                 0x18248 -[UnityAppController(Rendering) repaint] + 232 (UnityAppController+Rendering.mm:232)
46 UnityFramework                 0x181b0 -[UnityAppController(Rendering) repaintDisplayLink] + 72 (UnityAppController+Rendering.mm:72)
47 QuartzCore                     0x147b8 <redacted> + 672
48 QuartzCore                     0xf37f4 <redacted> + 280
49 CoreFoundation                 0x7f0e0 __CFMachPortPerform + 176
50 CoreFoundation                 0xa4908 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 60
51 CoreFoundation                 0xa3c88 __CFRunLoopDoSource1 + 596
52 CoreFoundation                 0x9d86c __CFRunLoopRun + 2372
53 CoreFoundation                 0x9c9f4 CFRunLoopRunSpecific + 600
54 GraphicsServices               0x3734 GSEventRunModal + 164
55 UIKitCore                      0xbca75c -[UIApplication _run] + 1072
56 UIKitCore                      0xbcffcc UIApplicationMain + 168
57 UnityFramework                 0x17c80 -[UnityFramework runUIApplicationMainWithArgc:argv:] + 96 (main.mm:96)
58 LollipopLinkMatch              0x7d54 main + 28 (main.mm:28)
59 libdyld.dylib                  0x1cf8 start + 4

yowpark avatar Dec 15 '21 05:12 yowpark

Hey @meichen8050753, sorry you're running into this.

I took a look at the code, and I wanna try one other thing. Crashlytics is known to not play well with abort() crashes.

Can you try another crash? An easy one I like is @[][1] which tries to access the 2nd element of an empty array.

samedson avatar Dec 15 '21 16:12 samedson

Hi @samedson I used @[][1]to crash IOS,the crash log on firlebase like this: image

resymbol the log locally image

meichen8050753 avatar Dec 16 '21 11:12 meichen8050753

Hi @samedson, @paulinon This seems to be a Inevitable bug. Administrators have asked me for so much information. Can anyone deal with this problem now?

meichen8050753 avatar Dec 21 '21 02:12 meichen8050753

Hi, @samedson, @paulinon Someone can answer me if this question is a bug or not ?

meichen8050753 avatar Dec 27 '21 03:12 meichen8050753

Hi, @samedson, @paulinon @PBW99 Two months have passed. Who can answer this question. Thanks.

meichen8050753 avatar Feb 14 '22 02:02 meichen8050753

Hey @meichen8050753 - I think this is a bug. We're looking into it but I need some time to dig in to the details.

samedson avatar Feb 16 '22 21:02 samedson

Thanks @samedson !! I'm a big firebase fan and I'll wait for the perfect solution to this problem.

meichen8050753 avatar Feb 22 '22 08:02 meichen8050753

@samedson @PBW99 @google-oss-bot @paulinon Three months have passed. our new project will be launched soon Is there any progress on this issue. waiting for reply,thx

meichen8050753 avatar Apr 24 '22 07:04 meichen8050753