sentry-unity icon indicating copy to clipboard operation
sentry-unity copied to clipboard

Application crashes on Nintendo Switch at start

Open mora-hugo opened this issue 1 year ago • 0 comments
trafficstars

Environment

How do you use Sentry? Sentry SaaS (sentry.io)

Which version of the SDK? 2.2.2

How did you install the package? (Git-URL, Assetstore) Git URL

Which version of Unity? 2022.3.22f1

Is this happening in Unity (editor) or on a player like Android, iOS, Windows? Nintendo Switch

Steps to Reproduce

I tried integrating the Sentry Unity package into my Unity project. It works well in most cases, but it doesn't work on Nintendo Switch. The application crashes every time it launches on the Switch. A similar issue was supposed to be fixed (#1804), but I'm still experiencing the problem.

We also created a new empty project with the latest version of Sentry, and we're experiencing the same issue.

Expected Result

The game should launch correctly without crashing.

Actual Result

The game crashes every time it launches on Nintendo Switch.

Any logs or screenshots

I have attempted to put this options in my runtime or in my build configuration :


options.CacheDirectoryPath = null;
options.TracesSampleRate = 0.0f;
options.AutoSessionTracking = false;
options.DisableFileWrite = true;

I tried to disable Sentry via the editor window (unchecked the "Enable Sentry" checkbox) but the problem persist.

There is the retrieved crash dump from the Switch.

 	nnSdk.nss!nn::diag::detail::VAbortImpl (0x50E0A1B5E0)	Unknown
 	nnSdk.nss!nn::diag::detail::AbortImpl (0x50E0A1B694)	Unknown
 	nnSdk.nss!nn::fs::CreateDirectory (0x50E0A352C8)	Unknown
 	GameAssembly.nss!LocalFileSystemSwitch::CreateAsDir(FileEntryData& data) Line 611 (0x50D135A528)	C++
 	GameAssembly.nss!CreateDirectory(core::basic_string_ref<char> pathName) Line 240 (0x50D106F3F8)	C++
 	GameAssembly.nss!CreateDirectoryRecursive(core::basic_string_ref<char> pathName) Line 227 (0x50D1075384)	C++
 	GameAssembly.nss!GetPersistentDataPathApplicationSpecific() Line 230 (0x50D0A39AFC)	C++
 	GameAssembly.nss!Application_Get_Custom_PropPersistentDataPath() Line 13306 (0x50D0D8FB5C)	C++
>	GameAssembly.nss!ApplicationAdapter_get_PersistentDataPath_m92572A6540B53DD6839F39A78CA70CEE4D14AEE6(ApplicationAdapter_t0E038AD4E1337C07D9FB164225C2198309883E15* __this, const MethodInfo* method) Line 37546 (0x50D6CD563C)	C++
 	GameAssembly.nss!ScriptableSentryUnityOptions_ToSentryUnityOptions_mB55F70DDF836A8378AB0A04EC58DB64D7206FF38(ScriptableSentryUnityOptions_t42C32DD4F7FE9DCB347EE5EC2E490857B3046700* __this, bool ___0_isBuilding, Il2CppObject* ___1_unityInfo, Il2CppObject* ___2_application, const MethodInfo* method) Line 21922 (0x50D6C9A548)	C++
 	GameAssembly.nss!ScriptableSentryUnityOptions_LoadSentryUnityOptions_m384D6FCE79B3D084F7B5210D97DD7D9BFC7F8522(Il2CppObject* ___0_unityInfo, const MethodInfo* method) Line 21553 (0x50D6C991F0)	C++
 	GameAssembly.nss!SentryInitialization_Init_m8AB1090DE1B27028A913FB4655549B1C2C43B201(const MethodInfo* method) Line 1117 (0x50D5ABB674)	C++
 	GameAssembly.nss!il2cpp::vm::Runtime::InvokeWithThrow(const MethodInfo* method, void* obj, void** params) Line 608 (0x50D06C1628)	C++
 	GameAssembly.nss!il2cpp::vm::Runtime::Invoke(const MethodInfo* method, void* obj, void** params, Il2CppException** exc) Line 594 (0x50D06C1578)	C++
 	GameAssembly.nss!scripting_method_invoke(ScriptingMethodPtr method, ScriptingObjectPtr object, ScriptingArguments& arguments, ScriptingExceptionPtr* exception, bool convertArgs) Line 290 (0x50D128FAC0)	C++
 	GameAssembly.nss!ScriptingInvocation::Invoke(ScriptingExceptionPtr* exception, bool convertArguments) Line 298 (0x50D129973C)	C++
 	GameAssembly.nss!RuntimeInitializeOnLoadManager::Execute(const RuntimeInitializeOnLoadCall& runtimeInitializeOnLoadCall) Line 253 (0x50D0D2A594)	C++
 	GameAssembly.nss!RuntimeInitializeOnLoadManager::ExecuteInitializeOnLoad(RuntimeInitializeLoadType loadType) Line 238 (0x50D0D2A4E0)	C++
 	GameAssembly.nss!CallbackArray::Invoke() Line 331 (0x50D0834E6C)	C++
 	GameAssembly.nss!PlayerInitEngineGraphics(bool batchmode) Line 560 (0x50D0D56740)	C++
 	GameAssembly.nss!nnMain() Line 888 (0x50D134EFD4)	C++

Despite these efforts, the issue persists. For now, I have to completely remove Sentry from my project to prevent the crash. I'm not sure of the exact cause of the problem and would appreciate any assistance.

Also open to test fixes with proper instructions.

mora-hugo avatar Oct 23 '24 23:10 mora-hugo