From 61f4749ee43dca635bc073a0d98983b82ec8bdd7 Mon Sep 17 00:00:00 2001 From: bitsandfoxes Date: Wed, 6 Jul 2022 12:23:47 +0200 Subject: [PATCH 1/7] stricter version restriction --- package-dev/Runtime/SentryInitialization.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package-dev/Runtime/SentryInitialization.cs b/package-dev/Runtime/SentryInitialization.cs index 4429339ed..2c38f0e1f 100644 --- a/package-dev/Runtime/SentryInitialization.cs +++ b/package-dev/Runtime/SentryInitialization.cs @@ -11,7 +11,7 @@ #endif using System; -#if UNITY_2020_3_OR_NEWER +#if UNITY_2020_3_36_OR_NEWER using System.Buffers; using System.Runtime.InteropServices; #endif @@ -108,12 +108,12 @@ public string Platform private Il2CppMethods _il2CppMethods // Lowest supported version to have all required methods below -#if !ENABLE_IL2CPP || !UNITY_2020_3_OR_NEWER +#if !ENABLE_IL2CPP || !UNITY_2020_3_36_OR_NEWER ; #else = new Il2CppMethods( il2cpp_gchandle_get_target, -#if UNITY_2021_3_OR_NEWER +#if UNITY_2021_3_5_OR_NEWER il2cpp_native_stack_trace, #else Il2CppNativeStackTraceShim, @@ -130,7 +130,7 @@ private Il2CppMethods _il2CppMethods [DllImport("__Internal")] private static extern void il2cpp_free(IntPtr ptr); -#if UNITY_2021_3_OR_NEWER +#if UNITY_2021_3_5_OR_NEWER #pragma warning disable 8632 // Definition from Unity `2021.3` (and later): // void il2cpp_native_stack_trace(const Il2CppException * ex, uintptr_t** addresses, int* numFrames, char** imageUUID, char** imageName) From aa0be70f582b8a0721ae763d8e6c9619c40ce9a8 Mon Sep 17 00:00:00 2001 From: bitsandfoxes Date: Wed, 6 Jul 2022 14:14:12 +0200 Subject: [PATCH 2/7] only on 64 --- package-dev/Runtime/SentryInitialization.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package-dev/Runtime/SentryInitialization.cs b/package-dev/Runtime/SentryInitialization.cs index 2c38f0e1f..79259ff16 100644 --- a/package-dev/Runtime/SentryInitialization.cs +++ b/package-dev/Runtime/SentryInitialization.cs @@ -11,7 +11,7 @@ #endif using System; -#if UNITY_2020_3_36_OR_NEWER +#if UNITY_2020_3_OR_NEWER using System.Buffers; using System.Runtime.InteropServices; #endif @@ -108,12 +108,12 @@ public string Platform private Il2CppMethods _il2CppMethods // Lowest supported version to have all required methods below -#if !ENABLE_IL2CPP || !UNITY_2020_3_36_OR_NEWER +#if !ENABLE_IL2CPP || !UNITY_2020_3_OR_NEWER || !UNITY_64 ; #else = new Il2CppMethods( il2cpp_gchandle_get_target, -#if UNITY_2021_3_5_OR_NEWER +#if UNITY_2021_5_OR_NEWER il2cpp_native_stack_trace, #else Il2CppNativeStackTraceShim, @@ -130,7 +130,7 @@ private Il2CppMethods _il2CppMethods [DllImport("__Internal")] private static extern void il2cpp_free(IntPtr ptr); -#if UNITY_2021_3_5_OR_NEWER +#if UNITY_2021_3_OR_NEWER #pragma warning disable 8632 // Definition from Unity `2021.3` (and later): // void il2cpp_native_stack_trace(const Il2CppException * ex, uintptr_t** addresses, int* numFrames, char** imageUUID, char** imageName) From be673a8d24cd574fbb15380a4d575ddc6e4b0dcd Mon Sep 17 00:00:00 2001 From: bitsandfoxes Date: Wed, 6 Jul 2022 14:27:25 +0200 Subject: [PATCH 3/7] updated CHANGELOG.md --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c7c74721..42a8c2af3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## Unreleased + +- Fixed linker issues for x86 IL2CPP builds on 2020.3 and newer ([#871](https://github.com/getsentry/sentry-unity/pull/871)) + ## 0.20.0 ### Features From 4166cdbc88cf94fb46fa5fad6da3775709634024 Mon Sep 17 00:00:00 2001 From: bitsandfoxes Date: Wed, 6 Jul 2022 14:31:40 +0200 Subject: [PATCH 4/7] fixed version --- package-dev/Runtime/SentryInitialization.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package-dev/Runtime/SentryInitialization.cs b/package-dev/Runtime/SentryInitialization.cs index 79259ff16..f49e36c27 100644 --- a/package-dev/Runtime/SentryInitialization.cs +++ b/package-dev/Runtime/SentryInitialization.cs @@ -113,7 +113,7 @@ private Il2CppMethods _il2CppMethods #else = new Il2CppMethods( il2cpp_gchandle_get_target, -#if UNITY_2021_5_OR_NEWER +#if UNITY_2021_3_OR_NEWER il2cpp_native_stack_trace, #else Il2CppNativeStackTraceShim, From 1a9ef9ea0eede271d19ae540b92e046737424f21 Mon Sep 17 00:00:00 2001 From: bitsandfoxes Date: Wed, 6 Jul 2022 15:44:53 +0200 Subject: [PATCH 5/7] added 64 guard to sentry native --- package-dev/Runtime/SentryInitialization.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-dev/Runtime/SentryInitialization.cs b/package-dev/Runtime/SentryInitialization.cs index f49e36c27..524d2620a 100644 --- a/package-dev/Runtime/SentryInitialization.cs +++ b/package-dev/Runtime/SentryInitialization.cs @@ -3,7 +3,7 @@ #define SENTRY_NATIVE_COCOA #elif UNITY_ANDROID #define SENTRY_NATIVE_ANDROID -#elif UNITY_STANDALONE_WIN || UNITY_STANDALONE_LINUX +#elif UNITY_64 && (UNITY_STANDALONE_WIN || UNITY_STANDALONE_LINUX) #define SENTRY_NATIVE #elif UNITY_WEBGL #define SENTRY_WEBGL @@ -108,7 +108,7 @@ public string Platform private Il2CppMethods _il2CppMethods // Lowest supported version to have all required methods below -#if !ENABLE_IL2CPP || !UNITY_2020_3_OR_NEWER || !UNITY_64 +#if !ENABLE_IL2CPP || !UNITY_2020_3_OR_NEWER ; #else = new Il2CppMethods( @@ -125,7 +125,7 @@ private Il2CppMethods _il2CppMethods [DllImport("__Internal")] private static extern IntPtr il2cpp_gchandle_get_target(int gchandle); - // Available in Unity `2019.4.34f1` (and later) + // Available in Unity `2019.4.34f1` (and later)f // void il2cpp_free(void* ptr) [DllImport("__Internal")] private static extern void il2cpp_free(IntPtr ptr); From 98d7dd451f9f35921c31a52359b8918a20acc17c Mon Sep 17 00:00:00 2001 From: bitsandfoxes Date: Wed, 6 Jul 2022 15:56:41 +0200 Subject: [PATCH 6/7] final form --- package-dev/Runtime/SentryInitialization.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package-dev/Runtime/SentryInitialization.cs b/package-dev/Runtime/SentryInitialization.cs index 524d2620a..31f359a65 100644 --- a/package-dev/Runtime/SentryInitialization.cs +++ b/package-dev/Runtime/SentryInitialization.cs @@ -108,7 +108,7 @@ public string Platform private Il2CppMethods _il2CppMethods // Lowest supported version to have all required methods below -#if !ENABLE_IL2CPP || !UNITY_2020_3_OR_NEWER +#if !ENABLE_IL2CPP || !UNITY_2020_3_OR_NEWER || !UNITY_64 ; #else = new Il2CppMethods( @@ -125,7 +125,7 @@ private Il2CppMethods _il2CppMethods [DllImport("__Internal")] private static extern IntPtr il2cpp_gchandle_get_target(int gchandle); - // Available in Unity `2019.4.34f1` (and later)f + // Available in Unity `2019.4.34f1` (and later) // void il2cpp_free(void* ptr) [DllImport("__Internal")] private static extern void il2cpp_free(IntPtr ptr); From d48c53cf530524f21a99de156014a715df38af43 Mon Sep 17 00:00:00 2001 From: bitsandfoxes Date: Wed, 6 Jul 2022 16:15:14 +0200 Subject: [PATCH 7/7] updated CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 42a8c2af3..a9be3b606 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ ## Unreleased -- Fixed linker issues for x86 IL2CPP builds on 2020.3 and newer ([#871](https://github.com/getsentry/sentry-unity/pull/871)) +- Explicitly disable Windows x86 native-error tracking and IL2CPP processing integration ([#871](https://github.com/getsentry/sentry-unity/pull/871)) ## 0.20.0