Can anyone shed light on OSX crash report?

This report… any clues as to what the cause is? I have to go a long way down before I see anything ‘my code’ related.
Its an app built with 2013 r3 running on El Capitan

System Integrity Protection: enabled

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

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

VM Regions Near 0x4c:
–>
__TEXT 0000000000001000-0000000000dab000 [ 13.7M] r-x/rwx SM=COW /Users/USER/Desktop/MacStitchStd.app/Contents/MacOS/MacStitch

Application Specific Information:
Performing @selector(menuItemAction:) from sender NSMenuItem 0x119ddc0

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 rbframework.dylib 0x00fc4d90 0xf08000 + 773520
1 rbframework.dylib 0x00ffcbeb 0xf08000 + 1002475
2 com.apple.Foundation 0x931668a2 __57-[NSNotificationCenter addObserver:selector:name:object:]_block_invoke_2 + 50
3 com.apple.CoreFoundation 0x9980f5a4 CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER + 20
4 com.apple.CoreFoundation 0x9980f52b ___CFXRegistrationPost_block_invoke + 75
5 com.apple.CoreFoundation 0x9980f49c _CFXRegistrationPost + 460
6 com.apple.CoreFoundation 0x9980f1d6 ___CFXNotificationPost_block_invoke + 54
7 com.apple.CoreFoundation 0x997c8b53 -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1715
8 com.apple.CoreFoundation 0x997c7d72 _CFXNotificationPost + 626
9 com.apple.Foundation 0x93118954 -[NSNotificationCenter postNotificationName:object:userInfo:] + 92
10 com.apple.Foundation 0x93126e50 -[NSNotificationCenter postNotificationName:object:] + 56
11 com.apple.AppKit 0x97f5fc65 -[NSWindow _setFrameCommon:display:stashSize:] + 3223
12 com.apple.AppKit 0x97f5efc3 -[NSWindow _setFrame:display:allowImplicitAnimation:stashSize:] + 217
13 com.apple.AppKit 0x97f5eee5 -[NSWindow setFrame:display:] + 79
14 com.apple.AppKit 0x981d7d47 -[_NSWindowFullScreenTransition setTransitionedWindowFrame:] + 150
15 com.apple.AppKit 0x988837ab -[_NSWindowFullScreenTransition exitFullScreenTransitionForWindow:options:] + 1180
16 com.apple.AppKit 0x9870c01f -[NSWindow _doFullScreenCleanupForOrderOut] + 208
17 com.apple.AppKit 0x97fd68df -[NSWindow _reallyDoOrderWindow:relativeTo:findKey:forCounter:force:isModal:] + 3785
18 com.apple.AppKit 0x97fd5a0e -[NSWindow _doOrderWindowWithoutAnimation:relativeTo:findKey:forCounter:force:isModal:] + 81
19 com.apple.AppKit 0x97fd4812 -[NSWindow _doOrderWindow:relativeTo:findKey:forCounter:force:isModal:] + 909

Are you running in full screen mode ?

But that’s usually where the problem lies.

Fair dos…

21 com.apple.AppKit 0x9805ee20 -[NSWindow orderOut:] + 49
22 com.apple.AppKit 0x981598f3 __18-[NSWindow _close]_block_invoke + 602
23 com.apple.AppKit 0x98159650 -[NSWindow _close] + 385
24 com.apple.AppKit 0x981594c7 -[NSWindow close] + 33
25 rbframework.dylib 0x00ffc4f5 0xf08000 + 1000693
26 rbframework.dylib 0x01000cf3 0xf08000 + 1019123
27 rbframework.dylib 0x00fee7f4 0xf08000 + 944116
28 rbframework.dylib 0x00fee7c1 0xf08000 + 944065
29 rbframework.dylib 0x00fc3d6c 0xf08000 + 769388
30 rbframework.dylib 0x00fc51b8 0xf08000 + 774584
31 rbframework.dylib 0x00fa16f2 0xf08000 + 628466
32 rbframework.dylib 0x00fef409 0xf08000 + 947209
33 rbframework.dylib 0x00feff88 0xf08000 + 950152
34 rbframework.dylib 0x00fa15e2 0xf08000 + 628194
35 rbframework.dylib 0x00fa1730 0xf08000 + 628528
36 rbframework.dylib 0x00fa1713 RB_ApplicationQuit + 19
37 com.ursasoftware.macstitch 0x0021e0a2 REALbasic.Quit%%i4 + 34
38 com.ursasoftware.macstitch 0x00aa4199 MacStitch._FileQuit_Action%b%o + 77
39 rbframework.dylib 0x00fd5288 0xf08000 + 840328
40 rbframework.dylib 0x01005ce0 0xf08000 + 1039584
41 rbframework.dylib 0x01006083 0xf08000 + 1040515
42 libobjc.A.dylib 0x9a8579e4 -[NSObject performSelector:withObject:] + 70
43 com.apple.AppKit 0x9810a556 __36-[NSApplication sendAction:to:from:]_block_invoke + 51
44 libsystem_trace.dylib 0x9b71a3c9 _os_activity_initiate + 85

I have a theory that it may be a permissions issue on the machine.
In File Quit I write preferences to file.

Looks more like quitting from full screen mode but that’s just a guess

is that a ‘thing’?

is what a ‘thing’ ?

I had exactly that error too at some point, but I don’t remember how I solved.

I think the issue was, that I did something asynchronously or lengthy (time-wise) in the close event and then somehow the “File” menu item during that stayed blue while the app was quitting. In the end I moved the code from Close to CancelClose (to the Return False branch).

‘dont quit the app while it is in full screen mode because it may crash’ ?

It was a reported thing with El Capitan
The reason I ask is these frames in the crash log
15 is “exit full screen transition”

14 com.apple.AppKit 0x981d7d47 -[_NSWindowFullScreenTransition setTransitionedWindowFrame:] + 150
15 com.apple.AppKit 0x988837ab -[_NSWindowFullScreenTransition exitFullScreenTransitionForWindow:options:] + 1180
16 com.apple.AppKit 0x9870c01f -[NSWindow _doFullScreenCleanupForOrderOut] + 208

I know this was reported during beta’s but I’m not sure what the current status is
Hence my question about was this quitting from full screen

interesting. Havent heard anything of this in the non-beta forum.

i’ll pass that along.
Should we try to exit full screen in code before closing?

Good question since [quote=229352:@Norman Palardy]I’m not sure what the current status is[/quote]

Wasn’t this the bug in 2015r2 and lower where the app crashed at exit when using fullscreen in the Captain?

Yes.

It was also reported during beta for R3 / R3.1

OK…
So in CancelClose I added

[code] if me.FullScreen then
MsgBox “I was in fullscreen”
me.fullscreen= false
else
MsgBox “I was not in fullscreen”

end if[/code]

even when the window is fullscreen, me.fullscreen is ‘false’
This could be tricky…

Theres no ‘maximised’ property either. Hmm

Easy to create one that you set true in the Maximize event and false in Resized.

Nice!

[quote=229442:@Jeff Tullin]even when the window is fullscreen, me.fullscreen is ‘false’
This could be tricky…[/quote]
Put this code in a module

Function isFullScreen(extends w as window) As boolean #If TargetCocoa then Const NSFullScreenWindowMask = 16384 declare function mStyleMask lib "AppKit" selector "styleMask" ( ref as integer ) as integer Return Bitwise.BitAnd( mstyleMask( w.handle ), NSFullScreenWindowMask ) = NSFullScreenWindowMask #EndIf End Function