I am trying to use the control NSProgressIndicator but I keep finding it crashing on me at random times.
As Keeping it simple as I add a NSProgressIndicator to SubView
aProgress = new NSProgressIndicator(new RectangleF( 140,220,30,130));
aProgress.Style = NSProgressIndicatorStyle.Bar;
aProgress.Indeterminate = true;
this.AddSubview(aProgress);
and when the view set to visible I start the animation.
public override bool Hidden {
get { return base.Hidden; }
set {
base.Hidden = value;
if (value) {
aProgress.StopAnimation(this);
}
else
{
aProgress.StartAnimation(this);
}
}
The result is I view the animation for a while and then boom I get an apple stack trace..whoopee
Process: XXXXXXXXXXXXXXXXXXX [7264]
Path: /Users/USER/*/XXXXXXXXXXXXXXXXXXX.app/Contents/MacOS/XXXXXXXXXXXXXXXXXX
Identifier: XXXXXXXXXXXXXXXXXX
Version: 23.1.1 (5823)
Code Type: X86 (Native)
Parent Process: launchd [138]
Responsible: XXXXXXXXXXXXXXXXXXX [7264]
User ID: 501
Date/Time: 2014-03-13 15:23:00.545 +0100
OS Version: Mac OS X 10.9.2 (13C64)
Report Version: 11
Anonymous UUID: 57E28CAC-8803-8974-F8A7-72423EAB3EDB
Sleep/Wake UUID: 94A08F2A-136C-4A4B-B186-F1E09EAA41E0
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGILL)
Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000001bc3000
VM Regions Near 0x1bc3000:
mapped file 0000000000550000-0000000001bc3000 [ 22.4M] r--/r-x SM=ALI /usr/share/icu/icudt51l.dat
--> VM_ALLOCATE 0000000001bc3000-0000000001bc4000 [ 4K] r--/rwx SM=PRV
VM_ALLOCATE 0000000001bc4000-0000000001bc5000 [ 4K] ---/rwx SM=NUL
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x98324992 kevent64 + 10
1 libdispatch.dylib 0x92eb9cd6 _dispatch_kq_update + 270
2 libdispatch.dylib 0x92eb9bc1 _dispatch_mgr_wakeup + 38
3 libdispatch.dylib 0x92eb9405 _dispatch_wakeup + 34
4 libdispatch.dylib 0x92eb9a48 _dispatch_queue_push_list_slow2 + 43
5 libdispatch.dylib 0x92eb99ea _dispatch_queue_push_slow + 34
6 libdispatch.dylib 0x92eb9465 _dispatch_wakeup + 130
7 libdispatch.dylib 0x92eb9b18 _dispatch_resume_slow + 24
8 libdispatch.dylib 0x92ebb2fb dispatch_after_f + 372
9 libdispatch.dylib 0x92ebb17f dispatch_after + 74
10 com.apple.AppKit 0x980aeed1 __29-[NSPersistentUIManager init]_block_invoke257 + 160
11 com.apple.Foundation 0x9b80a1a1 -[__NSObserver _doit:] + 320
12 com.apple.Foundation 0x9b80a04f __67-[NSNotificationCenter addObserverForName:object:queue:usingBlock:]_block_invoke + 58
13 com.apple.CoreFoundation 0x9a1995a4 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 20
14 com.apple.CoreFoundation 0x9a07b17b _CFXNotificationPost + 3435
15 com.apple.Foundation 0x9b7e921f -[NSNotificationCenter postNotificationName:object:userInfo:] + 92
16 com.apple.Foundation 0x9b8067de -[NSNotificationCenter postNotificationName:object:] + 55
17 com.apple.AppKit 0x978c2ec6 -[NSApplication sendEvent:] + 5515
18 ??? 0x0484f7f8 0 + 75823096
19 ??? 0x074a1e3c 0 + 122297916
20 ??? 0x074a19f8 0 + 122296824
21 ??? 0x040ab68b 0 + 67810955
22 ??? 0x042999d8 0 + 69835224
23 com.apple.AppKit 0x977071fc -[NSApplication run] + 823
24 com.apple.AppKit 0x976f0038 NSApplicationMain + 1165
25 ??? 0x04507053 0 + 72380499
26 ??? 0x04506e78 0 + 72380024
27 ??? 0x01e9dfbc 0 + 32104380
28 ??? 0x01e9e107 0 + 32104711
29 com.XXXXXXXXXXXXXXXXXX 0x0014b87e mono_jit_runtime_invoke + 798 (mini.c:6473)
30 com.XXXXXXXXXXXXXXXXXX 0x001f812e mono_runtime_invoke + 126 (object.c:2827)
31 com.XXXXXXXXXXXXXXXXXX 0x001fc584 mono_runtime_exec_main + 420 (object.c:4052)
32 com.XXXXXXXXXXXXXXXXXX 0x001fc8f5 mono_runtime_run_main + 725 (object.c:3678)
33 com.XXXXXXXXXXXXXXXXXX 0x000ac785 mono_jit_exec + 149 (driver.c:950)
34 com.XXXXXXXXXXXXXXXXXX 0x0005f076 main + 1670
35 com.XXXXXXXXXXXXXXXXXX 0x0005e225 start + 53