{ "id": "129029", "key": "AC-900", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2014-04-23T04:40:15.000+0000", "created": "2014-04-15T08:27:20.000+0000", "labels": [ "crash", "ios", "mobile", "titanium" ], "versions": [], "issuelinks": [], "assignee": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2016-03-08T07:37:12.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "Hi\r\nOur crash reports tool logs frequently the application crashes when app is being resumed. You may see the details on the log below.\r\n\r\nThe logs point to AppModule.m line 221, where inside the fireEvent method the mutable collection (array) is iterated. As far as we could not reproduce this bug we suppose there are more than one thread that access this method and try to modify and iterate over the same array simultaneously. According to this, one of the reasonable fix is to put the piece of code that treats array in a synchronized statement block by means of @synchronized(array).\r\nDo you find this fix appropriate? Or maybe you could suggest other solutions?\r\n\r\n\r\n\r\nLOGS:\r\n\r\nFatal Exception: NSGenericException\r\n*** Collection <__NSArrayM: 0x15f74420> was mutated while being enumerated.\r\n \r\nAppModule.m line 221\r\n-[AppModule fireEvent:]\r\n \r\n \r\n \r\nThread : Fatal Exception: NSGenericException\r\n0 CoreFoundation 0x2d857fd3 __exceptionPreprocess + 130\r\n1 libobjc.A.dylib 0x38004ccf objc_exception_throw + 38\r\n2 CoreFoundation 0x2d857ad1 -[NSException name]\r\n3 Shopmium 0x001823b1 -[AppModule fireEvent:] (AppModule.m:221)\r\n4 CoreFoundation 0x2d81a1f1 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12\r\n5 CoreFoundation 0x2d78e57f _CFXNotificationPost + 1718\r\n6 Foundation 0x2e178a3d -[NSNotificationCenter postNotificationName:object:userInfo:] + 76\r\n7 Foundation 0x2e17d31b -[NSNotificationCenter postNotificationName:object:] + 30\r\n8 Shopmium 0x001b25e9 -[TiApp applicationWillEnterForeground:] (TiApp.m:793)\r\n9 UIKit 0x302d4c77 -[UIApplication _sendWillEnterForegroundCallbacks] + 94\r\n10 UIKit 0x3027a1b5 -[UIApplication _handleApplicationResumeEvent:] + 1148\r\n11 UIKit 0x30079085 -[UIApplication handleEvent:withNewEvent:] + 1872\r\n12 UIKit 0x30078871 -[UIApplication sendEvent:] + 72\r\n13 UIKit 0x300dccc9 _UIApplicationHandleEvent + 616\r\n14 GraphicsServices 0x32691aed _PurpleEventCallback + 608\r\n15 GraphicsServices 0x326916d7 PurpleEventCallback + 34\r\n16 CoreFoundation 0x2d822ab7 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 34\r\n17 CoreFoundation 0x2d822a53 __CFRunLoopDoSource1 + 346\r\n18 CoreFoundation 0x2d821227 __CFRunLoopRun + 1398\r\n19 CoreFoundation 0x2d78bf4f CFRunLoopRunSpecific + 522\r\n20 CoreFoundation 0x2d78bd33 CFRunLoopRunInMode + 106\r\n21 GraphicsServices 0x32690663 GSEventRunModal + 138\r\n22 UIKit 0x300d716d UIApplicationMain + 1136\r\n23 Shopmium 0x000d73c3 main (main.m:36)\r\n24 libdyld.dylib 0x38511ab7 start + 2", "attachment": [], "flagged": false, "summary": "Application crashes on resume", "creator": { "name": "anastasia", "key": "anastasia", "displayName": "Anastasia KRYUKOVA", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "anastasia", "key": "anastasia", "displayName": "Anastasia KRYUKOVA", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "SDK version : 3.2.1.GA\r\nOS: ios7 (90% of crashes), ios6 (10% of crashes)\r\n97% of crashes are raised by iphone, rather then ipods", "comment": { "comments": [ { "id": "301219", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "We do not want to synchronize an array unless we really want to restrict access to it by a single thread. We would need a simple test case to reproduce this issue so that we can identify the root cause and come up with a proper solution.", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-04-17T06:33:52.000+0000", "updated": "2014-04-17T06:33:52.000+0000" }, { "id": "302126", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Resolving this issue as we cannot reproduce this issue and reporter has not provided a test case.", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-04-23T04:40:15.000+0000", "updated": "2014-04-23T04:40:15.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }