bugsnag / bugsnag-unity

Automatic error reporting for Unity games
https://docs.bugsnag.com/platforms/unity
MIT License
89 stars 31 forks source link

Full stack information not properly capturing for ios. #742

Open rakshithshettycs opened 11 months ago

rakshithshettycs commented 11 months ago

Describe the bug

Issue 1.

When I compare both Android and iOS crash stacktraces, in Android it's captured the exact file and function name, but in iOS it's not captured.For iOS, bugsee does not show the exact script point, which causes the crash. Please check the screenshot.

I implemented code for the app crash check. I added dysm files for iOS and symbol files for Android for full-stack trace.

Attaching screenshots reported in Bugssang for Android and iOS for the same crash

Issue 2:

Even after uploading the symbols and dysm file, the line number is still not showing, which caused the crash. In Android, file name and function name showed in the full stack trace but not line number. In iOS, it is not even showing the file name and function name as mentioned in Issue 1.

Android crash stack trace:

Screenshot 2023-09-28 at 6 10 34 PM

IOS crash stack trace:

Screenshot 2023-09-28 at 5 20 21 PM

Even in Xcode, the stack trace is updated properly. Screenshot from xcode

Screenshot 2023-09-28 at 6 11 43 PM

Steps to reproduce

  1. Go to Unity and create one MonoBehaviour class(CrashData.cs) and add code
    public void CrashAPP()
    {
        while (true) ;
    } 
  2. Attach the created class to the button in the Unity scene and call CrashAPP() on the button-click event. and observe the app crash, and please verify that crash report in the dashboard.

Environment

Example Repo

Example code snippet

using System.Collections; using System.Collections.Generic; using UnityEngine;

public class CrashData : MonoBehaviour { public void ReekkkpeateWhile() { while (true) ; } }

# (Insert code sample to reproduce the problem)
Error messages: ``` EXC_BREAKPOINT • UnityEngine.CoreModule__3.cpp ```
clr182 commented 11 months ago

Hi @rakshithshettyhcl

Apologies about the delay in response time. We are currently investigating this and will let you know once we have more information.

clr182 commented 10 months ago

Hi @rakshithshettyhcl

Apologies about the delay in response time.

As we do not yet have the mechanisms in place to symbolicate IL2CPP framework code this does look like expected behaviour for the iOS exception. We do have an item on our backlog aimed at solving this. I don't have a firm ETA but i'll be sure to update you once we have more information to share. We are still unsure why your dashboard seems to be missing the top most stack frame.

I have created a reproduction example application and unfortunately I have been unable to reproduce the missing first stack trace between the information sent to BugSnag and the XCode debugger terminal. Both my dashboard and XCode terminal result in the same number of stack trace frames.

Additionally, creating an infinite while loop has not reacted in a crash to the application using the code that you have provided. Is this the same code you are using to test on your end or is this a cut down example for the purposes of reproduction? If not then could you please provide us with the example code.

It's possible that this way of crashing the application has resulted in this issue. Any additional context in this would help us to investigate further. I should also ask, are you perhaps performing any manual stacktrace manipulation for events a callback method that may be the cause?