Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release notes #223

Merged
merged 7 commits into from
Jun 26, 2024
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Backtrace Unity Release Notes

## Version 3.9.1

Bugfixes
- Fixed potential overflow that can happen during breadcrumb deletion flow (#220)
- Added proguard support for Android uncaught exception captured by the Unity uncaught exception handler (#221)

Improvements
- Native crash reporting binary upgrade - PlCrashReporter upgrade from 1.7.2 to 1.11.2 (#222)
- iOS crash handler: store client attributes in the PlCrashReporter crashData object.
- iOS native attributes: Renaming process.vm.* attributes to vm.*

## Version 3.9.0

Bugfixes
Expand Down
10 changes: 8 additions & 2 deletions Runtime/BacktraceClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ namespace Backtrace.Unity
/// </summary>
public class BacktraceClient : MonoBehaviour, IBacktraceClient
{
public const string VERSION = "3.9.0";
public const string VERSION = "3.9.1";
internal const string DefaultBacktraceGameObjectName = "BacktraceClient";
public BacktraceConfiguration Configuration;

Expand Down Expand Up @@ -1146,8 +1146,14 @@ internal void HandleUnityMessage(string message, string stackTrace, LogType type
Type = type
};
}
var report = new BacktraceReport(exception);
#if UNITY_ANDROID
if(exception.NativeStackTrace && _useProguard) {
report.UseSymbolication("proguard");
}
#endif

SendUnhandledExceptionReport(new BacktraceReport(exception), invokeSkipApi);
SendUnhandledExceptionReport(report, invokeSkipApi);
}

/// <summary>
Expand Down
13 changes: 12 additions & 1 deletion Runtime/Model/BacktraceUnhandledException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,14 @@ public override string StackTrace
/// </summary>
public readonly List<BacktraceStackFrame> StackFrames;

/// <summary>
/// Returns information if the stack trace is from the native environment (non-Unity)
/// </summary>
internal bool NativeStackTrace
{
get;
private set;
}

public BacktraceUnhandledException(string message, string stacktrace) : base(message)
{
Expand Down Expand Up @@ -172,6 +180,8 @@ private BacktraceStackFrame ConvertFrame(string frameString, int methodNameEndIn
FunctionName = frameString
};
}

NativeStackTrace = true;
// add length of the '('
methodStartIndex += 1;
var methodArguments = frameString.Substring(methodStartIndex, methodNameEndIndex - methodStartIndex);
Expand Down Expand Up @@ -250,7 +260,8 @@ private BacktraceStackFrame SetJITStackTraceInformation(string frameString)
{
stackFrame.Library = stackFrame.FunctionName.Substring(0, libraryNameSeparator).Trim();
stackFrame.FunctionName = stackFrame.FunctionName.Substring(++libraryNameSeparator).Trim();
} else
}
else
{
stackFrame.Library = "native";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,11 @@ private long GetNextStartPosition()
int nextLineBytes = NewRow.Length;
while (numberOfFreeBytes < expectedFreedBytes)
{
if (_logSize.Count == 0)
{
return numberOfFreeBytes;
}

numberOfFreeBytes += (_logSize.Dequeue() + nextLineBytes);
}

Expand Down
17 changes: 17 additions & 0 deletions Tests/Runtime/BacktraceStackTraceTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,23 @@ public void TestStackTraceCreation_AndroidException_ValidStackTraceObject()
}
}

[Test]
public void TestNativeStackTraceDetection_AndroidExceptionShouldSetFlag_NativeStackTraceIsSet()
{
var stackTrace = ConvertStackTraceToString(_anrStackTrace);
var exception = new BacktraceUnhandledException(string.Empty, stackTrace);
Assert.IsTrue(exception.NativeStackTrace);
}


[Test]
public void TestNativeStackTraceDetection_UnityExceptionShouldNotSetFlag_NativeStackTraceIsNotSet()
{
var stackTrace = ConvertStackTraceToString(_simpleStack);
var exception = new BacktraceUnhandledException(string.Empty, stackTrace);
Assert.IsFalse(exception.NativeStackTrace);
}


[Test]
public void TestStackTraceCreation_AndroidMixModeCallStack_ValidStackTraceObject()
Expand Down
Binary file modified iOS/libBacktrace-Unity-Cocoa.a
Binary file not shown.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "io.backtrace.unity",
"displayName": "Backtrace",
"version": "3.9.0",
"version": "3.9.1",
"unity": "2017.1",
"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.",
"keywords": [
Expand Down
Loading