Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-18972] iOS: Map when drag and drop app crash with error: Collection <__NSArrayM: 0x7f9d4f3db720> was mutated while being enumerated.

GitHub Issuen/a
TypeBug
Priorityn/a
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
Labelsn/a
ReporterWilson Liaw
AssigneeUnknown
Created2015-05-30T07:12:59.000+0000
Updated2018-02-28T19:55:32.000+0000

Description

when drag and drop the pin, set callout bubble content will crash the app with error message: {color:red}Collection <__NSArrayM: 0x7f9d4f3db720> was mutated while being enumerated.{color}
var Map = require('ti.map');
var win = Titanium.UI.createWindow();

var mountainView = Map.createAnnotation({
	latitude : 37.390749,
	longitude : -122.081651,
	title : "Appcelerator Headquarters",
	subtitle : 'Mountain View, CA',
	pincolor : Map.ANNOTATION_RED,
	draggable : true,
	myid : 1 // Custom property to uniquely identify this annotation.
});

var mapview = Map.createView({
	mapType : Map.NORMAL_TYPE,
	region : {
		latitude : 37.390749,
		longitude : -122.081651,
		latitudeDelta : 0.01,
		longitudeDelta : 0.01
	},
	animate : true,
	regionFit : true,
	userLocation : true,
	annotations : [mountainView]
});

win.add(mapview);
// Handle click events on any annotations on this map.
mapview.addEventListener('click', function(evt) {
	if (evt.clicksource == 'pin') {
		mountainView.setTitle('Appcelerator Headquarters');
	}
});
win.open();
Thanks

Attachments

FileDateSize
app.js2015-05-30T07:10:14.000+0000903

Comments

  1. Praveen Kodakkad 2016-03-07

    I am also getting the same issue Operating System Name = Mac OS X Version = 10.11.3 Architecture = 64bit CPUs = 4 Memory = 8589934592 Node.js Node.js Version = 0.12.7 npm Version = 2.11.3 Titanium CLI CLI Version = 5.0.6 Titanium SDK SDK Version = 5.2.0.GA SDK Path = /Users/user1/Library/Application Support/Titanium/mobilesdk/osx/5.2.0.GA Target Platform = iphone ------------------------------------------------------------------------------------------------------------------------------------------------------------------ [INFO] : This application is modifying the autolayout engine from a background thread, which can lead to engine corruption and weird crashes. This will cause an exception in a future release. [INFO] : Stack:( [INFO] : 0 CoreFoundation 0x000000018162d918 + 148 [INFO] : 1 libobjc.A.dylib 0x0000000180c9bf80 objc_exception_throw + 56 [INFO] : 2 CoreFoundation 0x000000018162d848 + 0 [INFO] : 3 Foundation 0x00000001820cb2d4 + 88 [INFO] : 4 Foundation 0x0000000181f5199c + 56 [INFO] : 5 Foundation 0x0000000181f4d55c + 260 [INFO] : 6 UIKit 0x00000001864275e0 + 64 [INFO] : 7 UIKit 0x00000001864280f8 + 244 [INFO] : 8 MapKit 0x000000018b515650 + 32 [INFO] : 9 MapKit 0x000000018b516788 + 456 [INFO] : 10 MapKit 0x000000018b5165a4 + 84 [INFO] : 11 MapKit 0x000000018b515474 + 596 [INFO] : 12 MapKit 0x000000018b5151f4 + 240 [INFO] : 13 MapKit 0x000000018b5278cc + 296 [INFO] : 14 Foundation 0x0000000181f3c5e4 + 424 [INFO] : 15 Foundation 0x0000000181f18804 + 304 [INFO] : 16 Foundation 0x0000000181f1832c + 404 [INFO] : 17 Foundation 0x0000000181f1780c + 908 [INFO] : 18 Foundation 0x0000000181f3b5c0 + 268 [INFO] : 19 CoreFoundation 0x0000000181633430 + 144 [INFO] : 20 CoreFoundation 0x0000000181530eb4 + 284 [INFO] : 21 MyApp 0x00000001000b5a9c MyApp + 154268 [INFO] : 22 MyApp 0x00000001000b403c MyApp + 147516 [INFO] : 23 MyApp 0x00000001003d569c MyApp + 3430044 [INFO] : 24 MyApp 0x000000010047069c MyApp + 4064924 [INFO] : 25 MyApp 0x00000001004765d8 MyApp + 4089304 [INFO] : ) [ERROR] : The application has crashed with an uncaught exception 'NSGenericException'. [ERROR] : Reason: [ERROR] : *** Collection <__NSSetM: 0x15d2ceec0> was mutated while being enumerated. [ERROR] : Stack trace: [ERROR] : [ERROR] : 0 CoreFoundation 0x000000018162d900 + 124 [ERROR] : 1 libobjc.A.dylib 0x0000000180c9bf80 objc_exception_throw + 56 [ERROR] : 2 CoreFoundation 0x000000018162d334 + 0 [ERROR] : 3 Foundation 0x0000000181f51404 + 404 [ERROR] : 4 Foundation 0x0000000181f541b0 + 340 [ERROR] : 5 Foundation 0x0000000181f58e6c + 708 [ERROR] : 6 Foundation 0x0000000181f589d8 + 240 [ERROR] : 7 UIKit 0x000000018642ae90 + 176 [ERROR] : 8 UIKit 0x000000018642b384 + 196 [ERROR] : 9 UIKit 0x00000001864263f4 + 268 [ERROR] : 10 UIKit 0x000000018637cdb0 + 80 [ERROR] : 11 UIKit 0x000000018662e698 + 664 [ERROR] : 12 UIKit 0x0000000186318a70 + 96 [ERROR] : 13 UIKit 0x000000018658a584 + 376 [ERROR] : 14 UIKit 0x0000000186aefdc4 + 216 [ERROR] : 15 UIKit 0x000000018658a0a8 + 1272 [ERROR] : 16 UIKit 0x0000000186589af0 + 424 [ERROR] : 17 MapKit 0x000000018b521104 + 416 [ERROR] : 18 MapKit 0x000000018b508230 + 188 [ERROR] : 19 MapKit 0x000000018b53ec28 + 92 [ERROR] : 20 MapKit 0x000000018b503db4 + 268 [ERROR] : 21 MyApp 0x000000010069fcb4 MyApp + 6356148 [ERROR] : 22 MyApp 0x0000000100699afc MyApp + 6331132 [ERROR] : 23 Foundation 0x0000000181fe244c __NSFireDelayedPerform + 428 [ERROR] : 24 CoreFoundation 0x00000001815e55f4 + 28 [ERROR] : 25 CoreFoundation 0x00000001815e5298 + 884 [ERROR] : 26 CoreFoundation 0x00000001815e29ac + 1520 [ERROR] : 27 CoreFoundation 0x0000000181511680 CFRunLoopRunSpecific + 384 [ERROR] : 28 GraphicsServices 0x0000000182a20088 GSEventRunModal + 180 [ERROR] : 29 UIKit 0x0000000186388d90 UIApplicationMain + 204 [ERROR] : 30 MyApp 0x0000000100094e2c MyApp + 20012 [ERROR] : 31 libdyld.dylib 0x00000001810b28b8 + 4 [ERROR] : *** Terminating app due to uncaught exception 'NSGenericException', reason: '*** Collection <__NSSetM: 0x15d2ceec0> was mutated while being enumerated.' [ERROR] : *** First throw call stack: [ERROR] : (0x18162d900 0x180c9bf80 0x18162d334 0x181f51404 0x181f541b0 0x181f58e6c 0x181f589d8 0x18642ae90 0x18642b384 0x1864263f4 0x18637cdb0 0x18662e698 0x186318a70 0x18658a584 0x186aefdc4 0x18658a0a8 0x186589af0 0x18b521104 0x18b508230 0x18b53ec28 0x18b503db4 0x10069fcb4 0x100699afc 0x181fe244c 0x1815e55f4 0x1815e5298 0x1815e29ac 0x181511680 0x182a20088 0x186388d90 0x100094e2c 0x1810b28b8) [ERROR] : This application is modifying the autolayout engine from a background thread, which can lead to engine corruption and weird crashes. This will cause an exception in a future release. [ERROR] : Stack:( [ERROR] : 0 CoreFoundation 0x000000018162d918 + 148 [ERROR] : 1 libobjc.A.dylib 0x0000000180c9bf80 objc_exception_throw + 56 [ERROR] : 2 CoreFoundation 0x000000018162d848 + 0 [ERROR] : 3 Foundation 0x00000001820cb2d4 + 88 [ERROR] : 4 Foundation 0x0000000181f4d47c + 36 [ERROR] : 5 UIKit 0x00000001864275e0 + 64 [ERROR] : 6 UIKit 0x00000001864280f8 + 244 [ERROR] : 7 UIKit 0x0000000186b8eb74 + 352 [ERROR] : 8 UIKit 0x0000000186b8e95c + 296 [ERROR] : 9 MapKit 0x000000018b515684 + 84 [ERROR] : 10 MapKit 0x000000018b516788 + 456 [ERROR] : 11 MapKit 0x000000018b5165a4 + 84 [ERROR] : 12 MapKit 0x000000018b515474 + 596 [ERROR] : 13 MapKit 0x000000018b5151f4 + 240 [ERROR] : 14 MapKit 0x000000018b5278cc + 296 [ERROR] : 15 Foundation 0x0000000181f3c5e4 + 424 [ERROR] : 16 Foundation 0x0000000181f18804 + 304 [ERROR] : 17 Foundation 0x0000000181f1832c + 404 [ERROR] : 18 Foundation 0x0000000181f1780c + 908 [ERROR] : 19 Foundation 0x0000000181f3b5c0 + 268 [ERROR] : 20 CoreFoundation 0x0000000181633430 + 144 [ERROR] : 21 CoreFoundation 0x0000000181530eb4 + 284 [ERROR] : 22 MyApp 0x00000001000b5a9c MyApp + 154268 [ERROR] : 23 MyApp 0x00000001000b403c MyApp + 147516 [ERROR] : 24 MyApp 0x00000001003d569c MyApp + 3430044 [ERROR] : 25 MyApp 0x000000010047069c MyApp + 4064924 [ERROR] : 26 MyApp 0x00000001004765d8 MyApp + 4089304 [ERROR] : )

JSON Source