StuartsApp.debug quit unexpectedly

Hears the message Im getting.
StuartsApp.debug quit unexpectedly
Click Reopen to open the application again. Click Report to see more detailed information and send a report to Apple.
When I Analyse Project it all looks good.
After 200 runs of the code and much searching and setting breakpoints in the code I have narrowed it down to the MoviePlayer.
The error happens very intermittently (probably 1 in 20 runs) and always on the line: MoviePlayer1.Play even though this line is executed on every run. see code below. The TwentySecondTimer is a .mp4 movie in the project and as the name suggests is 20 seconds long

//Load the Timer clock
MoviePlayer1.Movie = TwentySecondTimer
MoviePlayer1.Play

Any insights would be appreciated

Where is that code ?

Its in the Open event of a window

Crash logs would be more useful than guessing as well.

~/Library/Logs/DiagnosticReports/

THE LOGS ARE VERY LONG TIM - HERES THE FIRST BIT - SHALL I UPLOAD IT ALL?
OK - This is the right LOG - Iv’e got 8 Crash reports (all look the same)

Process: Pop Genius.debug [96958]
Path: /Volumes/VOLUME/*/Pop Genius.debug.app/Contents/MacOS/Pop Genius.debug
Identifier: com.realsoft.popgenius
Version: ??? (1.0.0.0.0)
Code Type: X86 (Native)
Parent Process: ??? [1]
Responsible: Pop Genius.debug [96958]
User ID: 501

Date/Time: 2016-11-13 22:39:46.982 +0000
OS Version: Mac OS X 10.12.1 (16B2657)
Report Version: 12
Anonymous UUID: E4BBE934-C522-2191-C591-47628283BBE9

Sleep/Wake UUID: 93E376A4-B15C-4747-A8CC-3C317A341ABE

Time Awake Since Boot: 490000 seconds
Time Since Wake: 5500 seconds

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 0x0000000000000004
Exception Note: EXC_CORPSE_NOTIFY

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

VM Regions Near 0x4:
–>
__TEXT 0000000000001000-00000000001af000 [ 1720K] r-x/rwx SM=COW /Volumes/VOLUME/*/Pop Genius.debug.app/Contents/MacOS/Pop Genius.debug

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 com.apple.Foundation 0x95d322fa NSKeyValueShareableObservationInfoNSHTHash + 471
1 com.apple.Foundation 0x95d4f122 _NSKeyValueObservationInfoCreateByRemoving + 538
2 com.apple.Foundation 0x95d4ec07 -[NSObject(NSKeyValueObserverRegistration) _removeObserver:forProperty:] + 209
3 com.apple.Foundation 0x95d4ead5 -[NSObject(NSKeyValueObserverRegistration) removeObserver:forKeyPath:] + 148
4 com.apple.Foundation 0x95d61a22 -[NSKeyValueNestedProperty object:didRemoveObservance:recurse:] + 304
5 com.apple.Foundation 0x95d4ecd7 -[NSObject(NSKeyValueObserverRegistration) _removeObserver:forProperty:] + 417
6 com.apple.Foundation 0x95d4ead5 -[NSObject(NSKeyValueObserverRegistration) removeObserver:forKeyPath:] + 148
7 com.apple.Foundation 0x95d61a22 -[NSKeyValueNestedProperty object:didRemoveObservance:recurse:] + 304
8 com.apple.Foundation 0x95d4ecd7 -[NSObject(NSKeyValueObserverRegistration) _removeObserver:forProperty:] + 417
9 com.apple.Foundation 0x95d4ead5 -[NSObject(NSKeyValueObserverRegistration) removeObserver:forKeyPath:] + 148
10 com.apple.AppKit 0x92677144 -[NSAutounbinder removeObserver:forKeyPath:] + 127
11 com.apple.AppKit 0x925d6405 -[NSBinder _updateObservingRegistration:] + 253
12 com.apple.AppKit 0x925d7c73 -[NSBinder breakConnection] + 97
13 com.apple.AppKit 0x925cf027 -[NSObject(NSKeyValueBindingCreation) unbind:] + 203
14 com.apple.AppKit 0x92676fd4 -[NSAutounbinder retainBindingTargetAndUnbind] + 96
15 com.apple.AppKit 0x925be924 -[NSViewController release] + 72
16 com.xojo.XojoFramework 0x002e4f9e 0x2ba000 + 176030
17 libobjc.A.dylib 0x9ee40ae9 objc_object::sidetable_release(bool) + 291
18 libobjc.A.dylib 0x9ee3e359 -[NSObject release] + 19
19 libobjc.A.dylib 0x9ee3d984 (anonymous namespace)::AutoreleasePoolPage::pop(void*) + 688
20 com.apple.CoreFoundation 0x946105b8 _CFAutoreleasePoolPop + 24
21 com.apple.Foundation 0x95d0d917 -[NSAutoreleasePool drain] + 120
22 com.apple.avfoundation 0x9157b0bc __avplayer_fpNotificationCallback_block_invoke + 2491
23 libdispatch.dylib 0x9f66e3ec _dispatch_call_block_and_release + 15
24 libdispatch.dylib 0x9f665a18 _dispatch_client_callout + 50
25 libdispatch.dylib 0x9f67314c _dispatch_main_queue_callback_4CF + 954
26 com.apple.CoreFoundation 0x946904ee CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 14
27 com.apple.CoreFoundation 0x9464fb6f __CFRunLoopRun + 2303
28 com.apple.CoreFoundation 0x9464f00a CFRunLoopRunSpecific + 506
29 com.apple.CoreFoundation 0x9464edfb CFRunLoopRunInMode + 123
30 com.apple.HIToolbox 0x93d525a6 RunCurrentEventLoopInMode + 268
31 com.apple.HIToolbox 0x93d52392 ReceiveNextEventCommon + 494
32 com.apple.HIToolbox 0x93d5218b _BlockUntilNextEventMatchingListInModeWithFilter + 83
33 com.apple.AppKit 0x92579bb3 _DPSNextEvent + 1193
34 com.apple.AppKit 0x92cda663 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1725
35 com.apple.AppKit 0x92cd9f9e -[NSApplication(NSEvent) nextEventMatchingMask:untilDate:inMode:dequeue:] + 132
36 com.xojo.XojoFramework 0x002fc1e6 0x2ba000 + 270822
37 com.xojo.XojoFramework 0x002fc22f 0x2ba000 + 270895
38 com.realsoft.popgenius 0x000c8edc Delegate.Invoke%% + 34
39 com.realsoft.popgenius 0x0003d96d Application._CallFunctionWithExceptionHandling%%op + 248
40 com.xojo.XojoFramework 0x00468b1a 0x2ba000 + 1764122
41 com.xojo.XojoFramework 0x002fc187 0x2ba000 + 270727
42 com.apple.AppKit 0x9256e874 -[NSApplication run] + 943
43 com.xojo.XojoFramework 0x00468bba 0x2ba000 + 1764282
44 com.xojo.XojoFramework 0x00466d94 RuntimeRun + 49
45 com.realsoft.popgenius 0x000a7b45 REALbasic._RuntimeRun + 34
46 com.realsoft.popgenius 0x0019d1a0 _Main + 295
47 com.realsoft.popgenius 0x00170e56 main + 36
48 com.realsoft.popgenius 0x0019e4b5 start + 53

Friendly heads up, your identifier should be your actual domain name (in reverse) co.uk.real-soft.PopGenius

I’m not really an expert on reading crash logs, but this one seems to be related to a key binding observer?
Quite possibly related to your shortcut overriding attempt: https://forum.xojo.com/36482-movieplayer-disable-keys/p1#p298237

Someone else might have more insight on this.

I would greatly appreciate it if you could file a bug report and attach your project (privately, if need be). Bugs like this are annoying to track down and a reproducible case is always helpful.

Try moving your code to the Show event. If necessary, use a flag to have it execute only once.

OK SUBMITTED - 45869

I had a chance to look into this and there’s a bug in the framework that will cause crashes if a MoviePlayer is closed from one of its events.