I have written a PDF reader. It renders one page at a time. Using a swipe gesture the user can switch to the next page. If I keep switching pages fast enough (really, really fast) I get the error below. I tried to debug I do not get an exception in Monotouch.
Can somebody read sensible information from the stacktrace?
Stacktrace:
at (wrapper managed-to-native) MonoTouch.UIKit.UIApplication.UIApplicationMain (int,string[],intptr,intptr) <0x00004>
at (wrapper managed-to-native) MonoTouch.UIKit.UIApplication.UIApplicationMain (int,string[],intptr,intptr) <0x00004>
at MonoTouch.UIKit.UIApplication.Main (string[],string,string) [0x00038] in /Users/plasma/Source/iphone-3/monotouch/UIKit/UIApplication.cs:26
at MonoTouch.UIKit.UIApplication.Main (string[]) [0x00000] in /Users/plasma/Source/iphone-3/monotouch/UIKit/UIApplication.cs:31
at testBrowser.Application.Main (string[]) [0x00000] in /Users/itest/Documents/Develop/testBrowser/testBrowser/Main.cs:14
at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object (object,intptr,intptr,intptr) <IL 0x0001d, 0x00043>
Native stacktrace:
0 testBrowser 0x000be9db mono_handle_native_sigsegv + 343
1 testBrowser 0x0000e7a6 mono_sigsegv_signal_handler + 313
2 libSystem.B.dylib 0x9118c46b _sigtramp + 43
3 ??? 0xffffffff 0x0 + 4294967295
4 QuartzCore 0x03035232 CABackingStoreCopyRenderImage + 64
5 QuartzCore 0x03035060 _ZN2CA6Render17copy_render_valueEPKvPFP12CGColorSpacevE + 212
6 QuartzCore 0x0303326d -[CALayer(CALayerPrivate) _copyRenderLayer:layerFlags:commitFlags:] + 434
7 QuartzCore 0x030330b4 CALayerCopyRenderLayer + 55
8 QuartzCore 0x030311d2 _ZN2CA7Context12commit_layerEP8_CALayerjjPv + 122
9 QuartzCore 0x030310e1 CALayerCommitIfNeeded + 323
10 QuartzCore 0x03031069 CALayerCommitIfNeeded + 203
11 QuartzCore 0x03031069 CALayerCommitIfNeeded + 203
12 QuartzCore 0x0301f7b9 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 1395
13 QuartzCore 0x0301f0d0 _ZN2CA11Transaction6commitEv + 292
14 QuartzCore 0x0304f7d5 _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 99
15 CoreFoundation 0x00dfafbb __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 27
16 CoreFoundation 0x00d900e7 __CFRunLoopDoObservers + 295
17 CoreFoundation 0x00d58bd7 __CFRunLoopRun + 1575
18 CoreFoundation 0x00d58240 CFRunLoopRunSpecific + 208
19 CoreFoundation 0x00d58161 CFRunLoopRunInMode + 97
20 GraphicsServices 0x03eb8268 GSEventRunModal + 217
21 GraphicsServices 0x03eb832d GSEventRun + 115
22 UIKit 0x01bf242e UIApplicationMain + 1160
23 ??? 0x09d31c41 0x0 + 164830273
24 ??? 0x09d31b7a 0x0 + 164830074
25 ??? 0x09d3157d 0x0 + 164828541
26 ??? 0x09d314b9 0x0 + 164828345
27 ??? 0x09d31514 0x0 + 164828436
28 testBrowser 0x0000e56a mono_jit_runtime_invoke + 1360
29 testBrowser 0x001c961b mono_runtime_invoke + 137
30 testBrowser 0x001cb2d7 mono_runtime_exec_main + 714
31 testBrowser 0x001cabfd mono_runtime_run_main + 812
32 testBrowser 0x00095354 mono_jit_exec + 200
33 testBrowser 0x0027d299 main + 3494
34 testBrowser 0x00003009 _start + 208
35 testBrowser 0x00002f38 start + 40
Debug info from gdb:
warning: .o file "/Developer/MonoTouch/SDKs/MonoTouch.iphonesimulator.sdk/usr/lib/libmonotouch.a(monotouch-glue.x86.o)" more recent than executable timestamp in "/Users/itest/Library/Application Support/iPhone Simulator/4.2/Applications/08D29A1D-AB54-49CC-9C55-FE763BB6BC37/testBrowser.app/testBrowser"
warning: Could not open OSO file /Developer/MonoTouch/SDKs/MonoTouch.iphonesimulator.sdk/usr/lib/libmonotouch.a(monotouch-glue.x86.o) to scan for pubtypes for objfile /Users/itest/Library/Application Support/iPhone Simulator/4.2/Applications/08D29A1D-AB54-49CC-9C55-FE763BB6BC37/testBrowser.app/testBrowser
warning: .o file "/Developer/MonoTouch/SDKs/MonoTouch.iphonesimulator.sdk/usr/lib/libmonotouch.a(monotouch-x86.double-abi-stret-trampoline.o)" more recent than executable timestamp in "/Users/itest/Library/Application Support/iPhone Simulator/4.2/Applications/08D29A1D-AB54-49CC-9C55-FE763BB6BC37/testBrowser.app/testBrowser"
warning: Could not open OSO file /Developer/MonoTouch/SDKs/MonoTouch.iphonesimulator.sdk/usr/lib/libmonotouch.a(monotouch-x86.double-abi-stret-trampoline.o) to scan for pubtypes for objfile /Users/itest/Library/Application Support/iPhone Simulator/4.2/Applications/08D29A1D-AB54-49CC-9C55-FE763BB6BC37/testBrowser.app/testBrowser
warning: .o file "/Developer/MonoTouch/SDKs/MonoTouch.iphonesimulator.sdk/usr/lib/libmonotouch.a(gc.x86.o)" more recent than executable timestamp in "/Users/itest/Library/Application Support/iPhone Simulator/4.2/Applications/08D29A1D-AB54-49CC-9C55-FE763BB6BC37/testBrowser.app/testBrowser"
warning: Could not open OSO file /Developer/MonoTouch/SDKs/MonoTouch.iphonesimulator.sdk/usr/lib/libmonotouch.a(gc.x86.o) to scan for pubtypes for objfile /Users/itest/Library/Application Support/iPhone Simulator/4.2/Applications/08D29A1D-AB54-49CC-9C55-FE763BB6BC37/testBrowser.app/testBrowser
warning: .o file "/Developer/MonoTouch/SDKs/MonoTouch.iphonesimulator.sdk/usr/lib/libmonotouch.a(zlib-helper.x86.o)" more recent than executable timestamp in "/Users/itest/Library/Application Support/iPhone Simulator/4.2/Applications/08D29A1D-AB54-49CC-9C55-FE763BB6BC37/testBrowser.app/testBrowser"
warning: Could not open OSO file /Developer/MonoTouch/SDKs/MonoTouch.iphonesimulator.sdk/usr/lib/libmonotouch.a(zlib-helper.x86.o) to scan for pubtypes for objfile /Users/itest/Library/Application Support/iPhone Simulator/4.2/Applications/08D29A1D-AB54-49CC-9C55-FE763BB6BC37/testBrowser.app/testBrowser
warning: Could not find object file "/var/folders/Ny/NyElTwhDGD8kZMqIEeLGXE+++TI/-Tmp-//ccvRqNHg.o" - no debug information available for "template.m".
warning: .o file "/Developer/usr/lib/gcc/i686-apple-darwin10/4.2.1/libgcc.a(_divdi3.o)" more recent than executable timestamp in "/Users/itest/Library/Application Support/iPhone Simulator/4.2/Applications/08D29A1D-AB54-49CC-9C55-FE763BB6BC37/testBrowser.app/testBrowser"
warning: Could not open OSO file /Developer/usr/lib/gcc/i686-apple-darwin10/4.2.1/libgcc.a(_divdi3.o) to scan for pubtypes for objfile /Users/itest/Library/Application Support/iPhone Simulator/4.2/Applications/08D29A1D-AB54-49CC-9C55-FE763BB6BC37/testBrowser.app/testBrowser
warning: .o file "/Developer/usr/lib/gcc/i686-apple-darwin10/4.2.1/libgcc.a(_moddi3.o)" more recent than executable timestamp in "/Users/itest/Library/Application Support/iPhone Simulator/4.2/Applications/08D29A1D-AB54-49CC-9C55-FE763BB6BC37/testBrowser.app/testBrowser"
warning: Could not open OSO file /Developer/usr/lib/gcc/i686-apple-darwin10/4.2.1/libgcc.a(_moddi3.o) to scan for pubtypes for objfile /Users/itest/Library/Application Support/iPhone Simulator/4.2/Applications/08D29A1D-AB54-49CC-9C55-FE763BB6BC37/testBrowser.app/testBrowser
warning: .o file "/Developer/usr/lib/gcc/i686-apple-darwin10/4.2.1/libgcc.a(_udivdi3.o)" more recent than executable timestamp in "/Users/itest/Library/Application Support/iPhone Simulator/4.2/Applications/08D29A1D-AB54-49CC-9C55-FE763BB6BC37/testBrowser.app/testBrowser"
warning: Could not open OSO file /Developer/usr/lib/gcc/i686-apple-darwin10/4.2.1/libgcc.a(_udivdi3.o) to scan for pubtypes for objfile /Users/itest/Library/Application Support/iPhone Simulator/4.2/Applications/08D29A1D-AB54-49CC-9C55-FE763BB6BC37/testBrowser.app/testBrowser
warning: .o file "/Developer/usr/lib/gcc/i686-apple-darwin10/4.2.1/libgcc.a(_umoddi3.o)" more recent than executable timestamp in "/Users/itest/Library/Application Support/iPhone Simulator/4.2/Applications/08D29A1D-AB54-49CC-9C55-FE763BB6BC37/testBrowser.app/testBrowser"
warning: Could not open OSO file /Developer/usr/lib/gcc/i686-apple-darwin10/4.2.1/libgcc.a(_umoddi3.o) to scan for pubtypes for objfile /Users/itest/Library/Application Support/iPhone Simulator/4.2/Applications/08D29A1D-AB54-49CC-9C55-FE763BB6BC37/testBrowser.app/testBrowser
warning: .o file "/Developer/MonoTouch/SDKs/MonoTouch.iphonesimulator.sdk/usr/lib/libmonotouch.a(monotouch-glue.x86.o)" more recent than executable timestamp in "/Users/itest/Library/Application Support/iPhone Simulator/4.2/Applications/08D29A1D-AB54-49CC-9C55-FE763BB6BC37/testBrowser.app/testBrowser"
warning: Couldn't open object file '/Developer/MonoTouch/SDKs/MonoTouch.iphonesimulator.sdk/usr/lib/libmonotouch.a(monotouch-glue.x86.o)'
Attaching to process 17837.
Reading symbols for shared libraries . done
Reading symbols for shared libraries ........................................................................................................................... done
0x91131459 in read$UNIX2003 ()
15 0x9114ba12 in __workq_kernreturn ()
14 0x9114ba12 in __workq_kernreturn ()
13 0x911540a6 in __semwait_signal ()
12 "com.apple.CFSocket.private" 0x911450c6 in select$DARWIN_EXTSN ()
11 0x911260fa in mach_msg_trap ()
10 0x911540a6 in __semwait_signal ()
9 0x911540a6 in __semwait_signal ()
8 0x911b9a7e in poll$UNIX2003 ()
7 0x911540a6 in __semwait_signal ()
6 "WebThread" 0x911260fa in mach_msg_trap ()
5 0x911540a6 in __semwait_signal ()
4 0x91126136 in semaphore_wait_trap ()
3 0x911260fa in mach_msg_trap ()
2 "com.apple.libdispatch-manager" 0x9114c982 in kevent ()
* 1 "com.apple.main-thread" 0x91131459 in read$UNIX2003 ()
Thread 15 (process 17837):
#0 0x9114ba12 in __workq_kernreturn ()
#1 0x9114bfa8 in _pthread_wqthread ()
#2 0x9114bbc6 in start_wqthread ()
Thread 14 (process 17837):
#0 0x9114ba12 in __workq_kernreturn ()
#1 0x9114bfa8 in _pthread_wqthread ()
#2 0x9114bbc6 in start_wqthread ()
Thread 13 (process 17837):
#0 0x911540a6 in __semwait_signal ()
#1 0x91153d62 in _pthread_cond_wait ()
#2 0x911559f8 in pthread_cond_wait$UNIX2003 ()
#3 0x0022d0bc in _wapi_handle_timedwait_signal_handle (handle=0x101, timeout=0x0, alertable=1, poll=0) at ../../../../mono/io-layer/handles.c:1614
#4 0x0022ce70 in _wapi_handle_wait_signal_handle (handle=0x101, alertable=1) at ../../../../mono/io-layer/handles.c:1557
#5 0x00242a6e in WaitForSingleObjectEx (handle=0x101, timeout=4294967295, alertable=1) at ../../../../mono/io-layer/wait.c:205
#6 0x00201f39 in async_invoke_thread (data=0x0) at ../../../../mono/metadata/threadpool.c:1485
#7 0x00203836 in start_wrapper (data=0xda7eaa0) at ../../../../mono/metadata/threads.c:661
#8 0x00244c76 in thread_start_routine (args=0x706c680) at ../../../../mono/io-layer/wthreads.c:286
#9 0x002746eb in GC_start_routine (arg=0xa20aea0) at ../../../libgc/pthread_support.c:1390
#10 0x9115385d in _pthread_start ()
#11 0x911536e2 in thread_start ()
Thread 12 (process 17837):
#0 0x911450c6 in select$DARWIN_EXTSN ()
#1 0x00d8ccbc in __CFSocketManager ()
#2 0x9115385d in _pthread_start ()
#3 0x911536e2 in thread_start ()
Thread 11 (process 17837):
#0 0x911260fa in mach_msg_trap ()
#1 0x91126867 in mach_msg ()
#2 0x00dfb4a6 in __CFRunLoopServiceMachPort ()
#3 0x00d58874 in __CFRunLoopRun ()
#4 0x00d58240 in CFRunLoopRunSpecific ()
#5 0x00d58161 in CFRunLoopRunInMode ()
#6 0x01378162 in +[NSURLConnection(NSURLConnectionReallyInternal) _resourceLoadLoop:] ()
#7 0x01342d4c in -[NSThread main] ()
#8 0x01342cd8 in __NSThread__main__ ()
#9 0x9115385d in _pthread_start ()
#10 0x911536e2 in thread_start ()
Thread 10 (process 17837):
#0 0x911540a6 in __semwait_signal ()
#1 0x91153d62 in _pthread_cond_wait ()
#2 0x911559f8 in pthread_cond_wait$UNIX2003 ()
#3 0x0022d0bc in _wapi_handle_timedwait_signal_handle (handle=0x10f, timeout=0x0, alertable=1, poll=0) at ../../../../mono/io-layer/handles.c:1614
#4 0x0022ce70 in _wapi_handle_wait_signal_handle (handle=0x10f, alertable=1) at ../../../../mono/io-layer/handles.c:1557
#5 0x00242a6e in WaitForSingleObjectEx (handle=0x10f, timeout=4294967295, alertable=1) at ../../../../mono/io-layer/wait.c:205
#6 0x001fee14 in async_invoke_io_thread (data=0x0) at ../../../../mono/metadata/threadpool.c:369
#7 0x00203836 in start_wrapper (data=0xda38170) at ../../../../mono/metadata/threads.c:661
#8 0x00244c76 in thread_start_routine (args=0x706c604) at ../../../../mono/io-layer/wthreads.c:286
#9 0x002746eb in GC_start_routine (arg=0xa20aea0) at ../../../libgc/pthread_support.c:1390
#10 0x9115385d in _pthread_start ()
#11 0x911536e2 in thread_start ()
Thread 9 (process 17837):
#0 0x911540a6 in __semwait_signal ()
#1 0x91153d62 in _pthread_cond_wait ()
#2 0x911559f8 in pthread_cond_wait$UNIX2003 ()
#3 0x0022d0bc in _wapi_handle_timedwait_signal_handle (handle=0x10f, timeout=0x0, alertable=1, poll=0) at ../../../../mono/io-layer/handles.c:1614
#4 0x0022ce70 in _wapi_handle_wait_signal_handle (handle=0x10f, alertable=1) at ../../../../mono/io-layer/handles.c:1557
#5 0x00242a6e in WaitForSingleObjectEx (handle=0x10f, timeout=4294967295, alertable=1) at ../../../../mono/io-layer/wait.c:205
#6 0x001fee14 in async_invoke_io_thread (data=0x0) at ../../../../mono/metadata/threadpool.c:369
#7 0x00203836 in start_wrapper (data=0xd9305b0) at ../../../../mono/metadata/threads.c:661
#8 0x00244c76 in thread_start_routine (args=0x706c490) at ../../../../mono/io-layer/wthreads.c:286
#9 0x002746eb in GC_start_routine (arg=0xa20af60) at ../../../libgc/pthread_support.c:1390
#10 0x9115385d in _pthread_start ()
#11 0x911536e2 in thread_start ()
Thread 8 (process 17837):
#0 0x911b9a7e in poll$UNIX2003 ()
#1 0x00250781 in mono_poll (ufds=0x716c000, nfds=2, timeout=-1) at ../../../../mono/utils/mono-poll.c:8
#2 0x001ff1cd in socket_io_poll_main (p=0x35db20) at ../../../../mono/metadata/threadpool.c:495
#3 0x00203836 in start_wrapper (data=0xd9305b0) at ../../../../mono/metadata/threads.c:661
#4 0x00244c76 in thread_start_routine (args=0x706c414) at ../../../../mono/io-layer/wthreads.c:286
#5 0x002746eb in GC_start_routine (arg=0xa20af60) at ../../../libgc/pthread_support.c:1390
#6 0x9115385d in _pthread_start ()
#7 0x911536e2 in thread_start ()
Thread 7 (process 17837):
#0 0x911540a6 in __semwait_signal ()
#1 0x91153d62 in _pthread_cond_wait ()
#2 0x911559f8 in pthread_cond_wait$UNIX2003 ()
#3 0x0022d0bc in _wapi_handle_timedwait_signal_handle (handle=0x101, timeout=0x0, alertable=1, poll=0) at ../../../../mono/io-layer/handles.c:1614
#4 0x0022ce70 in _wapi_handle_wait_signal_handle (handle=0x101, alertable=1) at ../../../../mono/io-layer/handles.c:1557
#5 0x00242a6e in WaitForSingleObjectEx (handle=0x101, timeout=4294967295, alertable=1) at ../../../../mono/io-layer/wait.c:205
#6 0x00201f39 in async_invoke_thread (data=0x0) at ../../../../mono/metadata/threadpool.c:1485
#7 0x00203836 in start_wrapper (data=0xd917340) at ../../../../mono/metadata/threads.c:661
#8 0x00244c76 in thread_start_routine (args=0x706c2a0) at ../../../../mono/io-layer/wthreads.c:286
#9 0x002746eb in GC_start_routine (arg=0xa20af60) at ../../../libgc/pthread_support.c:1390
#10 0x9115385d in _pthread_start ()
#11 0x911536e2 in thread_start ()
Thread 6 (process 17837):
#0 0x911260fa in mach_msg_trap ()
#1 0x91126867 in mach_msg ()
#2 0x00dfb4a6 in __CFRunLoopServiceMachPort ()
#3 0x00d58874 in __CFRunLoopRun ()
#4 0x00d58240 in CFRunLoopRunSpecific ()
#5 0x00d58161 in CFRunLoopRunInMode ()
#6 0x04f7e423 in RunWebThread ()
#7 0x9115385d in _pthread_start ()
#8 0x911536e2 in thread_start ()
Thread 5 (process 17837):
#0 0x911540a6 in __semwait_signal ()
#1 0x9117fee5 in nanosleep$UNIX2003 ()
#2 0x9117fe23 in usleep$UNIX2003 ()
#3 0x002774e0 in monotouch_pump_gc ()
#4 0x9115385d in _pthread_start ()
#5 0x911536e2 in thread_start ()
Thread 4 (process 17837):
#0 0x91126136 in semaphore_wait_trap ()
#1 0x0015b189 in finalizer_thread (unused=0x0) at ../../../../mono/metadata/gc.c:1026
#2 0x00203836 in start_wrapper (data=0x6e33210) at ../../../../mono/metadata/threads.c:661
#3 0x00244c76 in thread_start_routine (args=0x706c034) at ../../../../mono/io-layer/wthreads.c:286
#4 0x002746eb in GC_start_routine (arg=0x6ff8f60) at ../../../libgc/pthread_support.c:1390
#5 0x9115385d in _pthread_start ()
#6 0x911536e2 in thread_start ()
Thread 3 (process 17837):
#0 0x911260fa in mach_msg_trap ()
#1 0x91126867 in mach_msg ()
#2 0x0011cfb2 in mach_exception_thread (arg=0x0) at ../../../../mono/mini/mini-darwin.c:138
#3 0x9115385d in _pthread_start ()
#4 0x911536e2 in thread_start ()
Thread 2 (process 17837):
#0 0x9114c982 in kevent ()
#1 0x9114d09c in _dispatch_mgr_invoke ()
#2 0x9114c559 in _dispatch_queue_invoke ()
#3 0x9114c2fe in _dispatch_worker_thread2 ()
#4 0x9114bd81 in _pthread_wqthread ()
#5 0x9114bbc6 in start_wqthread ()
Thread 1 (process 17837):
#0 0x91131459 in read$UNIX2003 ()
#1 0x000beb8b in mono_handle_native_sigsegv (signal=11, ctx=0xbfffb560) at ../../../../mono/mini/mini-exceptions.c:1826
#2 0x0000e7a6 in mono_sigsegv_signal_handler (_dummy=11, info=0xbfffb520, context=0xbfffb560) at ../../../../mono/mini/mini.c:4846
#3 <signal handler called>
#4 0x03035274 in CA::Render::Shmem::copy_image ()
#5 0x03035232 in CABackingStoreCopyRenderImage ()
#6 0x03035060 in CA::Render::copy_render_value ()
#7 0x0303326d in -[CALayer(CALayerPrivate) _copyRenderLayer:layerFlags:commitFlags:] ()
#8 0x030330b4 in CALayerCopyRenderLayer ()
#9 0x030311d2 in CA::Context::commit_layer ()
#10 0x030310e1 in CALayerCommitIfNeeded ()
#11 0x03031069 in CALayerCommitIfNeeded ()
#12 0x03031069 in CALayerCommitIfNeeded ()
#13 0x0301f7b9 in CA::Context::commit_transaction ()
#14 0x0301f0d0 in CA::Transaction::commit ()
#15 0x0304f7d5 in CA::Transaction::observer_callback ()
#16 0x00dfafbb in __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ ()
#17 0x00d900e7 in __CFRunLoopDoObservers ()
#18 0x00d58bd7 in __CFRunLoopRun ()
#19 0x00d58240 in CFRunLoopRunSpecific ()
#20 0x00d58161 in CFRunLoopRunInMode ()
#21 0x03eb8268 in GSEventRunModal ()
#22 0x03eb832d in GSEventRun ()
#23 0x01bf242e in UIApplicationMain ()
#24 0x09d31c41 in ?? ()
#25 0x09d31b7a in ?? ()
#26 0x09d3157d in ?? ()
#27 0x09d314b9 in ?? ()
#28 0x09d31514 in ?? ()
#29 0x0000e56a in mono_jit_runtime_invoke (method=0x80a83f4, obj=0x0, params=0xbfffed1c, exc=0x0) at ../../../../mono/mini/mini.c:4733
#30 0x001c961b in mono_runtime_invoke (method=0x80a83f4, obj=0x0, params=0xbfffed1c, exc=0x0) at ../../../../mono/metadata/object.c:2615
#31 0x001cb2d7 in mono_runtime_exec_main (method=0x80a83f4, args=0x9faec00, exc=0x0) at ../../../../mono/metadata/object.c:3581
#32 0x001cabfd in mono_runtime_run_main (method=0x80a83f4, argc=0, argv=0xbfffee54, exc=0x0) at ../../../../mono/metadata/object.c:3355
#33 0x00095354 in mono_jit_exec (domain=0x6f91e58, assembly=0x9b4b480, argc=1, argv=0xbfffee50) at ../../../../mono/mini/driver.c:1094
#34 0x0027d299 in main ()
=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================
Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object
at (wrapper managed-to-native) MonoTouch.UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
at MonoTouch.UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00038] in /Users/plasma/Source/iphone-3/monotouch/UIKit/UIApplication.cs:26
It looks like you've allowed a backing store to get collected before iOS is done with it. More specifically an image or a layer.
Related
stack trace of the thread show nothing except __nanosleep_nocancel from the core dump'ed using gdb on Debian. This is been observed when analyzing the threads stack trace from the coredump generated by the kernel which is triggered from the application when anomaly found
Thread 5 (Thread 0x7f8b307bf700 (LWP 27000)):
#0 ......Application function .....
#1......Application function .....
#2 ......Application function .....
#3 ......Application function .....
#4 0x00007f8b303c9494 in start_thread () from /lib/x86_64-linux- gnu/libpthread.so.0
#5 0x00007f8b2f666aff in __libc_ifunc_impl_list () from /lib/x86_64-linux-gnu/libc.so.6
#6 0x0000000000000000 in ?? ()
Thread 3 (Thread 0x7f8b30685700 (LWP 27025)):
#0 0x00007f8b303d27dd in __nanosleep_nocancel () from /lib/x86_64-linux-gnu/libpthread.so.0
#1 0x0000000000000000 in ?? ()
Thread 2 (Thread 0x7f8b2eb31700 (LWP 27032)):
#0 0x00007f8b303d27dd in __nanosleep_nocancel () from /lib/x86_64-linux-gnu/libpthread.so.0
#1 0x0000000000000000 in ?? ()
Thread 1 (Thread 0x7f8b306c3700 (LWP 27022)):
#0 0x00007f8b303d2f9f in raise () from /lib/x86_64-linux- gnu/libpthread.so.0
Here thread 2 and 3's stack trace showing __nanosleep_nocancel , where I expect stack trace be like thread 5.
any leads on this would be greatly appreciated.
I'm debugging a OpenCV app compiled with C++11 (I use OpenCV 2.4.10). The app has two threads that do some image processing on the CPU (no GPU functions used but I also included libopencv_gpu.so in the linked libraries).
Using gdb I noticed that instead of just two threads (the main process thread and another thread created by the main process thread) I found 3 threads running:
(gdb) info threads
Id Target Id Frame
78 Thread 0x7fffe2ff5700 (LWP 20531) "app_name" 0x00007ffff5bb2f3d in nanosleep () at ../sysdeps/unix/syscall-template.S:81
2 Thread 0x7fffe3c42700 (LWP 20454) "app_name" 0x00007ffff5bdf12d in poll () at ../sysdeps/unix/syscall-template.S:81
* 1 Thread 0x7ffff7fab800 (LWP 20450) "app_name" 0x00007ffff5bb2f3d in nanosleep () at ../sysdeps/unix/syscall-template.S:81
Thread 1 and 78 (using gdb ID) are executing my code. I added a sleep call in each one so I can make sure that those are my threads.
Thread 2 (using gdb ID) is created before entering the main function of the main process I believe. As far as I could debug this, thread with ID 2 just calls poll() function all the time.
I'm new to gdb and maybe you can tell me how to find out who creates this thread and what is it's purpose? Is this OpenCV related or C++11? When I compile the same app using Opencv4Tegra and run it on a Tegra K1 board, thread number 2 does not exist.
EDIT
This is the backtrace when creating thread number 2. It seems that libusb creates this but I don't know why yet:
(gdb) backtrace
#0 __pthread_create_2_1 (newthread=0x7fffea79c438, attr=0x0, start_routine=0x7fffea5941c0, arg=0x0) at pthread_create.c:466
#1 0x00007fffea5943df in ?? () from /lib/x86_64-linux-gnu/libusb-1.0.so.0
#2 0x00007fffea5926a5 in ?? () from /lib/x86_64-linux-gnu/libusb-1.0.so.0
#3 0x00007fffea58b715 in libusb_init () from /lib/x86_64-linux-gnu/libusb-1.0.so.0
#4 0x00007ffff2f06a0e in ?? () from /usr/lib/x86_64-linux-gnu/libdc1394.so.22
#5 0x00007ffff2ef5465 in dc1394_new () from /usr/lib/x86_64-linux-gnu/libdc1394.so.22
#6 0x00007ffff6f615e9 in CvDC1394::CvDC1394() () from /usr/local/lib/libopencv_highgui.so.2.4
#7 0x00007ffff6f373f0 in _GLOBAL__sub_I_cap_dc1394_v2.cpp () from /usr/local/lib/libopencv_highgui.so.2.4
#8 0x00007ffff7dea13a in call_init (l=<optimized out>, argc=argc#entry=3, argv=argv#entry=0x7fffffffdcd8, env=env#entry=0x7fffffffdcf8) at dl-init.c:78
#9 0x00007ffff7dea223 in call_init (env=<optimized out>, argv=<optimized out>, argc=<optimized out>, l=<optimized out>) at dl-init.c:36
#10 _dl_init (main_map=0x7ffff7ffe1c8, argc=3, argv=0x7fffffffdcd8, env=0x7fffffffdcf8) at dl-init.c:126
#11 0x00007ffff7ddb30a in _dl_start_user () from /lib64/ld-linux-x86-64.so.2
(gdb) quit
I'm using node.js, node-vips and libvips compiled with ImageMagick to convert and resize images. I'm getting segmentation faults and failed assertions when I try and resize more than a couple of images.
I've had so many different crashes I'm not sure where to begin. I started off with libvips 7.26.8, I've also tried 7.30.7. This is with node v0.8.17 compiled from source, on a fairly standard, clean ubuntu box.
#0 0x0000158ac3765c59 in ?? ()
Cannot access memory at address 0x7fffa837ec90
#0 0x0000000000000000 in ?? ()
#1 0x0000000000000000 in ?? ()
node: ../deps/uv/src/unix/stream.c:729: uv__stream_io: Assertion `!!(events & EV_READ) ^ !!(events & EV_WRITE)' failed.
Aborted (core dumped)
#0 0x00007f5ed4df9425 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007f5ed4dfcb8b in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2 0x00007f5ed4df20ee in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#3 0x00007f5ed4df2192 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
#4 0x00000000005d1bc8 in uv__stream_io (loop=<optimized out>, w=<optimized out>, events=<optimized out>) at ../deps/uv/src/unix/stream.c:729
#5 0x00000000005c6ac2 in ev_invoke_pending (loop=0xdb34c0 <default_loop_struct>) at ../deps/uv/src/unix/ev/ev.c:2145
#6 0x00000000005c2986 in uv__poll (loop=0xdb27e0 <default_loop_struct>) at ../deps/uv/src/unix/core.c:246
#7 uv__run (loop=0xdb27e0 <default_loop_struct>) at ../deps/uv/src/unix/core.c:257
#8 0x00000000005c2c60 in uv_run (loop=0xdb27e0 <default_loop_struct>) at ../deps/uv/src/unix/core.c:265
#9 0x000000000057d9f7 in node::Start(int, char**) ()
#10 0x00007f5ed4de476d in __libc_start_main () from /lib/x86_64-linux-gnu/libc.so.6
#11 0x0000000000575245 in _start ()
#0 0x00000000006b13b8 in v8::Object::SetHiddenValue(v8::Handle<v8::String>, v8::Handle<v8::Value>) ()
#1 0x0000000000593f5a in node::SlabAllocator::Allocate(v8::Handle<v8::Object>, unsigned int) ()
#2 0x0000000000591d04 in node::StreamWrap::OnAlloc(uv_handle_s*, unsigned long) ()
#3 0x00000000005d08fb in uv__read (stream=0x1fa7f90) at ../deps/uv/src/unix/stream.c:575
#4 0x00000000005d1a1a in uv__stream_io (loop=<optimized out>, w=<optimized out>, events=<optimized out>) at ../deps/uv/src/unix/stream.c:745
#5 0x00000000005c6ac2 in ev_invoke_pending (loop=0xdb34c0 <default_loop_struct>) at ../deps/uv/src/unix/ev/ev.c:2145
#6 0x00000000005c29df in uv__poll (loop=0xdb27e0 <default_loop_struct>) at ../deps/uv/src/unix/core.c:248
#7 uv__run (loop=0xdb27e0 <default_loop_struct>) at ../deps/uv/src/unix/core.c:257
#8 0x00000000005c2c60 in uv_run (loop=0xdb27e0 <default_loop_struct>) at ../deps/uv/src/unix/core.c:265
#9 0x000000000057d9f7 in node::Start(int, char**) ()
#10 0x00007f065aa1176d in __libc_start_main () from /lib/x86_64-linux-gnu/libc.so.6
#11 0x0000000000575245 in _start ()
More often than not I get one of the first two errors – ie, no stack trace. These all occurred while trying to resize 6 or so images – occasionally they all succeed without error, but usually it seg faults after the first one or two have been resized.
How on earth do I go about debugging this?
In the unit test for the node-vips plugin there's a comment that reads:
this test will crash if vips is compiled with imagemagick support because imagemagick crashes when called from libeio
Why is this? Is this still true? I thought ImageMagick was perfectly thread-safe, what about it makes it not safe to be called from libeio/libuv?
I am trying to play an mp3 file with the following code.
AVAudioPlayer player = new AVAudioPlayer();
NSUrl mediaFile = NSUrl.FromFilename(monkeySound);
player = AVAudioPlayer.FromUrl(mediaFile);
player.Delegate = new PlayerDelegate();
if(player.PrepareToPlay()){
player.Play();
}
private class PlayerDelegate:AVAudioPlayerDelegate {
public PlayerDelegate(){
}
public override void FinishedPlaying (AVAudioPlayer player, bool flag)
{
//Some Stuff Done Here
}
}
This is the error I get:
Stacktrace:
at (wrapper managed-to-native) MonoTouch.ObjCRuntime.Messaging.void_objc_msgSend (intptr,intptr)
at MonoTouch.Foundation.NSObject/MonoTouch_Disposer.Drain (MonoTouch.Foundation.NSObject) [0x0002a] in /Users/plasma/Source/iphone/monotouch/Foundation/NSObject.cs:305
at (wrapper runtime-invoke) .runtime_invoke_void_this__object (object,intptr,intptr,intptr)
at (wrapper managed-to-native) MonoTouch.UIKit.UIApplication.UIApplicationMain (int,string[],intptr,intptr)
at MonoTouch.UIKit.UIApplication.Main (string[],string,string) [0x00038] in /Users/plasma/Source/iphone/monotouch/UIKit/UIApplication.cs:26
at MonoTouch.UIKit.UIApplication.Main (string[]) [0x00000] in /Users/plasma/Source/iphone/monotouch/UIKit/UIApplication.cs:31
at MonkeyShot.Application.Main (string[]) [0x00000] in /Users/fencer04/Projects/MonkeyShot/MonkeyShot/Main.cs:14
at (wrapper runtime-invoke) .runtime_invoke_void_object (object,intptr,intptr,intptr)
Native stacktrace:
0 MonkeyShot 0x000d0d25 mono_handle_native_sigsegv + 343
1 MonkeyShot 0x0000f6f4 mono_sigsegv_signal_handler + 322
2 libSystem.B.dylib 0x992a345b _sigtramp + 43
3 ??? 0xffffffff 0x0 + 4294967295
4 AVFoundation 0x0047c28d -[AVAudioPlayer privCommonCleanup] + 50
5 AVFoundation 0x0047c339 -[AVAudioPlayer dealloc] + 51
6 ??? 0x0a2af91c 0x0 + 170588444
7 ??? 0x0a2cab1c 0x0 + 170699548
8 ??? 0x077520d6 0x0 + 125116630
9 MonkeyShot 0x0000f4af mono_jit_runtime_invoke + 1332
10 MonkeyShot 0x001ed319 mono_runtime_invoke + 137
11 MonkeyShot 0x0029da57 monotouch_trampoline + 2527
12 Foundation 0x0140d94e __NSThreadPerformPerform + 251
13 CoreFoundation 0x00e9f8ff __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
14 CoreFoundation 0x00dfd88b __CFRunLoopDoSources0 + 571
15 CoreFoundation 0x00dfcd86 __CFRunLoopRun + 470
16 CoreFoundation 0x00dfc840 CFRunLoopRunSpecific + 208
17 CoreFoundation 0x00dfc761 CFRunLoopRunInMode + 97
18 GraphicsServices 0x0404b1c4 GSEventRunModal + 217
19 GraphicsServices 0x0404b289 GSEventRun + 115
20 UIKit 0x01cdfc93 UIApplicationMain + 1160
21 ??? 0x09d530a3 0x0 + 164966563
22 ??? 0x09d52e74 0x0 + 164966004
23 ??? 0x09d52474 0x0 + 164963444
24 ??? 0x09d522cc 0x0 + 164963020
25 ??? 0x09d5241e 0x0 + 164963358
26 MonkeyShot 0x0000f4af mono_jit_runtime_invoke + 1332
27 MonkeyShot 0x001ed319 mono_runtime_invoke + 137
28 MonkeyShot 0x001efa00 mono_runtime_exec_main + 669
29 MonkeyShot 0x001eedea mono_runtime_run_main + 843
30 MonkeyShot 0x000a3083 mono_jit_exec + 200
31 MonkeyShot 0x002a1697 main + 3838
32 MonkeyShot 0x00002809 _start + 208
33 MonkeyShot 0x00002738 start + 40
Debug info from gdb:
/tmp/mono-gdb-commands.0GDVJY:1: Error in sourced command file:
unable to debug self
===============================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
I don't know if this is your issue, but I had some issues using the C#-style delegate methods and AVAudioPlayer. If this is similar to my issue, using the "WeakDelegate" construct and exporting methods might be useful.
The problem I'm having is that in my brand new project I have a Window with a button (Outlet and Action defined) and in my C# code I've wired up the partial void implementation of the Action. Then I have a View that I load and do the same thing.
The issue is that the View causes a System.NullReferenceException, the 'Click' code never gets run, instead I end up with the following full trace
Loaded assembly: /Developer/MonoTouch/usr/lib/mono/2.1/monotouch.dll [External]
Loaded assembly: /Developer/MonoTouch/usr/lib/mono/2.1/System.Core.dll [External]
Loaded assembly: /Users/drisszouak/Projects/ZenVelopes/ZenVelopes/bin/iPhoneSimulator/Debug/ZenVelopes.exe
Stacktrace:
at (wrapper managed-to-native) MonoTouch.UIKit.UIApplication.UIApplicationMain (int,string[],intptr,intptr) <0x00004>
at (wrapper managed-to-native) MonoTouch.UIKit.UIApplication.UIApplicationMain (int,string[],intptr,intptr) <0x00004>
at MonoTouch.UIKit.UIApplication.Main (string[],string,string) [0x00038] in /Users/plasma/Source/iphone/monotouch/UIKit/UIApplication.cs:26
at MonoTouch.UIKit.UIApplication.Main (string[]) [0x00000] in /Users/plasma/Source/iphone/monotouch/UIKit/UIApplication.cs:31
at ZenVelopes.Application.Main (string[]) [0x00000] in /Users/drisszouak/Projects/ZenVelopes/ZenVelopes/Main.cs:14
at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object (object,intptr,intptr,intptr) <IL 0x0001d, 0x00090>
Native stacktrace:
0 ZenVelopes 0x000be66f mono_handle_native_sigsegv + 343
1 ZenVelopes 0x0000e43e mono_sigsegv_signal_handler + 313
2 libSystem.B.dylib 0x9118246b _sigtramp + 43
3 ??? 0xffffffff 0x0 + 4294967295
4 UIKit 0x01def167 -[UIBarButtonItem(UIInternal) _sendAction:withEvent:] + 156
5 UIKit 0x01be1a6e -[UIApplication sendAction:to:from:forEvent:] + 119
6 UIKit 0x01c701b5 -[UIControl sendAction:to:forEvent:] + 67
7 UIKit 0x01c72647 -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 527
8 UIKit 0x01c711f4 -[UIControl touchesEnded:withEvent:] + 458
9 UIKit 0x01c060d1 -[UIWindow _sendTouchesForEvent:] + 567
10 UIKit 0x01be737a -[UIApplication sendEvent:] + 447
11 UIKit 0x01bec732 _UIApplicationHandleEvent + 7576
12 GraphicsServices 0x03eb7a36 PurpleEventCallback + 1550
13 CoreFoundation 0x00df9064 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
14 CoreFoundation 0x00d596f7 __CFRunLoopDoSource1 + 215
15 CoreFoundation 0x00d56983 __CFRunLoopRun + 979
16 CoreFoundation 0x00d56240 CFRunLoopRunSpecific + 208
17 CoreFoundation 0x00d56161 CFRunLoopRunInMode + 97
18 GraphicsServices 0x03eb6268 GSEventRunModal + 217
19 GraphicsServices 0x03eb632d GSEventRun + 115
20 UIKit 0x01bf042e UIApplicationMain + 1160
21 ??? 0x09e39862 0x0 + 165910626
22 ??? 0x09e39632 0x0 + 165910066
23 ??? 0x09e38c9a 0x0 + 165907610
24 ??? 0x09e38aec 0x0 + 165907180
25 ??? 0x09e38ba1 0x0 + 165907361
26 ZenVelopes 0x0000e202 mono_jit_runtime_invoke + 1360
27 ZenVelopes 0x001c92af mono_runtime_invoke + 137
28 ZenVelopes 0x001caf6b mono_runtime_exec_main + 714
29 ZenVelopes 0x001ca891 mono_runtime_run_main + 812
30 ZenVelopes 0x00094fe8 mono_jit_exec + 200
31 ZenVelopes 0x0027cf05 main + 3494
32 ZenVelopes 0x00002ca1 _start + 208
33 ZenVelopes 0x00002bd0 start + 40
34 ??? 0x00000002 0x0 + 2
Debug info from gdb:
warning: Could not find object file "/var/folders/Ny/NyElTwhDGD8kZMqIEeLGXE+++TI/-Tmp-//cc6F1tBs.o" - no debug information available for "template.m".
warning: .o file "/Developer/MonoTouch/SDKs/MonoTouch.iphonesimulator4.2.sdk/usr/lib/libmonotouch.a(zlib-helper.x86.42.o)" more recent than executable timestamp in "/Users/drisszouak/Library/Application Support/iPhone Simulator/4.2/Applications/9B8EA00C-09B4-4D08-ABF7-7CF4487F1A28/ZenVelopes.app/ZenVelopes"
warning: Could not open OSO file /Developer/MonoTouch/SDKs/MonoTouch.iphonesimulator4.2.sdk/usr/lib/libmonotouch.a(zlib-helper.x86.42.o) to scan for pubtypes for objfile /Users/drisszouak/Library/Application Support/iPhone Simulator/4.2/Applications/9B8EA00C-09B4-4D08-ABF7-7CF4487F1A28/ZenVelopes.app/ZenVelopes
warning: .o file "/Developer/MonoTouch/SDKs/MonoTouch.iphonesimulator4.2.sdk/usr/lib/libmonotouch.a(monotouch-glue.x86.42.o)" more recent than executable timestamp in "/Users/drisszouak/Library/Application Support/iPhone Simulator/4.2/Applications/9B8EA00C-09B4-4D08-ABF7-7CF4487F1A28/ZenVelopes.app/ZenVelopes"
warning: Could not open OSO file /Developer/MonoTouch/SDKs/MonoTouch.iphonesimulator4.2.sdk/usr/lib/libmonotouch.a(monotouch-glue.x86.42.o) to scan for pubtypes for objfile /Users/drisszouak/Library/Application Support/iPhone Simulator/4.2/Applications/9B8EA00C-09B4-4D08-ABF7-7CF4487F1A28/ZenVelopes.app/ZenVelopes
warning: .o file "/Developer/MonoTouch/SDKs/MonoTouch.iphonesimulator4.2.sdk/usr/lib/libmonotouch.a(gc.x86.42.o)" more recent than executable timestamp in "/Users/drisszouak/Library/Application Support/iPhone Simulator/4.2/Applications/9B8EA00C-09B4-4D08-ABF7-7CF4487F1A28/ZenVelopes.app/ZenVelopes"
warning: Could not open OSO file /Developer/MonoTouch/SDKs/MonoTouch.iphonesimulator4.2.sdk/usr/lib/libmonotouch.a(gc.x86.42.o) to scan for pubtypes for objfile /Users/drisszouak/Library/Application Support/iPhone Simulator/4.2/Applications/9B8EA00C-09B4-4D08-ABF7-7CF4487F1A28/ZenVelopes.app/ZenVelopes
warning: .o file "/Developer/MonoTouch/SDKs/MonoTouch.iphonesimulator4.2.sdk/usr/lib/libmonotouch.a(monotouch-glue.x86.42.o)" more recent than executable timestamp in "/Users/drisszouak/Library/Application Support/iPhone Simulator/4.2/Applications/9B8EA00C-09B4-4D08-ABF7-7CF4487F1A28/ZenVelopes.app/ZenVelopes"
warning: Couldn't open object file '/Developer/MonoTouch/SDKs/MonoTouch.iphonesimulator4.2.sdk/usr/lib/libmonotouch.a(monotouch-glue.x86.42.o)'
Attaching to process 10857.
Reading symbols for shared libraries . done
Reading symbols for shared libraries ...................................................................................................................... done
0x91127459 in read$UNIX2003 ()
7 "WebThread" 0x9111c0fa in mach_msg_trap ()
6 0x9114a0a6 in __semwait_signal ()
5 0x911595fe in recvfrom$UNIX2003 ()
4 0x9111c136 in semaphore_wait_trap ()
3 0x9111c0fa in mach_msg_trap ()
2 "com.apple.libdispatch-manager" 0x91142982 in kevent ()
* 1 "com.apple.main-thread" 0x91127459 in read$UNIX2003 ()
Thread 7 (process 10857):
#0 0x9111c0fa in mach_msg_trap ()
#1 0x9111c867 in mach_msg ()
#2 0x00df94a6 in __CFRunLoopServiceMachPort ()
#3 0x00d56874 in __CFRunLoopRun ()
#4 0x00d56240 in CFRunLoopRunSpecific ()
#5 0x00d56161 in CFRunLoopRunInMode ()
#6 0x04f7c423 in RunWebThread ()
#7 0x9114985d in _pthread_start ()
#8 0x911496e2 in thread_start ()
Thread 6 (process 10857):
#0 0x9114a0a6 in __semwait_signal ()
#1 0x91175ee5 in nanosleep$UNIX2003 ()
#2 0x91175e23 in usleep$UNIX2003 ()
#3 0x0027714c in monotouch_pump_gc ()
#4 0x9114985d in _pthread_start ()
#5 0x911496e2 in thread_start ()
Thread 5 (process 10857):
#0 0x911595fe in recvfrom$UNIX2003 ()
#1 0x911793c7 in recv$UNIX2003 ()
#2 0x000d8cca in recv_length (fd=6, buf=0xb0388ebd, len=11, flags=0) at ../../../../mono/mini/debugger-agent.c:939
#3 0x000e616a in debugger_thread (arg=0x0) at ../../../../mono/mini/debugger-agent.c:6290
#4 0x002448e2 in thread_start_routine (args=0x80339a8) at ../../../../mono/io-layer/wthreads.c:286
#5 0x00274357 in GC_start_routine (arg=0x6ff6f60) at ../../../libgc/pthread_support.c:1390
#6 0x9114985d in _pthread_start ()
#7 0x911496e2 in thread_start ()
Thread 4 (process 10857):
#0 0x9111c136 in semaphore_wait_trap ()
#1 0x0015ae1d in finalizer_thread (unused=0x0) at ../../../../mono/metadata/gc.c:1026
#2 0x002034a3 in start_wrapper (data=0x7b18620) at ../../../../mono/metadata/threads.c:661
#3 0x002448e2 in thread_start_routine (args=0x80338b0) at ../../../../mono/io-layer/wthreads.c:286
#4 0x00274357 in GC_start_routine (arg=0x6ff6f60) at ../../../libgc/pthread_support.c:1390
#5 0x9114985d in _pthread_start ()
#6 0x911496e2 in thread_start ()
Thread 3 (process 10857):
#0 0x9111c0fa in mach_msg_trap ()
#1 0x9111c867 in mach_msg ()
#2 0x0011cc46 in mach_exception_thread (arg=0x0) at ../../../../mono/mini/mini-darwin.c:138
#3 0x9114985d in _pthread_start ()
#4 0x911496e2 in thread_start ()
Thread 2 (process 10857):
#0 0x91142982 in kevent ()
#1 0x9114309c in _dispatch_mgr_invoke ()
#2 0x91142559 in _dispatch_queue_invoke ()
#3 0x911422fe in _dispatch_worker_thread2 ()
#4 0x91141d81 in _pthread_wqthread ()
#5 0x91141bc6 in start_wqthread ()
Thread 1 (process 10857):
#0 0x91127459 in read$UNIX2003 ()
#1 0x000be81f in mono_handle_native_sigsegv (signal=11, ctx=0xbfffd228) at ../../../../mono/mini/mini-exceptions.c:1826
#2 0x0000e43e in mono_sigsegv_signal_handler (_dummy=10, info=0xbfffd1e8, context=0xbfffd228) at ../../../../mono/mini/mini.c:4846
#3 <signal handler called>
#4 0x028d6a63 in objc_msgSend ()
#5 0x07b96550 in ?? ()
#6 0x01def167 in -[UIBarButtonItem(UIInternal) _sendAction:withEvent:] ()
#7 0x01be1a6e in -[UIApplication sendAction:to:from:forEvent:] ()
#8 0x01c701b5 in -[UIControl sendAction:to:forEvent:] ()
#9 0x01c72647 in -[UIControl(Internal) _sendActionsForEvents:withEvent:] ()
#10 0x01c711f4 in -[UIControl touchesEnded:withEvent:] ()
#11 0x01c060d1 in -[UIWindow _sendTouchesForEvent:] ()
#12 0x01be737a in -[UIApplication sendEvent:] ()
#13 0x01bec732 in _UIApplicationHandleEvent ()
#14 0x03eb7a36 in PurpleEventCallback ()
#15 0x00df9064 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ ()
#16 0x00d596f7 in __CFRunLoopDoSource1 ()
#17 0x00d56983 in __CFRunLoopRun ()
#18 0x00d56240 in CFRunLoopRunSpecific ()
#19 0x00d56161 in CFRunLoopRunInMode ()
#20 0x03eb6268 in GSEventRunModal ()
#21 0x03eb632d in GSEventRun ()
#22 0x01bf042e in UIApplicationMain ()
#23 0x09e39862 in ?? ()
#24 0x09e39632 in ?? ()
#25 0x09e38c9a in ?? ()
#26 0x09e38aec in ?? ()
#27 0x09e38ba1 in ?? ()
#28 0x0000e202 in mono_jit_runtime_invoke (method=0x8119afc, obj=0x0, params=0xbfffed9c, exc=0x0) at ../../../../mono/mini/mini.c:4733
#29 0x001c92af in mono_runtime_invoke (method=0x8119afc, obj=0x0, params=0xbfffed9c, exc=0x0) at ../../../../mono/metadata/object.c:2615
#30 0x001caf6b in mono_runtime_exec_main (method=0x8119afc, args=0x9e0d1a0, exc=0x0) at ../../../../mono/metadata/object.c:3581
#31 0x001ca891 in mono_runtime_run_main (method=0x8119afc, argc=0, argv=0xbfffeed4, exc=0x0) at ../../../../mono/metadata/object.c:3355
#32 0x00094fe8 in mono_jit_exec (domain=0x6f91e58, assembly=0x7b8ca10, argc=1, argv=0xbfffeed0) at ../../../../mono/mini/driver.c:1094
#33 0x0027cf05 in main ()
=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================
On the advice of a friend, I uninstalled Mono, MonoTouch, MonoDevelop and the iOS SDK and then redownloaded them, reinstalled them in iOS SDK, Mono, MT (Personal licensed edition), MD order. This didn't change a thing.
The line #14 that is referenced in my Main is this one:
public class Application
{
static void Main (string[] args)
{
#14 ====> UIApplication.Main (args);
}
}
The Partial void 'click' event that I'm wiring up is this (solely for testing purposes). The code never arrives here, the exception blows up before it.
partial void clickNewEnvelope (UIBarButtonItem sender)
{
int x;
x = 1;
}
When I create a new project, I'm getting the same thing.
I am seriously stumped, help.
It looks like you're dangling an event off a UIBarButtonItem and not keeping a reference to it. Any time you do
foo.SomeEvent += delegate {};
You need to keep a reference to "foo" so that the hidden class which implements the protocol isn't collected, as the UIBarButtonItem in this case is the owner of that hidden class.