Skip to content

Commit 77d459a

Browse files
committed
native client updates - ignore anrs on the debug mode, don't generate oom reports when memory warning occurred + fixed structure calculation
1 parent 53b2b1e commit 77d459a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Runtime/Native/iOS/NativeClient.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ internal struct Entry
4444
private static extern void Start(string plCrashReporterUrl, string[] attributeKeys, string[] attributeValues, int attributesSize, bool enableOomSupport, string[] attachments, int attachmentSize);
4545

4646
[DllImport("__Internal", EntryPoint = "NativeReport")]
47-
private static extern void NativeReport(string message, bool setMainThreadAsFaultingThread);
47+
private static extern void NativeReport(string message, bool setMainThreadAsFaultingThread, bool ignoreIfDebugger);
4848

4949
[DllImport("__Internal", EntryPoint = "Crash")]
5050
private static extern string Crash();
@@ -142,7 +142,7 @@ public void GetAttributes(IDictionary<string, string> result)
142142
}
143143
else
144144
{
145-
address = new IntPtr(pUnmanagedArray.ToInt64() + i + structSize);
145+
address = new IntPtr(pUnmanagedArray.ToInt64() + i * structSize);
146146
}
147147
Entry entry = (Entry)Marshal.PtrToStructure(address, typeof(Entry));
148148
result[entry.Key] = entry.Value;
@@ -182,7 +182,7 @@ public void HandleAnr(string gameObjectName = "", string callbackName = "")
182182
{
183183
// set temporary attribute to "Hang"
184184
SetAttribute("error.type", "Hang");
185-
NativeReport("ANRException: Blocked thread detected.", true);
185+
NativeReport("ANRException: Blocked thread detected.", true, true);
186186
// update error.type attribute in case when crash happen
187187
SetAttribute("error.type", "Crash");
188188
reported = true;

iOS/libBacktrace-Unity-Cocoa.a

9.1 KB
Binary file not shown.

0 commit comments

Comments
 (0)