{ "id": "122285", "key": "TIMOB-16201", "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": { "id": "2", "description": "The problem described is an issue which will never be fixed.", "name": "Won't Fix" }, "resolutiondate": "2017-07-26T04:15:56.000+0000", "created": "2013-11-11T11:18:53.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-07-26T04:15:56.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": [], "description": "cocoafish crashes when you execute the requests with multi-thread.\r\nAccording to Apple's documents, it says below.\r\n\r\n\"Note: NSDateFormatter is not thread safe, so you must not mutate a given date formatter simultaneously from multiple threads.\"\r\n\r\ncocoa fish's class is instantiate as following;\r\nNSOperation > ASIHTTPRequest > ASIFormDataRequest > CCRequest \r\n\r\nIt means cocoa fish execute in multi-thread even though it should not be. So it happens crash.\r\n\r\n\r\n[CCObject.m Line:42]\r\n\r\nNSString *dateString = [jsonResponse objectForKey:CC_JSON_CREATED_AT];\r\nif (dateString) {\r\nself.createdAt = [[[Cocoafish defaultCocoafish] jsonDateFormatter] dateFromString:dateString];\r\n}\r\n\r\ndateString = [jsonResponse objectForKey:CC_JSON_UPDATED_AT];\r\nif (dateString) {\r\nself.updatedAt = [[[Cocoafish defaultCocoafish] jsonDateFormatter] dateFromString:dateString];\r\n}\r\n\r\n\r\nWe struggle to solve this problem. And we reached the following solution.\r\n\r\n\r\n NSDateFormatter *dateFormatter = [[[Cocoafish defaultCocoafish] jsonDateFormatter] copy];\r\nNSString *dateString = [jsonResponse objectForKey:CC_JSON_CREATED_AT];\r\nif (dateString) {\r\nself.createdAt = [dateFormatter dateFromString:dateString];\r\n}\r\n\r\ndateString = [jsonResponse objectForKey:CC_JSON_UPDATED_AT];\r\nif (dateString) {\r\nself.updatedAt = [dateFormatter dateFromString:dateString];\r\n}\r\n [dateFormatter release];\r\n\r\n\r\nI hope cocoafish will be maintained and updated.\r\n\r\n", "attachment": [], "flagged": false, "summary": "ACS: cocoafish crashes when you execute the requests with multi-thread", "creator": { "name": "kaz_konno", "key": "kaz_konno", "displayName": "kazuaki konno", "active": true, "timeZone": "Asia/Tokyo" }, "subtasks": [], "reporter": { "name": "kaz_konno", "key": "kaz_konno", "displayName": "kazuaki konno", "active": true, "timeZone": "Asia/Tokyo" }, "environment": null, "comment": { "comments": [ { "id": "280468", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "Hello Kazuaki,\r\ncan you please provide a test case for this? If you have the one that generated the logs, will be awesome. \r\n\r\nBest,\r\nMauro ", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2013-11-21T02:19:17.000+0000", "updated": "2013-11-21T02:19:17.000+0000" }, { "id": "280693", "author": { "name": "kaz_konno", "key": "kaz_konno", "displayName": "kazuaki konno", "active": true, "timeZone": "Asia/Tokyo" }, "body": "Attached is test project.\nIt will crash with iPhone4 iOS5.1.1 using Xcode5.\nPlease set your AppKey to the project.\n\nHere is the test project.\nhttps://skydrive.live.com/redir?resid=D37D16E469EB75CA%215954", "updateAuthor": { "name": "kaz_konno", "key": "kaz_konno", "displayName": "kazuaki konno", "active": true, "timeZone": "Asia/Tokyo" }, "created": "2013-11-22T02:32:28.000+0000", "updated": "2013-11-22T02:32:28.000+0000" }, { "id": "280694", "author": { "name": "kaz_konno", "key": "kaz_konno", "displayName": "kazuaki konno", "active": true, "timeZone": "Asia/Tokyo" }, "body": "Hi Mauro, Shak,\n\nI hope it will help.\n\nkaz\n", "updateAuthor": { "name": "kaz_konno", "key": "kaz_konno", "displayName": "kazuaki konno", "active": true, "timeZone": "Asia/Tokyo" }, "created": "2013-11-22T02:33:14.000+0000", "updated": "2013-11-22T02:33:14.000+0000" }, { "id": "282297", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "Hello Kaz,\nthanks for the testcase, I will reviewing this one and moving it shortly. \n\nBest,\n\nMauro ", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2013-12-04T00:14:47.000+0000", "updated": "2013-12-04T00:14:47.000+0000" }, { "id": "424738", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing due to inactivity. If this issue still exists, please raise a new ticket.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-07-26T04:15:56.000+0000", "updated": "2017-07-26T04:15:56.000+0000" } ], "maxResults": 9, "total": 9, "startAt": 0 } } }