getsentry / sentry-unity

Development of Sentry SDK for Unity
https://docs.sentry.io/platforms/unity/
MIT License
206 stars 51 forks source link

There is a problem with the Crash stack analysis #1526

Closed WeiLingQiang closed 6 months ago

WeiLingQiang commented 8 months ago

Environment

How do you use Sentry? Sentry SaaS (sentry.io) or self-hosted/on-premise (which version?)

Which version of the SDK? 1.7.1

How did you install the package? (Git-URL, Assetstore) Git-URL, UPM

Which version of Unity? Unity2021.3.26f1

Is this happening in Unity (editor) or on a player like Android, iOS, Windows? iOS

Steps to Reproduce

UnityEngine.Diagnostics.Utils.ForceCrash(ForcedCrashCategory.FatalError);

There is a problem with the Crash stack analysis,Unable to parse the Crash log stack Symbol has been uploaded

Any logs or screenshots

企业微信截图_20231227110913 企业微信截图_20231227110928

bitsandfoxes commented 8 months ago

Thanks for reaching out. I'm checking,

bitsandfoxes commented 8 months ago

I've been trying to reproduce this issue but it's limited to force crash. Are you running into similar issues when causing a crash on the native layer in a different way?

WeiLingQiang commented 8 months ago

I haven't tried different ways to Crash. Can you provide an example?

WeiLingQiang commented 8 months ago

I try to call Throw: Object CThrowCpp All are calling interfaces in demo Why is it collected: WatchDogTermination The olminedog terminated your app, posssiBly BeCAUSE it overused ram. 企业微信截图_17046816327661

bitsandfoxes commented 8 months ago

The demo includes samples and snippets to C/C++ crashes. You can find them in 2_NativeSupport scene.

I expect them to work properly.

The watchdog termination is something specific to the Apple platforms and based on heuristics. We have some documentation here going into more details

WeiLingQiang commented 8 months ago

For WatchDog Terminings, I don’t quite understand, Can I close it so that it can show the Crash Stack normally?

bitsandfoxes commented 8 months ago

The watchdog termination is a different kind of issue. The operating system terminated the app and the SDK makes an educated guess as to why that happened.

WeiLingQiang commented 7 months ago

Excuse me, Whether iOS supports EnableBitCode = NO ? 企业微信截图_17071858896973

bitsandfoxes commented 7 months ago

Bitcode has been deprecated by Apple and can be ignored.

WeiLingQiang commented 7 months ago

Why parside the Crash of iOS is a symbol table generated by BitCode?

企业微信截图_170726016328 企业微信截图_17072603686866

WeiLingQiang commented 7 months ago

If I set up bitcode = no, I can't find the symbol table analysis

bitsandfoxes commented 7 months ago

I'm not sure what it is that is not working for you. The way it is set up right now sentry cli will only upload debug symbols if bitcode = no.

WeiLingQiang commented 6 months ago

I use the sentry-cli command line to upload manually, is it correct?

企业微信截图_17083088921455

WeiLingQiang commented 6 months ago

Test results: Just upload the symbol table as shown in the figure (generated by BitCode) The three symbols generated by non-BitCode are useless

企业微信截图_17083374141176

bitsandfoxes commented 6 months ago

It looks like it is working out for you?

WeiLingQiang commented 6 months ago

Yes,bitcode = yes effective for me,and the bitcode = no cannot analyze the Crash log

WeiLingQiang commented 6 months ago

My problem has not been solved yet,I need to set up bitcode = no, but this has caused it to be unable to analyze the Crash stacktable

WeiLingQiang commented 6 months ago

The screenshot shows that there are uploading symbols, but there is no normal analysis Crash stack

企业微信截图_17085036749134

企业微信截图_17085036936960

bitsandfoxes commented 6 months ago

I have to correct myself. The SDK dropped checking for bitcode in version 1.5.0. The SDK adds a script to the build phase that will automatically upload the relevant symbols for you. Could you provide me with a small repro so I can test what's going on locally?

WeiLingQiang commented 5 months ago

Why is the marking of the symbol table in the red box unusual?

企业微信截图_17108397122565