Understanding Crash and Exception Reporting
Crash and Exception reporting captures problem data and displays it in the Cloud Diagnostics > Crash and Exception Reporting section of the Unity Cloud Dashboard.
Crash and exception reports show the native stack trace of a crashed thread. If the crash is caused by an uncaught managed exception, the reports also show the managed stack trace of where the exception originates from, along with the native stack trace.
The types of problems Crash and Exception Reporting captures include:
- Native crashes: A native crash report captures the stack trace and other metadata when your app stops responding. In most cases, this is due to a failure in the native (typically C++) layer of the application.
- Managed exceptions: A managed exception report captures stack trace and other metadata when your app stops responding due to an unhandled exception in the managed (typically C#) layer of the application.
Crash and Exception Reporting aggregates the individual reports of an issue into a Problem report. You can view how often these crashes and exceptions happen from the Occurrence view in the Dashboard.
To view crash and exception reports, open the Dashboard from either the Cloud Diagnostics panel in the Unity Editor or sign in to the Unity Dashboard from a browser window.
To access crash and exception reports from the Editor:
- Open your project in the Unity Editor.
- From the menu bar, select Window > General > Services.
- From the Services window, select Cloud Diagnostics.
- On the Cloud Diagnostics panel, select Go to Dashboard.
- From the main navigation menu, select DevOps > Cloud Diagnostics > Crash and Exception Reporting.
To access crash and exception reports from the Dashboard:
- Sign in to the Unity Dashboard from your browser.
- Specify the project connected to Cloud Diagnostics from the project selector on the top navigation menu.
- After specifying the project, from the main navigation menu go to Cloud Diagnostics > Crash and Exception reports.
Understanding the Crash and Exception reports page
The Crash and Exception Reporting page consists of three main parts:
- Overview and filters
- Occurrences graph
- Problems list
Overview and filters
At the top of the Crash and Exception Reporting page, view an overview of reports and filtering options.
The reports tally at the top of the page indicates how many reports have been generated in the last day and the report usage for your account. If you require a higher report limit, upgrade to Unity Pro or Plus or reach out to Support. Within this overview gain quick insights with the Total native crashes, Impacted users, and Total exceptions counts.
Filter your reports to focus on specific types of issues. The results of the filters you select are displayed in the Occurrences graph and Problems list. Use the Add filter drop-down menu to choose from a set of preselected filters and then apply a function and value.
To apply a filter:
- Select the Add filter button.
- Select the filter type. If the filter requires a function and value, a second drop-down opens.
- If applicable, specify the function (equals or does not equal) and value to apply to the filter.
- Select Apply to apply your filters.
To remove a filter, select the x beside the filter type.
The Occurrences graph displays an issue count over time. Filter on predefined periods of time, from 12 hours to 7 days (for Cloud Diagnostics) or 90 days (for Advanced Cloud Diagnostics). To specify a date range, select the report period drop-down and select a time or date range to display.
From the Occurrences graph, you may also choose to delete reports. This is helpful if the reported issues are fixed and you no longer need to view them on the Dashboard.
The Problems list displays a list of Problem reports sorted by total number of reports by type. To view report details, select a report name.
Understanding Problem report details
To view the details of a specific Problem report, select a report from the Problems list. This will open the Problem details page, which displays the granular details for the selected report.
The top section of the Problem report details page displays a summary of the selected report, including the ID, issue message, type, and impacted users.
The mid section of the Problem report details page displays aggregate data of the occurrences over time and affected operating systems, app versions, and device models.
The bottom section displays individual problem reports, including the title of the problem report and the date and time the selected crash or exception report occurred.
The tabs at the bottom of the Problem report details page include:
- Stack trace: Contains the stack trace for the specific report of the problem that you’re viewing. A stack trace can help you determine the location in your code at which the problem occured.
- Metadata: Contains device-specific metadata for the device on which the problem occured. This is also where you can view custom metadata that you may have defined in your code. To set custom metadata, use the CrashReportHandler.SetUserMetadata method.
- Logs: Contains log messages that you output using the Log methods in the Debug class. Log messages include the type of message, the date and time, the occurrence frame, and the message. The default number of log messages captured is 10. You can configure this to capture 0 to 50 messages using the CrashReportHandler.logBufferSize method.
Download data for a specific problem report in JSON format. To download the report, select the JSON button at the bottom of the Problem details page.
Now that you have set up and understand Crash and Exception Reporting, learn how to add debugging symbols to further identify issues.