{ "id": "103831", "key": "TIMOB-13333", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": null, "resolutiondate": null, "created": "2012-10-24T09:08:32.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "layer", "proxy", "thread", "view" ], "versions": [], "issuelinks": [], "assignee": null, "updated": "2018-02-28T20:04:22.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "My app is doing pretty fast animations. Especially depending on user interaction, views can be very quickly animated, modified (visibility, opacity).\r\nRecently i have been facing a lot of crash:\r\n{code}\r\nCollection was mutated while being enumerated.\r\n{code}\r\nI have been trying to to the depth of that bug. This what i have found.\r\nI post as an image the callstack in xcode.\r\n\r\nWhat i can say is that the bug is appearing when processing a\r\n{code}\r\nview.visible = true\r\n{code}\r\nin my script.\r\n\r\nWhat i think is happening is that we try to change the hidden property of a layer while modifying the layers stack (insertSubview in TiViewProxy).\r\n\r\nI have also been looking on the web for this one and i have found a post related to that\r\nhttp://stackoverflow.com/questions/1711700/iphone-ui-addsubview-causing-concurrency-exception\r\n\r\nI have been trying to create a simple example of this without success. And i cant post the code of my app.\r\n\r\nWill still try to find a test case.\r\nYet i think we already have enough information to understand that bug, and so start working onit.", "attachment": [ { "id": "32929", "filename": "Screen Shot 2012-10-24 at 11.03.39 AM.png", "author": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "created": "2012-10-24T09:08:32.000+0000", "size": 90790, "mimeType": "image/png" } ], "flagged": false, "summary": "iOS: setting view property cause \"Collection was mutated while being enumerated.”", "creator": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "environment": "titanium 3.1.0 master\r\nios sdk 6.0", "comment": { "comments": [ { "id": "224795", "author": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "body": "So i keep on working on this one. This is what i have now.\nWhat is happening is that [TiUIView::setVisible_|https://github.com/appcelerator/titanium_mobile/blob/master/iphone/Classes/TiUIView.m#L561]\nis called while that view in is parent in [TiViewProxy::insertSubview|https://github.com/appcelerator/titanium_mobile/blob/master/iphone/Classes/TiViewProxy.m#L2121]\nI have tried using @synchronized without success. I need help on this.\n", "updateAuthor": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "created": "2012-10-24T12:42:20.000+0000", "updated": "2012-10-24T12:42:20.000+0000" }, { "id": "228792", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Martin, can you please confirm this also happens on 3.0.0?", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-11-28T03:20:48.000+0000", "updated": "2012-11-28T03:20:48.000+0000" }, { "id": "229281", "author": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "body": "i can confirm it WASN'T happening in 3.0.0, at least at githash 484f237", "updateAuthor": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "created": "2012-11-30T13:32:12.000+0000", "updated": "2012-11-30T13:32:12.000+0000" }, { "id": "242481", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Try setting opacity to 0 instead and see if that solves the issue for now.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-03-15T18:17:37.000+0000", "updated": "2013-03-15T18:17:37.000+0000" }, { "id": "242672", "author": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "body": "Actually i think i fixed this in my branch. Will have to look through the code to find the solution :s\r\n\r\nEDIT: also i cant use opacity = 0. i actually use a combination of opacity and visibility. They dont have the same meaning", "updateAuthor": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "created": "2013-03-18T15:32:18.000+0000", "updated": "2013-03-18T15:57:25.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }