Hi, I spent several months to develop an app using xamarin.forms. However, my app intermittent crashes due to the __NSFastEnumerationMutationHandler exception. It is happening once in one or two days, very hard to trace, even if i can trace it. It is the monotouchexception and it will never stop at any part of the program. Please help and advice. By the way, it works fine with android platform.
I am using some of animations to built a learning tool. If i can't fix it, i need to revert back to swift/xcode. it is a great waste of my time.
Incident Identifier: DE7175B5-4A9E-4779-BFDE-0CA0573A60DE
CrashReporter Key: b64a9698dcf65065e54243890089d9329afbaa22
Hardware Model: iPad5,1
Process: LearningTool.iOS [324]
Path: /private/var/containers/Bundle/Application/2358804B-AC2C-44A2-A40B-E060530BEBCA/LearningTool.iOS.app/LearningTool.iOS
Identifier: sg.Learning.www.Learning-Tool
Version: 1.0 (1.0)
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd [1]
Coalition: sg.Learning.www.Learning-Tool [428]
Date/Time: 2017-02-02 19:43:59.9418 +0800
Launch Time: 2017-02-02 19:34:43.5585 +0800
OS Version: iPhone OS 10.2.1 (14D27)
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Triggered by Thread: 6
Application Specific Information:
abort() called
Filtered syslog:
None found
Last Exception Backtrace:
0 CoreFoundation 0x1816751b8 __exceptionPreprocess + 124
1 libobjc.A.dylib 0x1800ac55c objc_exception_throw + 56
2 CoreFoundation 0x181674c00 __NSFastEnumerationMutationHandler + 128
3 UIKit 0x18751a494 -[UIView(Hierarchy) subviews] + 420
4 UIKit 0x187825188 -[UIView(CALayerDelegate) _wantsReapplicationOfAutoLayoutWithLayoutDirtyOnEntry:] + 72
5 UIKit 0x187520ab8 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1252
6 QuartzCore 0x1849ce9d8 -[CALayer layoutSublayers] + 148
7 QuartzCore 0x1849c34cc CA::Layer::layout_if_needed(CA::Transaction*) + 292
8 QuartzCore 0x1849c338c CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 32
9 QuartzCore 0x1849403e0 CA::Context::commit_transaction(CA::Transaction*) + 252
10 QuartzCore 0x184967a68 CA::Transaction::commit() + 512
11 LearningTool.iOS 0x100ec1bd8 wrapper_managed_to_native_ObjCRuntime_Messaging_void_objc_msgSend_intptr_intptr (/:1)
12 LearningTool.iOS 0x100e3ad08 CoreAnimation_CATransaction_Commit (CATransaction.g.cs:81)
13 LearningTool.iOS 0x100d6cf7c Xamarin_Forms_Platform_iOS_CADisplayLinkTicker_StartThread (/C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\CADisplayLinkTicker.cs:61)
14 LearningTool.iOS 0x10077d610 System_Threading_ThreadHelper_ThreadStart_Context_object + 192
15 LearningTool.iOS 0x10077b8ac System_Threading_ExecutionContext_RunInternal_System_Threading_ExecutionContext_System_Threading_ContextCallback_object_bool + 428
16 LearningTool.iOS 0x10077b6ec System_Threading_ExecutionContext_Run_System_Threading_ExecutionContext_System_Threading_ContextCallback_object_bool + 44
17 LearningTool.iOS 0x10077b664 System_Threading_ExecutionContext_Run_System_Threading_ExecutionContext_System_Threading_ContextCallback_object + 84
18 LearningTool.iOS 0x10077d764 System_Threading_ThreadHelper_ThreadStart + 52
19 LearningTool.iOS 0x10088f504 wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 244
20 LearningTool.iOS 0x1000d8cd0 mono_jit_runtime_invoke (mini-runtime.c:2523)
21 LearningTool.iOS 0x1001356cc do_runtime_invoke (object.c:2809)
22 LearningTool.iOS 0x10015e6d0 start_wrapper (threads.c:746)
23 LearningTool.iOS 0x1001a7404 inner_start_thread (mono-threads-posix.c:92)
24 libsystem_pthread.dylib 0x180709850 0x180706000 + 14416
25 libsystem_pthread.dylib 0x180709760 0x180706000 + 14176
26 libsystem_pthread.dylib 0x180706d94 0x180706000 + 3476
Thread 0 name: tid_403 Dispatch queue: com.apple.main-thread
Thread 0:
0 libsystem_kernel.dylib 0x0000000180625188 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x0000000180624ff8 mach_msg + 72
2 CoreFoundation 0x00000001816225d0 CFRunLoopServiceMachPort + 192
3 CoreFoundation 0x00000001816201ec __CFRunLoopRun + 1132
4 CoreFoundation 0x000000018154e2b8 CFRunLoopRunSpecific + 444
5 GraphicsServices 0x0000000183002198 GSEventRunModal + 180
6 UIKit 0x000000018758e7fc -[UIApplication _run] + 684
7 UIKit 0x0000000187589534 UIApplicationMain + 208
8 LearningTool.iOS 0x0000000100ebcbf4 wrapper_managed_to_native_UIKit_UIApplication_UIApplicationMain_int_string___intptr_intptr (/:1)
9 LearningTool.iOS 0x0000000100e3dafc UIKit_UIApplication_Main_string___intptr_intptr (UIApplication.cs:79)
10 LearningTool.iOS 0x0000000100e3dabc UIKit_UIApplication_Main_string___string_string (UIApplication.cs:63)
11 LearningTool.iOS 0x00000001001c2844 LearningTool_iOS_Application_Main_string (/:1)
12 LearningTool.iOS 0x000000010088f504 wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 244
13 LearningTool.iOS 0x00000001000d8cd0 mono_jit_runtime_invoke (mini-runtime.c:2524)
14 LearningTool.iOS 0x00000001001356cc do_runtime_invoke (object.c:2809)
15 LearningTool.iOS 0x00000001001376f0 mono_runtime_exec_main (object.c:4585)
16 LearningTool.iOS 0x000000010013730c mono_runtime_run_main (object.c:4134)
17 LearningTool.iOS 0x00000001000c2f34 mono_jit_exec (driver.g.c:1048)
18 LearningTool.iOS 0x00000001001c16a0 xamarin_main (monotouch-main.m:487)
19 LearningTool.iOS 0x00000001010be444 main (main.arm64.m:84)
20 libdyld.dylib 0x00000001805315b8 0x18052d000 + 17848
Thread 1:
0 libsystem_kernel.dylib 0x0000000180642e1c __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x00000001807089c0 0x180706000 + 10688
2 libc++.1.dylib 0x00000001800313ec std::__1::condition_variable::wait(std::__1::unique_lock&) + 56
3 JavaScriptCore 0x0000000185e4b5d0 void std::__1::condition_variable_any::wait<std::__1::unique_lock >(std::__1::unique_lock&) + 112
4 JavaScriptCore 0x0000000185e4b544 bmalloc::AsyncTask<bmalloc::Heap, void (bmalloc::Heap::)()>::threadRunLoop() + 168
5 JavaScriptCore 0x0000000185e4b424 std::__1::__shared_ptr_emplace<std::__1::mutex, std::__1::allocator >::~__shared_ptr_emplace() + 0
6 JavaScriptCore 0x0000000185e4b6d4 void std::__1::__thread_proxy<std::__1::tuple), bmalloc::AsyncTask<bmalloc::Heap, void (bmalloc::Heap::)()>> >(void) + 92
7 libsystem_pthread.dylib 0x0000000180709850 0x180706000 + 14416
8 libsystem_pthread.dylib 0x0000000180709760 0x180706000 + 14176
9 libsystem_pthread.dylib 0x0000000180706d94 0x180706000 + 3476
Thread 6 name: tid_5a23
Thread 6 Crashed:
0 libsystem_kernel.dylib 0x0000000180643014 __pthread_kill + 8
1 libsystem_pthread.dylib 0x000000018070b450 0x180706000 + 21584
2 libsystem_c.dylib 0x00000001805b7400 abort + 140
3 LearningTool.iOS 0x00000001000cbed8 mono_handle_native_sigsegv (mini-exceptions.c:2420)
4 libsystem_platform.dylib 0x0000000180705348 _sigtramp + 52
5 libsystem_pthread.dylib 0x000000018070b450 0x180706000 + 21584
6 libsystem_c.dylib 0x00000001805b7400 abort + 140
7 LearningTool.iOS 0x00000001001b6ea0 print_all_exceptions(MonoObject*) (runtime.m:997)
8 LearningTool.iOS 0x00000001000cc610 mono_invoke_unhandled_exception_hook (mini-exceptions.c:2873)
9 LearningTool.iOS 0x00000001000cbb6c mono_handle_exception_internal (mini-exceptions.c:1798)
10 LearningTool.iOS 0x00000001000cac4c mono_handle_exception (mini-exceptions.c:2027)
11 LearningTool.iOS 0x00000001000c3748 mono_arm_throw_exception (exceptions-arm64.c:390)
12 LearningTool.iOS 0x00000001008c16d8 throw_exception + 168
13 LearningTool.iOS 0x00000001001b6bf4 xamarin_process_managed_exception (runtime.m:2079)
14 LearningTool.iOS 0x00000001001b6acc xamarin_process_managed_exception_gchandle (runtime.m:1035)
15 LearningTool.iOS 0x00000001001b6a88 xamarin_ftnptr_exception_handler (runtime.m:1024)
16 LearningTool.iOS 0x0000000100ecc350 wrapper_native_to_managed_ObjCRuntime_Runtime_throw_ns_exception_intptr (/:1)
17 LearningTool.iOS 0x00000001001b5480 xamarin_throw_ns_exception (.delegates.inc:105)
18 LearningTool.iOS 0x00000001001b7768 exception_handler(NSException*) (runtime.m:1057)
19 CoreFoundation 0x0000000181675538 __handleUncaughtException + 644
20 libobjc.A.dylib 0x00000001800ac838 _objc_terminate() + 112
21 libc++abi.dylib 0x000000018009b66c std::__terminate(void (*)()) + 16
22 libc++abi.dylib 0x000000018009af84 __cxxabiv1::exception_cleanup_func(_Unwind_Reason_Code, _Unwind_Exception*) + 0
23 libobjc.A.dylib 0x00000001800ac690 _objc_exception_destructor(void*) + 0
24 CoreFoundation 0x0000000181674c00 -[NSException name] + 0
25 UIKit 0x000000018751a494 -[UIView(Hierarchy) subviews] + 420
26 UIKit 0x0000000187825188 -[UIView(CALayerDelegate) _wantsReapplicationOfAutoLayoutWithLayoutDirtyOnEntry:] + 72
27 UIKit 0x0000000187520ab8 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1252
28 QuartzCore 0x00000001849ce9d8 -[CALayer layoutSublayers] + 148
29 QuartzCore 0x00000001849c34cc CA::Layer::layout_if_needed(CA::Transaction*) + 292
30 QuartzCore 0x00000001849c338c CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 32
31 QuartzCore 0x00000001849403e0 CA::Context::commit_transaction(CA::Transaction*) + 252
32 QuartzCore 0x0000000184967a68 CA::Transaction::commit() + 512
33 LearningTool.iOS 0x0000000100ec1bd8 wrapper_managed_to_native_ObjCRuntime_Messaging_void_objc_msgSend_intptr_intptr (/:1)
34 LearningTool.iOS 0x0000000100e3ad08 CoreAnimation_CATransaction_Commit (CATransaction.g.cs:81)
35 LearningTool.iOS 0x0000000100d6cf7c Xamarin_Forms_Platform_iOS_CADisplayLinkTicker_StartThread (/C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\CADisplayLinkTicker.cs:63)
36 LearningTool.iOS 0x000000010077d610 System_Threading_ThreadHelper_ThreadStart_Context_object + 192
37 LearningTool.iOS 0x000000010077b8ac System_Threading_ExecutionContext_RunInternal_System_Threading_ExecutionContext_System_Threading_ContextCallback_object_bool + 428
38 LearningTool.iOS 0x000000010077b6ec System_Threading_ExecutionContext_Run_System_Threading_ExecutionContext_System_Threading_ContextCallback_object_bool + 44
39 LearningTool.iOS 0x000000010077b664 System_Threading_ExecutionContext_Run_System_Threading_ExecutionContext_System_Threading_ContextCallback_object + 84
40 LearningTool.iOS 0x000000010077d764 System_Threading_ThreadHelper_ThreadStart + 52
41 LearningTool.iOS 0x000000010088f504 wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 244
42 LearningTool.iOS 0x00000001000d8cd0 mono_jit_runtime_invoke (mini-runtime.c:2524)
43 LearningTool.iOS 0x00000001001356cc do_runtime_invoke (object.c:2809)
44 LearningTool.iOS 0x000000010015e6d0 start_wrapper (threads.c:747)
45 LearningTool.iOS 0x00000001001a7404 inner_start_thread (mono-threads-posix.c:92)
46 libsystem_pthread.dylib 0x0000000180709850 0x180706000 + 14416
47 libsystem_pthread.dylib 0x0000000180709760 0x180706000 + 14176
48 libsystem_pthread.dylib 0x0000000180706d94 0x180706000 + 3476
Thread 6 crashed with ARM Thread State (64-bit):
x0: 0x0000000000000000 x1: 0x0000000000000000 x2: 0x0000000000000000 x3: 0x0000000000000030
x4: 0x000000000000001b x5: 0x000000016ec11d50 x6: 0x0000000000000036 x7: 0xffffffffffffffec
x8: 0x0000000008000000 x9: 0x0000000004000000 x10: 0x0000000180705314 x11: 0x0000000102e10000
x12: 0xffffffffffffc000 x13: 0x0000000102e0c000 x14: 0x0000000000002000 x15: 0x00000000000047eb
x16: 0x0000000000000148 x17: 0x000000018156d810 x18: 0x0000000000000000 x19: 0x0000000000000006
x20: 0x000000016ec17000 x21: 0x0000000101151f54 x22: 0x0000000101151fb1 x23: 0x43ae9cba3188008e
x24: 0x000000016ec12188 x25: 0x0000000101151f64 x26: 0x0000000103cd1770 x27: 0x000000010417caf0
x28: 0x0000000102e01260 fp: 0x000000016ec12120 lr: 0x000000018070b450
sp: 0x000000016ec12100 pc: 0x0000000180643014 cpsr: 0x00000000