Skip to content

Commit dfe56b1

Browse files
authored
Version 3.3.2 - ANR detection fix (#60)
* Version 3.3.2: ANR detection fix * Syntax fix
1 parent a5c4dc9 commit dfe56b1

File tree

4 files changed

+12
-9
lines changed

4 files changed

+12
-9
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Backtrace Unity Release Notes
22

3+
## Version 3.3.2
4+
- ANR detection algorithm now uses `Time.unscaledTime` instead of `Time.time` to prevent ANR detection when game is paused.
5+
36
## Version 3.3.1
47
- Improved Out-of-memory detection on iOS - Backtrace will report Out-of-memory exceptions when a memory warning occured and the application unexpectly closed. The Out-of-memory watcher will analyse game version, system version, debugger information and even more to determine if application closed by Out-of-memory exception or not.
58
- Backtrace will no longer send low memory warnings reports from Android or iOS. Instead, Backtrace will utilize iOS OOM detection and extend the embedded native report attributes on Android.

Runtime/BacktraceClient.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public class BacktraceClient : MonoBehaviour, IBacktraceClient
2020
{
2121
public BacktraceConfiguration Configuration;
2222

23-
public const string VERSION = "3.3.1";
23+
public const string VERSION = "3.3.2";
2424
public bool Enabled { get; private set; }
2525

2626
/// <summary>
@@ -415,7 +415,7 @@ private void Awake()
415415
/// </summary>
416416
private void Update()
417417
{
418-
_nativeClient?.UpdateClientTime(Time.time);
418+
_nativeClient?.UpdateClientTime(Time.unscaledTime);
419419
}
420420

421421
private void OnDestroy()

Runtime/BacktraceDatabase.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ public void Reload()
139139
//setup database object
140140
DatabaseSettings = new BacktraceDatabaseSettings(DatabasePath, Configuration);
141141
SetupMultisceneSupport();
142-
_lastConnection = Time.time;
143-
LastFrameTime = Time.time;
142+
_lastConnection = Time.unscaledTime;
143+
LastFrameTime = Time.unscaledTime;
144144
//Setup database context
145145
BacktraceDatabaseContext = new BacktraceDatabaseContext(DatabaseSettings);
146146
BacktraceDatabaseFileContext = new BacktraceDatabaseFileContext(DatabaseSettings.DatabasePath, DatabaseSettings.MaxDatabaseSize, DatabaseSettings.MaxRecordCount);
@@ -174,15 +174,15 @@ private void Update()
174174
{
175175
return;
176176
}
177-
LastFrameTime = Time.time;
177+
LastFrameTime = Time.unscaledTime;
178178
if (!DatabaseSettings.AutoSendMode)
179179
{
180180
return;
181181
}
182182

183-
if (Time.time - _lastConnection > DatabaseSettings.RetryInterval)
183+
if (Time.unscaledTime - _lastConnection > DatabaseSettings.RetryInterval)
184184
{
185-
_lastConnection = Time.time;
185+
_lastConnection = Time.unscaledTime;
186186
if (_timerBackgroundWork || !BacktraceDatabaseContext.Any())
187187
{
188188
return;
@@ -206,7 +206,7 @@ private void Start()
206206
RemoveOrphaned();
207207
if (DatabaseSettings.AutoSendMode)
208208
{
209-
_lastConnection = Time.time;
209+
_lastConnection = Time.unscaledTime;
210210
SendData(BacktraceDatabaseContext.FirstOrDefault());
211211
}
212212
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "io.backtrace.unity",
33
"displayName": "Backtrace",
4-
"version": "3.3.1",
4+
"version": "3.3.2",
55
"unity": "2017.1",
66
"description": "Backtrace's integration with Unity games allows customers to capture and report handled and unhandled Unity exceptions to their Backtrace instance, instantly offering the ability to prioritize and debug software errors.",
77
"keywords": [

0 commit comments

Comments
 (0)