Earth at night from space

Backtrace Blog

For the latest developments from our engineering team, head over to the Engineering Blog at engineering.backtrace.io.

New Types Of Error Reports And Source Code Integration With Backtrace-Unity 3.3

ANR and Low Memory reporting The backtrace-unity 3.3 release adds new capabilities to support mobile Unity games. Mobile game devs can now detect and report upon hangs and low memory warnings. Why is this important!

New Types Of Error Reports And Source Code Integration With Backtrace-Unity 3.3

ANR AND LOW MEMORY REPORTING

The backtrace-unity 3.3 release adds new capabilities to support mobile Unity games. Mobile game devs can now detect and report upon hangs and low memory warnings. Why is this important?

First of all, one of the toughest challenges game developers face is debugging hangs in their mobile games. Sometimes hangs occur in third party libraries, sometimes it’s related to game code handling events in an incorrect way. With this latest release, Backtrace reports on all hangs on both iOS and Android so you can easily find out which code is responsible for causing those pesky freezes.

But hangs are not the only challenge in the life of a game dev. Memory is a scarce resource on mobile devices. With low memory reporting, you will get a full report on what the state of your application was when that condition occurred. You’ll get an overview of all threads at the time of the warning, as well as information about the scene the player was in, which game objects were present in the hierarchy, and much more. Last but not least you can include custom attributes as well, with information important for your game, allowing you to hone in on memory problems. You might wonder what more is in the works, since this is an early access future. In the next quarter, we aim to add support for adding insights into which events led up to the low memory conditions.

ENABLE ANR AND LOW MEMORY REPORTING

After enabling backtrace-unity for your game, you can use the Backtrace Configuration Panel in the Unity Editor to toggle “Handle ANR” and “Send Out of memory exceptions”.

These options will ensure that the backtrace-unity plugin will capture and submit a dump formatted error after detecting a hang or low memory conditions in the Unity engine or any other private or 3rd party plugins.

VIEWING A HANG OR LOW MEMORY REPORT

Hangs and low memory reports will be identifiable in Backtrace with an error.type of Hang or Low Memory. (Note: error.type is an attribute that you may need to index under Project Settings/Attributes after receiving a new crash). Programmers can use Backtrace’s Debugger to view the report, including a list of the threads running within the process at the time of crash, human readable call stacks for each frame where symbols were made available, system and custom metadata, and more.

FROM EXCEPTION TO SOURCE CODE

In this version of our integration, we also improved the visibility of failing code. By connecting Backtrace to your SCM repository, we can show you instantaneously which line in your source code is responsible for the exception we captured. See here for more information on how to set up source code integration for your project.

TRY IT TODAY!

Backtrace is a Unity VSP (Verified Solution Partner). You can learn more about how we work with Unity and start a free trial at https://backtrace.io/unity/

Subscribe to our newsletter

Stay updated on the latest industry news, technology, events, and all things Backtrace.