Repeating crashes featuring Delegate.Invoke, sheet windows

I’ve got a user who is experiencing multiple crashes per day. I haven’t been able to determine a pattern to the crashes, but I’m having her save the Apple crash reports in the hopes that it would shed some light on what is crashing. There are several basic styles of crash reports; here are the important portions of both:

We’ll call the first one SIGTRAP:

Crashed Thread: 4 Dispatch queue: com.apple.root.default-priority

Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000002, 0x0000000000000000

Application Specific Information:
objc[91111]: garbage collection is OFF

Thread 0:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x9acd9c22 mach_msg_trap + 10
1 libsystem_kernel.dylib 0x9acd91f6 mach_msg + 70
2 com.apple.CoreFoundation 0x9997e9da __CFRunLoopServiceMachPort + 170
3 com.apple.CoreFoundation 0x99987b04 __CFRunLoopRun + 1428
4 com.apple.CoreFoundation 0x999871dc CFRunLoopRunSpecific + 332
5 com.apple.CoreFoundation 0x99987088 CFRunLoopRunInMode + 120
6 com.apple.HIToolbox 0x93bff543 RunCurrentEventLoopInMode + 318
7 com.apple.HIToolbox 0x93c068ab ReceiveNextEventCommon + 381
8 com.apple.HIToolbox 0x93c0671a BlockUntilNextEventMatchingListInMode + 88
9 com.apple.AppKit 0x99e79ee8 _DPSNextEvent + 678
10 com.apple.AppKit 0x99e79752 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 113
11 rbframework.dylib 0x011b7511 0x10be000 + 1021201
12 rbframework.dylib 0x011b7578 0x10be000 + 1021304
13 com.MaverickLabel.MavImprint 0x00020a5e Delegate.Invoke%% + 34
14 com.MaverickLabel.MavImprint 0x000bc26d Application._CallFunctionWithExceptionHandling%%op + 248
15 rbframework.dylib 0x0113da50 0x10be000 + 522832
16 rbframework.dylib 0x011b74a0 0x10be000 + 1021088
17 com.apple.AppKit 0x99e75ac1 -[NSApplication run] + 911
18 rbframework.dylib 0x0113dad7 0x10be000 + 522967
19 rbframework.dylib 0x011108e1 RuntimeRun + 49
20 com.MaverickLabel.MavImprint 0x001ff145 REALbasic._RuntimeRun + 34
21 com.MaverickLabel.MavImprint 0x00003d88 _Main + 257
22 com.MaverickLabel.MavImprint 0x00002630 % main + 36
23 com.MaverickLabel.MavImprint 0x00eb36d0 _start + 116
24 com.MaverickLabel.MavImprint 0x00eb3626 start + 43


And here is the second, named SIGBUS:

Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000004

VM Regions Near 0x4:
–> __PAGEZERO 0000000000000000-0000000000001000 [ 4K] —/--- SM=NUL /Users/USER//MavImprint.app/Contents/MacOS/MavImprint
__TEXT 0000000000001000-0000000000f34000 [ 15.2M] r-x/rwx SM=COW /Users/USER/
/MavImprint.app/Contents/MacOS/MavImprint

Application Specific Information:
objc[90755]: garbage collection is OFF
Performing @selector(menuItemAction:) from sender NSMenuItem 0x1529c10

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 com.apple.CoreFoundation 0x9998811b CFRunLoopAddSource + 59
1 com.apple.DesktopServices 0x955d8569 __NodeContextOpen_block_invoke_0 + 545
2 libdispatch.dylib 0x998f4c27 dispatch_once_f + 50
3 libdispatch.dylib 0x998f4bf0 dispatch_once + 31
4 com.apple.DesktopServices 0x955764c6 NodeContextOpen + 73
5 com.apple.FinderKit 0x941972b6 TFENode::Initialize() + 20
6 com.apple.FinderKit 0x942f480d +[FIFinderViewGutsController initializeCounted] + 62
7 com.apple.FinderKit 0x942fe93c -[FIFinderView _commonFinderViewInit] + 37
8 com.apple.FinderKit 0x942fead8 -[FIFinderView initWithFrame:] + 112
9 com.apple.AppKit 0x9a7a1296 -[NSNavFinderViewFileBrowser initWithFrame:] + 167
10 com.apple.AppKit 0x9a797cb9 _NSNavFileBrowserWithFinderKit + 107
11 com.apple.AppKit 0x9a42a093 -[NSSavePanel(NSSavePanelLayout) _makeFileBrowserView] + 86
12 com.apple.AppKit 0x9a428349 -[NSSavePanel(NSSavePanelLayout) _setupFileBrowserView] + 162
13 com.apple.AppKit 0x9a42a754 -[NSSavePanel(NSSavePanelLayout) _initContentView] + 1502
14 com.apple.AppKit 0x9a42725b -[NSSavePanel initWithContentRect:styleMask:backing:defer:] + 367
15 com.apple.AppKit 0x9a42104c +[NSSavePanel _crunchyRawUnbonedPanel] + 244
16 com.apple.AppKit 0x9a3b9c3a +[NSOpenPanel openPanel] + 33
17 rbframework.dylib 0x011ec60f 0x10be000 + 1238543
18 rbframework.dylib 0x011ec35e 0x10be000 + 1237854
19 rbframework.dylib 0x011ec043 0x10be000 + 1237059
20 rbframework.dylib 0x0117ce16 FolderItemDialogShowModal + 54
21 rbframework.dylib 0x011487b2 RuntimeGetOpenFolderItem + 50
22 com.MaverickLabel.MavImprint 0x001fb211 REALbasic.GetOpenFolderItem%o%s + 90
23 com.MaverickLabel.MavImprint 0x00294aeb App._OpenJobGroup_Action%b%o + 93
24 rbframework.dylib 0x01185808 0x10be000 + 817160
25 rbframework.dylib 0x011b57c0 0x10be000 + 1013696
26 rbframework.dylib 0x011b5b93 0x10be000 + 1014675
27 com.apple.CoreFoundation 0x999e6d11 -[NSObject performSelector:withObject:] + 65
28 com.apple.AppKit 0x99f83663 -[NSApplication sendAction:to:from:] + 232
29 com.apple.AppKit 0x9a076caf -[NSMenuItem _corePerformAction] + 536
30 com.apple.AppKit 0x9a07692c -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:] + 171
31 com.apple.AppKit 0x9a075fb5 -[NSMenu _performActionWithHighlightingForItemAtIndex:sendAccessibilityNotification:] + 79
32 com.apple.AppKit 0x9a351ef7 -[NSMenu performActionForItemAtIndex:] + 65
33 com.apple.AppKit 0x9a351f2a -[NSMenu _internalPerformActionForItemAtIndex:] + 45
34 com.apple.AppKit 0x9a35615b -[NSMenuItem _internalPerformActionThroughMenuIfPossible] + 106
35 com.apple.AppKit 0x9a1bc670 -[NSCarbonMenuImpl _carbonCommandProcessEvent:handlerCallRef:] + 172
36 com.apple.AppKit 0x99fec246 NSSLMMenuEventHandler + 452
37 com.apple.HIToolbox 0x93d89c0c _InvokeEventHandlerUPP(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*, long ()(OpaqueEventHandlerCallRef, OpaqueEventRef*, void*)) + 36
38 com.apple.HIToolbox 0x93c05313 _ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec + 1602
39 com.apple.HIToolbox 0x93c04790 _ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec + 482
40 com.apple.HIToolbox 0x93c19571 SendEventToEventTarget + 76
41 com.apple.HIToolbox 0x93d8a0d0 _ZL18SendHICommandEventmPK9HICommandmmhPKvP20OpaqueEventTargetRefS5_PP14OpaqueEventRef + 482
42 com.apple.HIToolbox 0x93d8a13a SendMenuCommandWithContextAndModifiers + 70
43 com.apple.HIToolbox 0x93df598d SendMenuItemSelectedEvent + 275
44 com.apple.HIToolbox 0x93c55d79 ZL19FinishMenuSelectionP13SelectionDataP10MenuResultS2 + 129
45 com.apple.HIToolbox 0x93de688c _ZL14MenuSelectCoreP8MenuData5PointdmPP13OpaqueMenuRefPt + 608
46 com.apple.HIToolbox 0x93c4da2a _HandleMenuSelection2 + 636
47 com.apple.HIToolbox 0x93c4d7a9 _HandleMenuSelection + 53
48 com.apple.AppKit 0x99ee9bd2 _NSHandleCarbonMenuEvent + 302
49 com.apple.AppKit 0x99e7a4d6 _DPSNextEvent + 2196
50 com.apple.AppKit 0x99e79752 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 113
51 rbframework.dylib 0x011b7511 0x10be000 + 1021201
52 rbframework.dylib 0x011b7578 0x10be000 + 1021304
53 com.MaverickLabel.MavImprint 0x00020a5e Delegate.Invoke%% + 34
54 com.MaverickLabel.MavImprint 0x000bc26d Application._CallFunctionWithExceptionHandling%%op + 248
55 rbframework.dylib 0x0113da50 0x10be000 + 522832
56 rbframework.dylib 0x011b74a0 0x10be000 + 1021088
57 com.apple.AppKit 0x99e75ac1 -[NSApplication run] + 911
58 rbframework.dylib 0x0113dad7 0x10be000 + 522967
59 rbframework.dylib 0x011108e1 RuntimeRun + 49
60 com.MaverickLabel.MavImprint 0x001ff145 REALbasic._RuntimeRun + 34
61 com.MaverickLabel.MavImprint 0x00003d88 _Main + 257
62 com.MaverickLabel.MavImprint 0x00002630 % main + 36
63 com.MaverickLabel.MavImprint 0x00eb36d0 _start + 116
64 com.MaverickLabel.MavImprint 0x00eb3626 start + 43


Does anybody have any idea what is going on here? Thanks in advance.

This user also has persistent crashing whenever a sheet window is displayed. I had to eliminate them altogether. The crashes happen no matter where the sheet window is coming from (a window I designed, a framework window like the Folderitem dialogs, or the Print/Page Setup dialogs). Here is a crash report, apparently triggered by the Page Setup dialog:

Crashed Thread: 3 Dispatch queue: com.apple.root.default-priority

Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000002, 0x0000000000000000

Application Specific Information:
objc[67736]: garbage collection is OFF
Performing @selector(menuItemAction:) from sender NSMenuItem 0x2a4dea0

Thread 0:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x9acd9c22 mach_msg_trap + 10
1 libsystem_kernel.dylib 0x9acd91f6 mach_msg + 70
2 com.apple.CoreFoundation 0x9997e9da __CFRunLoopServiceMachPort + 170
3 com.apple.CoreFoundation 0x99987b04 __CFRunLoopRun + 1428
4 com.apple.CoreFoundation 0x999871dc CFRunLoopRunSpecific + 332
5 com.apple.CoreFoundation 0x99987088 CFRunLoopRunInMode + 120
6 com.apple.HIToolbox 0x93bff543 RunCurrentEventLoopInMode + 318
7 com.apple.HIToolbox 0x93c068ab ReceiveNextEventCommon + 381
8 com.apple.HIToolbox 0x93c0671a BlockUntilNextEventMatchingListInMode + 88
9 com.apple.AppKit 0x99e79ee8 _DPSNextEvent + 678
10 com.apple.AppKit 0x99e79752 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 113
11 rbframework.dylib 0x011bce91 0x10bd000 + 1048209
12 rbframework.dylib 0x011e5b5b 0x10bd000 + 1215323
13 rbframework.dylib 0x011e5edf 0x10bd000 + 1216223
14 rbframework.dylib 0x0118d1cd RuntimeOpenPrinterDialog + 253
15 com.MaverickLabel.MavImprint 0x001fc438 REALbasic.OpenPrinterDialog%o%oo + 109
16 com.MaverickLabel.MavImprint 0x00913dc2 ProofReport.PrintReport%b%oooo + 1421
17 com.MaverickLabel.MavImprint 0x00720b7b ProofWindow.ProofWindow._Print_Action%b%o<ProofWindow.ProofWindow> + 878
18 rbframework.dylib 0x0118a378 0x10bd000 + 840568
19 rbframework.dylib 0x011bae60 0x10bd000 + 1039968
20 rbframework.dylib 0x011bb203 0x10bd000 + 1040899
21 com.apple.CoreFoundation 0x999e6d11 -[NSObject performSelector:withObject:] + 65
22 com.apple.AppKit 0x99f83663 -[NSApplication sendAction:to:from:] + 232
23 com.apple.AppKit 0x9a076caf -[NSMenuItem _corePerformAction] + 536
24 com.apple.AppKit 0x9a07692c -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:] + 171
25 com.apple.AppKit 0x9a075fb5 -[NSMenu _performActionWithHighlightingForItemAtIndex:sendAccessibilityNotification:] + 79
26 com.apple.AppKit 0x9a075f61 -[NSMenu _performActionWithHighlightingForItemAtIndex:] + 48
27 com.apple.AppKit 0x99fefe77 -[NSMenu performKeyEquivalent:] + 306
28 com.apple.AppKit 0x99fee8e6 -[NSApplication _handleKeyEquivalent:] + 594
29 com.apple.AppKit 0x99ee434f -[NSApplication sendEvent:] + 5772
30 rbframework.dylib 0x011bcd64 0x10bd000 + 1047908
31 rbframework.dylib 0x011bcdb0 0x10bd000 + 1047984
32 com.MaverickLabel.MavImprint 0x00020a5e Delegate.Invoke%% + 34
33 com.MaverickLabel.MavImprint 0x000bbeab Application._CallFunctionWithExceptionHandling%%op + 248
34 rbframework.dylib 0x01140684 0x10bd000 + 538244
35 rbframework.dylib 0x011bccd5 0x10bd000 + 1047765
36 com.apple.AppKit 0x99e75b21 -[NSApplication run] + 1007
37 rbframework.dylib 0x01140707 0x10bd000 + 538375
38 rbframework.dylib 0x01111dd2 RuntimeRun + 50
39 com.MaverickLabel.MavImprint 0x001fea44 REALbasic._RuntimeRun + 34
40 com.MaverickLabel.MavImprint 0x00003d88 _Main + 257
41 com.MaverickLabel.MavImprint 0x00002630 % main + 36
42 com.MaverickLabel.MavImprint 0x00eb17c0 _start + 116
43 com.MaverickLabel.MavImprint 0x00eb1716 start + 43

This user is running 10.7.5 on a Mac Mini. The application is compiled using Xojo 2014 v4.1.

You should file a bug report with the complete crash reports attached.

Joe, although I will do that, I hesitate because I can’t provide reliable steps to reproduce it. I can’t even be sure if the crashes are related, especially the sheet window ones. I know from experience that bug reports consisting of “it crashed, here’s the crash report” don’t get results.

OK, I’ve filed it. I surveyed my crash reports and discovered three categories: crashes from sheet windows; crashes from Folderitem dialogs (apparently via ShowModal and not ShowModalWithin, so they’re not classified as sheet window crashes); and generic crashes that appear to be happening independent of any user-triggered event.

The bug report is here:

feedback://showreport?report_id=32116