Skip to main content

"App Hanging" event's stack trace seems unrelated to the app hang.


Issue

When I look at the stack trace of an event with title "App Hanging" it looks like its just reporting the stack trace of the first non-Sentry thread in the process. Is this supposed to be the culprit thread?

Applies To

  • Sentry users using the App Hangs integration

  • Sentry users with issues titled: "App Hanging" or "App Hanging for at least 2000ms"

Symptoms

  • The reported stack trace for App Hanging events seems arbitrary.
    ​

Resolution

This can be expected behaviour under certain circumstances.
​

If the main thread is extremely busy with different code spots, the app hang detection might fire a bit too late. If this happens, the SDK may record a stack trace that isn’t 100% related.

You can navigate and filter threads using the threads selector (found just above the Thread's stack trace in the UI):
​


You can read more about this behavior in our docs here: Sentry Docs - App Hangs

Did this answer your question?