I Think Sentry Is Crashing My App

I have a macos app written natively in swift. I have attached the stack trace and it looks like the crash is coming from when SentryFileManager calls deleteSession. Pleas let me know if I am not reading this correctly or how I can fix this.

Crashed Thread:        0

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000189fdeba04e8
Exception Note:        EXC_CORPSE_NOTIFY

Termination Signal:    Segmentation fault: 11
Termination Reason:    Namespace SIGNAL, Code 0xb
Terminating Process:   exc handler [19783]

VM Regions Near 0x189fdeba04e8:
    mapped file            0000000132500000-000000013eb4d000 [198.3M] r--/rw- SM=COW  a
--> 
    MALLOC_NANO            0000600000000000-0000600008000000 [128.0M] rw-/rwx SM=ALI  


Thread 0 Crashed:
0   libobjc.A.dylib               	0x00007fff6642581d objc_msgSend + 29
1   com.apple.Foundation          	0x00007fff2fbfd869 -[NSFileManager filesystemItemRemoveOperation:shouldRemoveItemAtPath:] + 74 (NSFileManager.m:4922)
2   com.apple.Foundation          	0x00007fff2fbfd790 __NSRemoveFileConfirmCallback + 148 (NSFileOperations.m:784)
3   libremovefile.dylib           	0x00007fff6760fac6 __removefile_tree_walker + 186 (removefile_tree_walker.c:193)
4   libremovefile.dylib           	0x00007fff6760f995 removefile + 153 (removefile.c:115)
5   com.apple.Foundation          	0x00007fff2fbfd51c -[NSFilesystemItemRemoveOperation main] + 186 (NSFileOperations.m:910)
6   com.apple.Foundation          	0x00007fff2fbe5981 __NSOPERATION_IS_INVOKING_MAIN__ + 17 (NSOperation.m:2184)
7   com.apple.Foundation          	0x00007fff2fbe4bb3 -[NSOperation start] + 722 (NSOperation.m:2201)
8   com.apple.Foundation          	0x00007fff2fbfd36f -[NSFileManager removeItemAtPath:error:] + 84 (NSFileManager.m:4960)
9   org.cocoapods.Sentry          	0x0000000109a9197d -[SentryFileManager deleteSession:] + 191
10  org.cocoapods.Sentry          	0x0000000109a9185f -[SentryFileManager deleteCurrentSession] + 57
11  org.cocoapods.Sentry          	0x0000000109a955de -[SentryHub deleteCurrentSession] + 52
12  org.cocoapods.Sentry          	0x0000000109a95470 -[SentryHub endSessionWithTimestamp:] + 94
13  org.cocoapods.Sentry          	0x0000000109aa4832 -[SentrySessionTracker didBecomeActive] + 569
14  com.apple.CoreFoundation      	0x00007fff2d56080f __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12 (CFNotificationCenter.c:787)
15  com.apple.CoreFoundation      	0x00007fff2d5607a3 ___CFXRegistrationPost1_block_invoke + 63 (CFNotificationCenter.c:175)
16  com.apple.CoreFoundation      	0x00007fff2d560718 _CFXRegistrationPost1 + 372 (CFNotificationCenter.c:198)
17  com.apple.CoreFoundation      	0x00007fff2d560384 ___CFXNotificationPost_block_invoke + 80 (CFNotificationCenter.c:1371)
18  com.apple.CoreFoundation      	0x00007fff2d5304fd -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1554 (CFXNotificationRegistrarOld.m:168)
19  com.apple.CoreFoundation      	0x00007fff2d52f9a9 _CFXNotificationPost + 1351 (CFNotificationCenter.c:1359)
20  com.apple.Foundation          	0x00007fff2fbad786 -[NSNotificationCenter postNotificationName:object:userInfo:] + 59 (NSNotification.m:576)
21  com.apple.AppKit              	0x00007fff2a9b234f -[NSApplication _handleActivatedEvent:] + 1625 (NSApplication.m:5146)
22  com.apple.AppKit              	0x00007fff2a97eebb -[NSApplication(NSEvent) sendEvent:] + 2759 (appEventRouting.m:0)
23  com.apple.AppKit              	0x00007fff2aa16e0f _NXFinishActivation + 143 (packagesWraps.m:502)
24  com.apple.AppKit              	0x00007fff2aa15faf -[NSWindow(NSEventRouting) _handleMouseDownEvent:isDelayedEvent:] + 3313 (winEventRouting.m:795)
25  com.apple.AppKit              	0x00007fff2a980e21 -[NSWindow(NSEventRouting) _reallySendEvent:isDelayedEvent:] + 2612 (winEventRouting.m:1239)
26  com.apple.AppKit              	0x00007fff2a9801c9 -[NSWindow(NSEventRouting) sendEvent:] + 349 (winEventRouting.m:224)
27  com.apple.AppKit              	0x00007fff2a97e554 -[NSApplication(NSEvent) sendEvent:] + 352 (appEventRouting.m:188)
28  com.apple.AppKit              	0x00007fff2a7cb5bf -[NSApplication run] + 707 (NSApplication.m:3332)
29  com.apple.AppKit              	0x00007fff2a79d396 NSApplicationMain + 777 (NSApplication.m:8698)
30  com.FlashCardMax              	0x000000010924c4f9 0x10924a000 + 9465
31  libdyld.dylib                 	0x00007fff675dacc9 start + 1

Hey @maxmy,

Sorry for the late reply. Yes, it seems like SentryFileManager.deleteSession is causing a crash. Can you please give us more context so we can reproduce this? When does this happen? How often? Etc.

Hi Phillip,
I do not know. I got this from dozens of users and quickly removed sentry from my app; however, Sentry has great bug collecting and I would like to use it as soon as this bug is fixed. I have a bunch of crash logs that look just like this and not much more info.