Closed oddgames-david closed 2 months ago
Thanks for raising. Took a look and doing a dump here to help folks (and also because shared event expired in 90 days):
11 different events, all Android 13 but 3 different device models (Samsung, OnePlus, etc) Symbols seemed to have been uploaded (other than the Android system symbol).
Looks like a LogException
was called in Unity: UnityLogHandlerIntegration_LogException_m23CB511805A3C839541A9868BC1FD148CF9A9E47
which called UnityLogHandlerIntegration_CaptureException_mD5B88C4A6E3FCF9C87C1D9BD062A327E1E7E1DE3
and through out integration got into the Sentry SDK.
Then goes into:
Somehow in there, two frames in, it crashes.
Il2CppGcHandleGetTarget_Invoke_m6FEE8370F30250FA5751017CC620CE73AE0CB35B_inline
il2cpp::gc::GCHandle::GetTarget (GCHandle.cpp:267)
Finally seems to crash here:
Error captured from from Sentry Native 0.6.5
which got into the Android SDK on version 6.25.1. That got into Unity on 1.5.1
@Swatinem should we be looking at C# instead of C++ given all symbols were uploaded?
The problem is rather that we are crashing trying to resolve the C# provided stack trace. In particular, converting the C# object into its underlying C++ object/pointer so that we can call unity internal C++ methods on it. Its possible that a new version of il2cpp works slightly differently and is now incompatible with out hacks.
Something to do with line numbers now apparently being available?
That might be possible. I haven’t looked at this in detail in quite a while.
As a workaround, if this is causing problems for you, you can disable Sentrys own il2cpp line numbers integration, that should avoid running the code that is causing the crash here.
With Unity 2023 the signature for il2cpp_gchandle_get_target
changed from
Il2CppObject* il2cpp_gchandle_get_target(uint32_t gchandle)
to
Il2CppObject* il2cpp_gchandle_get_target(Il2CppGCHandle gchandle)
With typedef void* Il2CppGCHandle;
So we "just" need to get that change reflected somewhere in the #if
in SentryInitialization
.
I managed to get it working locally.
@bitsandfoxes my baby boy, I think this issue might have come back with unity 6. Its crashing exactly the same way, exactly on the same line, and disabling the line thingy makes it not crash anymore
Crashes caused by sentry are extremely frustrating because at a glance you first think that sentry its just trying to report a crash caused by another circumstance, not crashing the app itself
having sentry actually crashing the app is such a curveball, I really would suggest this feature to be disabled by default and marked as experimental @bitsandfoxes
Damn.. thanks @dganzella for pointing that out. We're going to have to update our CI to include Unity 6 at the very least!
Working on it! This has not been forgotten.
Using Sentry 1.5.2 on Android IL2CPP build Unity 2023.1.12f1 I'm getting a few of these reports.
https://odd-games.sentry.io/share/issue/0696247855b64ca9b9b89104b37e9dd5/