Skip to main content

Hangs (7.x Beta)

7.x Beta

APIs and defaults may still change before the 7.0 stable release.

The hang detector watches for situations where the main thread becomes unresponsive long enough to degrade the user experience, but the OS has not yet raised an ANR. When a hang is detected, Bugsee captures a stack trace of the main thread alongside the usual video / logs / network context and produces an issue report.

Internally, the detector schedules a 1 s tick on a background thread; each tick posts a ping to the main thread's Looper. If a ping isn't acknowledged within the configured threshold, a hang at the matching severity is reported.

Configuration

FormSetting
Manifest meta-data<meta-data android:name="com.bugsee.option.detect.hang" android:value="true" />
Bugsee.launch() mapoptions.put(Options.DetectAndReportHang, true)
Defaultfalse
<meta-data android:name="com.bugsee.option.detect.hang"
android:value="true" />
tip

Hang detection is disabled by default. Enable it on internal / beta builds first to tune the thresholds against your app's real-world main-thread behavior before rolling out to production.

Severity thresholds

Hangs are graded into three severity bands. Each band has its own configurable threshold (in milliseconds); a hang is reported at the highest band whose threshold has been crossed.

SeverityDefault thresholdOption constantManifest key
Fair3 000 msOptions.DetectAndReportHangFairLevelcom.bugsee.option.detect.hang.level.fair
Medium5 000 msOptions.DetectAndReportHangMediumLevelcom.bugsee.option.detect.hang.level.medium
Severe10 000 msOptions.DetectAndReportHangSevereLevelcom.bugsee.option.detect.hang.level.severe

The three thresholds must satisfy Fair < Medium < Severe and all three must be positive. An out-of-order trio reverts the entire set to defaults (the SDK doesn't try to repair partial overrides).

Reports are deduplicated per call-site hash, so a single stuck call site doesn't flood Bugsee with reports during a long-running hang.

See also

Found an issue, typo, or wrong statement on this page? Report it now →