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

Allow reporting custom stack traces to Crashlytics. #4706

Closed
barakwei opened this issue Jan 19, 2020 · 1 comment
Closed

Allow reporting custom stack traces to Crashlytics. #4706

barakwei opened this issue Jan 19, 2020 · 1 comment

Comments

@barakwei
Copy link

barakwei commented Jan 19, 2020

[REQUIRED] Step 2: Describe your environment

  • Xcode version: Not relevant
  • Firebase SDK version: Not relevant
  • Firebase Component: Crashlytics
  • Component version: Not relevant

[REQUIRED] Step 3: Describe the problem

The method -[FIRCrashlytics recordCustomExceptionName:reason:frameArray:] is not exposed in the public header file, while it is exposed in the old Crashlytics SDK. We currently use this method in our apps to report when the main thread hangs.

We've realized that when one of the iOS watchdogs kills our app, we have no way of knowing why exactly it happened. Moreover, we don't know how often our apps are killed by the iOS watchdogs, as these are not reported by Crashlytics or Apple. We were mostly concerned with the main thread watchdog, i.e. if the main thread is not responsive for more than x seconds, the app is killed. So if you have a deadlock somewhere in the main thread, you might never know about it, these crashes are probably counted as OOM sessions.

Our solution was to run our own internal watchdog that periodically checks if the main thread ran since the last check, and if not, a stack trace of the main thread is generated. The stack trace is then given to the above mentioned method to be uploaded to Crashlytics.

This has worked very good for us in the last few months, and fixes showed an increase in OOM-free sessions, although these fixes had nothing to do with memory.

We ask to consider making the above mentioned method public again.

Note that we only send the main thread stack. It would be nice to get and report the stack traces of all the threads.

@TKBurner
Copy link

TKBurner commented Jan 21, 2020

This is a very interesting feature request and one we've thought about before. I suspect we will try to improve the ability to report custom stack traces over time, stay tuned! I appreciate the request and will raise it with the team here :)

@firebase firebase locked and limited conversation to collaborators Feb 21, 2020
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

4 participants