Skip to content

Commit 4a27123

Browse files
committed
Fix crash in release build
1 parent 3018b15 commit 4a27123

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

package-dev/Runtime/SentryInitialization.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,12 +221,12 @@ private struct Il2CppStackFrameInfo
221221
public int sourceCodeLineNumber;
222222
public int ilOffset;
223223

224-
[MarshalAs(UnmanagedType.LPStr)]
225-
public string filePath;
224+
public IntPtr filePath;
226225
}
227226

228227
private static void Il2CppNativeStackTraceCurrentThreadShim(out IntPtr addresses, out int numFrames, out string? imageUUID, out string? imageName)
229228
{
229+
// Currently there is no obvious way to obtain image UUID and name
230230
var uuidBuffer = IntPtr.Zero;
231231
var imageNameBuffer = IntPtr.Zero;
232232

@@ -240,6 +240,8 @@ private static void Il2CppNativeStackTraceCurrentThreadShim(out IntPtr addresses
240240
try
241241
{
242242
farameInfoPtr = Marshal.AllocHGlobal(Marshal.SizeOf<Il2CppStackFrameInfo>());
243+
244+
// Is it reliable to query current stack trace here?
243245
var res = il2cpp_current_thread_get_frame_at(i, farameInfoPtr);
244246
if(res)
245247
{

0 commit comments

Comments
 (0)