Project: titanium
Issue TIMOB-19249: iOS: ListView randomly crashes the App
App crashes at some point when repeatedly opening and closing win2. Please find the attached source code to reproduce the issue. Also check the video I recorded to see the crash. Somebody mentioned that it did not happen in Ti 4.0 GA - see below [JIRA|https://jira.appcelerator.org/browse/TIMOB-19214] See error below {code:java} [ERROR] : The application has crashed with an uncaught exception 'NSGenericExce ption'. [ERROR] : Reason: [ERROR] : *** Collection <__NSArrayM: 0x7c9ae850> was mutated while being enume rated. [ERROR] : Stack trace: [ERROR] : [ERROR] : 0 CoreFoundation 0x04fc272a __exceptionPreproc ess + 154 [ERROR] : 1 libobjc.A.dylib 0x04b95a97 objc_exception_thr ow + 44 [ERROR] : 2 CoreFoundation 0x04fc1fe6 __NSFastEnumeratio nMutationHandler + 166 [ERROR] : 3 bug_reporter_alloy 0x00112dd6 DoProxyDelegateRea dValuesWithKeysFromProxy + 1110 [ERROR] : 4 bug_reporter_alloy 0x000adde1 -[TiUIView readPro xyValuesWithKeys:] + 65 [ERROR] : 5 bug_reporter_alloy 0x00084697 -[TiViewProxy fire PropertyChanges] + 167 [ERROR] : 6 bug_reporter_alloy 0x00082222 -[TiViewProxy view ] + 706 [ERROR] : 7 bug_reporter_alloy 0x002ca5bd -[TiUIListViewProx y listView] + 45 [ERROR] : 8 bug_reporter_alloy 0x002cb994 __34-[TiUIListView Proxy setTemplates:]_block_invoke139 + 52 [ERROR] : 9 bug_reporter_alloy 0x0015034c __TiThreadPerformO nMainThread_block_invoke + 60 [ERROR] : 10 bug_reporter_alloy 0x001507c0 TiThreadProcessPen dingMainThreadBlocks + 528 [ERROR] : 11 bug_reporter_alloy 0x00150599 __TiThreadPerformO nMainThread_block_invoke212 + 57 [ERROR] : 12 libdispatch.dylib 0x05761d8a _dispatch_call_blo ck_and_release + 15 [ERROR] : 13 libdispatch.dylib 0x0577eecf _dispatch_client_c allout + 14 [ERROR] : 14 libdispatch.dylib 0x05767ee3 _dispatch_main_que ue_callback_4CF + 677 [ERROR] : 15 CoreFoundation 0x04f1b8ee __CFRUNLOOP_IS_SER VICING_THE_MAIN_DISPATCH_QUEUE__ + 14 [ERROR] : 16 CoreFoundation 0x04ed95f0 __CFRunLoopRun + 2 256 [ERROR] : 17 CoreFoundation 0x04ed8a5b CFRunLoopRunSpecif ic + 443 [ERROR] : 18 CoreFoundation 0x04ed888b CFRunLoopRunInMode + 123 [ERROR] : 19 GraphicsServices 0x054c12c9 GSEventRunModal + 192 [ERROR] : 20 GraphicsServices 0x054c1106 GSEventRun + 104 [ERROR] : 21 UIKit 0x01853106 UIApplicationMain + 1526 [ERROR] : 22 bug_reporter_alloy 0x0003bfb8 main + 408 [ERROR] : 23 libdyld.dylib 0x057a4ac9 start + 1 [ERROR] : [ERROR] : 2015-07-21 21:42:40.663 bug_reporter_alloy[8326:51688] *** Terminatin g app due to uncaught exception 'NSGenericException', reason: '*** Collection <_ _NSArrayM: 0x7c9ae850> was mutated while being enumerated.' [ERROR] : *** First throw call stack: [ERROR] : ( [ERROR] :	0 CoreFoundation 0x04fc2746 __exceptionPrepro cess + 182 [ERROR] :	1 libobjc.A.dylib 0x04b95a97 objc_exception_th row + 44 [ERROR] :	2 CoreFoundation 0x04fc1fe6 __NSFastEnumerati onMutationHandler + 166 [ERROR] :	3 bug_reporter_alloy 0x00112dd6 DoProxyDelegateRe adValuesWithKeysFromProxy + 1110 [ERROR] :	4 bug_reporter_alloy 0x000adde1 -[TiUIView readPr oxyValuesWithKeys:] + 65 [ERROR] :	5 bug_reporter_alloy 0x00084697 -[TiViewProxy fir ePropertyChanges] + 167 [ERROR] :	6 bug_reporter_alloy 0x00082222 -[TiViewProxy vie w] + 706 [ERROR] :	7 bug_reporter_alloy 0x002ca5bd -[TiUIListViewPro xy listView] + 45 [ERROR] :	8 bug_reporter_alloy 0x002cb994 __34-[TiUIListVie wProxy setTemplates:]_block_invoke139 + 52 [ERROR] :	9 bug_reporter_alloy 0x0015034c __TiThreadPerform OnMainThread_block_invoke + 60 [ERROR] :	10 bug_reporter_alloy 0x001507c0 TiThreadProcessPe ndingMainThreadBlocks + 528 [ERROR] :	11 bug_reporter_alloy 0x00150599 __TiThreadPerform OnMainThread_block_invoke212 + 57 [ERROR] :	12 libdispatch.dylib 0x05761d8a _dispatch_call_bl ock_and_release + 15 [ERROR] :	13 libdispatch.dylib 0x0577eecf _dispatch_client_ callout + 14 [ERROR] :	14 libdispatch.dylib 0x05767ee3 _dispatch_main_qu eue_callback_4CF + 677 [ERROR] :	15 CoreFoundation 0x04f1b8ee __CFRUNLOOP_IS_SE RVICING_THE_MAIN_DISPATCH_QUEUE__ + 14 [ERROR] :	16 CoreFoundation 0x04ed95f0 __CFRunLoopRun + 2256 [ERROR] :	17 CoreFoundation 0x04ed8a5b CFRunLoopRunSpeci fic + 443 [ERROR] :	18 CoreFoundation 0x04ed888b CFRunLoopRunInMod e + 123 [ERROR] :	19 GraphicsServices 0x054c12c9 GSEventRunModal + 192 [ERROR] :	20 GraphicsServices 0x054c1106 GSEventRun + 104 [ERROR] :	21 UIKit 0x01853106 UIApplicationMain + 1526 [ERROR] :	22 bug_reporter_alloy 0x0003bfb8 main + 408 [ERROR] :	23 libdyld.dylib 0x057a4ac9 start + 1 [ERROR] : ) [ERROR] : libc++abi.dylib: terminating with uncaught exception of type NSExcept ion {code}
Story points: 5