Project: titanium
Issue TIMOB-17659: iOS: map camera encounters "Collection <__NSArrayM: 0x16460ef0> was mutated while being enumerated"
Homes.com is encountering the below error when toggling between annotations on a map when using the map camera. See their message here: "The issue pertains to centering the map on top of an annotation after it is clicked. The idea is that when a user clicks on a map annotation, the map will move over the annotation and then a custom popup will load over the annotation. We were able to make the map pan over an annotation by updating the map region. However, because specifications provided required that the map be zoomed in a lot closer to the pins, it meant that we had to use the map camera on iOS. Doing this lead to the issue we are now experiencing. Please find attached a copy of a simple project that shows this issue and a copy of the error log we get. Also, the error that we get has only happened on the device and not in the simulator." Below is the crash as I encounter it. Attached is the sample project and the customer's log. {code} [ERROR] : Script Error { [ERROR] : backtrace = "#0 () at :621"; [ERROR] : line = 42; [ERROR] : message = "*** Collection <__NSArrayM: 0x16460ef0> was mutated while being enumerated."; [ERROR] : sourceId = 59385408; [ERROR] : } [ERROR] : The application has crashed with an uncaught exception 'NSGenericException'. [ERROR] : Reason: [ERROR] : *** Collection <__NSArrayM: 0x16460ef0> was mutated while being enumerated. [ERROR] : Stack trace: [ERROR] : [ERROR] : 0 CoreFoundation 0x2fd70e83 + 130 [ERROR] : 1 libobjc.A.dylib 0x3a0cd6c7 objc_exception_throw + 38 [ERROR] : 2 CoreFoundation 0x2fd70971 + 0 [ERROR] : 3 MapKit 0x30f0da31 + 132 [ERROR] : 4 MapKit 0x30f0d987 + 26 [ERROR] : 5 MapKit 0x30f29151 + 1736 [ERROR] : 6 MapKit 0x30f2a91d + 80 [ERROR] : 7 VectorKit 0x377729a7 + 66 [ERROR] : 8 VectorKit 0x37784383 + 862 [ERROR] : 9 VectorKit 0x37783ff7 + 142 [ERROR] : 10 QuartzCore 0x321cbad3 + 98 [ERROR] : 11 QuartzCore 0x321cb87d + 344 [ERROR] : 12 IOMobileFramebuffer 0x34dfb76d + 104 [ERROR] : 13 IOKit 0x30a52be5 IODispatchCalloutFromCFMessage + 248 [ERROR] : 14 CoreFoundation 0x2fd30b81 + 136 [ERROR] : 15 CoreFoundation 0x2fd3b777 + 34 [ERROR] : 16 CoreFoundation 0x2fd3b713 + 346 [ERROR] : 17 CoreFoundation 0x2fd39edf + 1406 [ERROR] : 18 CoreFoundation 0x2fca4471 CFRunLoopRunSpecific + 524 [ERROR] : 19 CoreFoundation 0x2fca4253 CFRunLoopRunInMode + 106 [ERROR] : 20 GraphicsServices 0x349de2eb GSEventRunModal + 138 [ERROR] : 21 UIKit 0x32559845 UIApplicationMain + 1136 [ERROR] : 22 homes test 0x0003f573 homes test + 34163 [ERROR] : 23 libdyld.dylib 0x3a5c6ab7 + 2 [ERROR] : *** First throw call stack: [ERROR] : (0x2fd70e83 0x3a0cd6c7 0x2fd70971 0x30f0da31 0x30f0d987 0x30f29151 0x30f2a91d 0x377729a7 0x37784383 0x37783ff7 0x321cbad3 0x321cb87d 0x34dfb76d 0x30a52be5 0x2fd30b81 0x2fd3b777 0x2fd3b713 0x2fd39edf 0x2fca4471 0x2fca4253 0x349de2eb 0x32559845 0x3f573 0x3a5c6ab7) {code}
Story points: 5