Skip to main content

Issue detection: Overview

Beta

This page documents Bugsee Unity SDK 7.x, which is in beta and can change between betas. The stable release is 6.x: see the 6.x documentation. Upgrading? See Migrating from 6.x to 7.x.

Besides the reports your players file and the ones you file from code, Bugsee files reports on its own when it detects a problem in the running game. You turn each detector on or off with a launch option. On Android, DetectAndReportCrashNdk is also off when DetectAndReportCrash is false.

The detectors are those of the native Bugsee SDKs, plus one that the Unity package adds for C# exceptions. This page lists the options the Unity package exposes. For how each detector works, see the native pages: Android issue detection and iOS issue detection.

Crash, early-crash and exit detection and C# exception capture (CaptureManagedExceptions) are on by default. The other detectors are off until you enable them.

Detectors​

DetectorWhat it observesOptionPlatformDefault
CrashesFatal signals and uncaught native exceptions. Reported on the next launch.DetectAndReportCrashAndroid, iOSOn
Native (NDK) crashesCrashes in native code on Android.DetectAndReportCrashNdkAndroidOn
C# exceptionsUnhandled and logged exceptions of your C# code, and unobserved task exceptions.CaptureManagedExceptionsAndroid, iOSOn
Early crashesA launch that ended before the app was running normally.DetectAndReportEarlyCrashAndroid, iOSOn
HangsThe main thread not responding for 3, 5 or 10 seconds.DetectAndReportHangAndroid, iOSOff
ExitsTerminations that no crash handler sees: on Android the reasons of ApplicationExitInfo (ANR, low memory and more), on iOS out-of-memory kills in the foreground and background.DetectAndReportExit and the DetectAndReportExit... reason optionsAndroid, iOSOn
iOS Crash Report ExtensionOn iOS 27 and later, memory-limit kills and, in some setups, the launch watchdog.None: the export adds a target. See Crash Report Extension.iOSAuto
Main-thread misuseBlocking disk, preferences and network work on the main thread.DetectAndReportMainThreadMisuseAndroid, iOSOff
HTTP errorsResponses with a 5xx status.DetectAndReportHttpErrorsAndroid, iOSOff
AnomalySpans of completed performance transactions that take far longer than usual.DetectAndReportAnomalyAndroid, iOSOff
FrustrationRage taps, taps followed by an error, requests that never complete, a frozen UI.DetectFrustrationAndroid, iOSOff

The package does not include the Android memory-leak and thread-leak module.

Enable a detector​

Every detector is a launch option. Typed properties exist on the launch options classes for most of them:

using Bugsee.Contracts.Options;
using BugseeSdk = Bugsee.Bugsee;

#if UNITY_ANDROID
var options = new AndroidLaunchOptions
{
DetectAndReportHang = true,
DetectAndReportHttpErrors = true,
DetectAndReportExitNotResponding = true,
};
BugseeSdk.Launch("<your Android app token>", options);
#elif UNITY_IOS
var options = new IOSLaunchOptions
{
DetectAndReportHang = true,
DetectAndReportHttpErrors = true,
};
BugseeSdk.Launch("<your iOS app token>", options);
#endif

DetectAndReportExit and DetectAndReportMainThreadMisuse are typed properties on AndroidLaunchOptions only. To set them on iOS, use SetCustomOption with the key constant:

using Bugsee.Contracts.Options;

var options = new IOSLaunchOptions();
options.SetCustomOption(Options.DetectAndReportMainThreadMisuse, true);
options.SetCustomOption(Options.DetectAndReportExit, false); // switch iOS exit detection off

See Configuration for every launch option.

Options per detector​

Crashes and exceptions​

The options, signals and handler types are described in Crash & error reporting. CaptureManagedExceptions is independent of DetectAndReportCrash.

Hangs​

OptionPlatformTypeDefaultWhat it does
DetectAndReportHangAndroid, iOSboolfalseReports a stalled main thread as an error.
DetectAndReportHangFairLevelAndroid, iOSint3000Threshold of the lowest severity band, in milliseconds.
DetectAndReportHangMediumLevelAndroid, iOSint5000Threshold of the middle band, in milliseconds.
DetectAndReportHangSevereLevelAndroid, iOSint10000Threshold of the highest band, in milliseconds.
DetectAndReportHangSamplingAndroidbooltrueSamples the main thread's stack during a hang instead of taking one snapshot. Needs DetectAndReportHang.

See Android hangs and iOS hangs.

Exits (Android)​

The master switch DetectAndReportExit (default true) enables the provider. The reason options below are only read while it is on. They are properties of AndroidLaunchOptions:

OptionDefaultWhat it reports
DetectAndReportExitLowMemorytrueLow-memory kills. They are reported as crashes.
DetectAndReportExitNotRespondingtrueANRs (not responding).
DetectAndReportExitNotRespondingAsCrashfalseFiles ANR exits as crashes.
DetectAndReportExitLowMemoryBackgroundAsErrorfalseFiles a low-memory kill of a process that was in the background as an error instead of a crash. Needs DetectAndReportExitLowMemory.
DetectAndReportAnrSamplingtrueSamples the main thread's stack during an ANR. Needs DetectAndReportExitNotResponding.
DetectAndReportExitExcessiveResourceUsagefalseExcessive resource usage.
DetectAndReportExitDependencyDiedfalseDependency died.
DetectAndReportExitUserRequestedfalseUser requested.
DetectAndReportExitUserWasStoppedfalseUser was stopped.
DetectAndReportExitPermissionChangedfalsePermission changed.
DetectAndReportExitPackageUpdatedfalsePackage updated.
DetectAndReportExitPackageStateChangedfalsePackage state changed.
DetectAndReportExitOtherfalseOther.
DetectAndReportExitUnknownfalseUnknown.

The reasons map onto the exit reasons of Android's ApplicationExitInfo. The Android exit detector needs Android 11 (API 30) or later. See Android exits.

Exits (iOS)​

iOS terminates an app that uses too much memory without running any of its code. The SDK infers such terminations across launches and reports them on the next launch. It is on by default, and has no reason options. See iOS exits. On iOS 27 and later, the Crash Report Extension makes these reports more precise.

Other detectors​

OptionPlatformTypeDefaultWhat it does
DetectAndReportMainThreadMisuseAndroid, iOSboolfalseReports blocking work on the main thread.
DetectAndReportHttpErrorsAndroid, iOSboolfalseReports responses with a 5xx status as errors.
DetectAndReportAnomalyAndroid, iOSboolfalseReports performance outliers. It uses performance monitoring: see Performance monitoring.
DetectFrustrationAndroid, iOSboolfalseReports frustration patterns.

See the native pages for each: main-thread misuse, HTTP errors, anomaly and frustration on Android, and main-thread misuse, HTTP errors, anomaly and frustration on iOS.

What the reports look like​

A detector report carries the same context as any other report: the video, console logs and network events recorded before it. Crashes and exits are filed on the next launch and carry the recording of the run that ended. Severity comes from ReportingDefaultCrashPriority and ReportingDefaultErrorPriority: see Bug reporting.

Detector reports reach your report handler like any other report. Check report.Type to change only some of them.

iOS Simulator and debugger

The iOS Simulator build of the SDK has no crash reporter, and no detector files reports there: run on a device. While a debugger is attached, the iOS SDK installs no crash handler and does not track the run for abnormal exits. See iOS issue detection.

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