{ "id": "140082", "key": "AC-1652", "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": "8", "description": "", "name": "Needs more info" }, "resolutiondate": "2015-09-29T01:01:27.000+0000", "created": "2014-11-20T10:07:18.000+0000", "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2016-03-08T07:38:08.000+0000", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "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": "After a number of large downloads made via TiHTTPClient the application crashes on RAM allocation. It's almost like it's keeping the whole downloaded data in memory and not freeing it.\r\n\r\n{code}\r\nERROR] : The application has crashed with an uncaught exception 'NSInvalidArgumentException'.\r\n[ERROR] : Reason:\r\n[ERROR] : *** NSAllocateMemoryPages(236102400) failed\r\n[ERROR] : Stack trace:\r\n[ERROR] : \r\n[ERROR] : 0 CoreFoundation 0x24d3fe3f + 126\r\n[ERROR] : 1 libobjc.A.dylib 0x327f3c8b objc_exception_throw + 38\r\n[ERROR] : 2 CoreFoundation 0x24d3fd85 + 0\r\n[ERROR] : 3 Foundation 0x259ec989 NSAllocateMemoryPages + 92\r\n[ERROR] : 4 Foundation 0x259c4561 + 24\r\n[ERROR] : 5 Foundation 0x25993c09 + 220\r\n[ERROR] : 6 Foundation 0x25993b23 + 78\r\n[ERROR] : 7 Foundation 0x259a151b + 118\r\n[ERROR] : 8 Museo900 0x0029466b Museo900 + 1807979\r\n[ERROR] : 9 Museo900 0x0029472d Museo900 + 1808173\r\n[ERROR] : 10 Museo900 0x00296705 Museo900 + 1816325\r\n[ERROR] : 11 CFNetwork 0x2489d5a1 + 56\r\n[ERROR] : 12 Foundation 0x25a39ae1 + 8\r\n[ERROR] : 13 Foundation 0x259a4b7d + 148\r\n[ERROR] : 14 Foundation 0x25997337 + 774\r\n[ERROR] : 15 Foundation 0x25a3c44b + 186\r\n[ERROR] : 16 libdispatch.dylib 0x32d5b651 + 952\r\n[ERROR] : 17 libdispatch.dylib 0x32d5609d + 84\r\n[ERROR] : 18 libdispatch.dylib 0x32d5cba1 + 320\r\n[ERROR] : 19 libdispatch.dylib 0x32d5dcd7 + 94\r\n[ERROR] : 20 libsystem_pthread.dylib 0x32eb4e31 _pthread_wqthread + 668\r\n[ERROR] : 21 libsystem_pthread.dylib 0x32eb4b84 start_wqthread + 8\r\n[ERROR] : *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** NSAllocateMemoryPages(236102400) failed'\r\n[ERROR] : *** First throw call stack:\r\n{code}\r\n\r\nAnother stack, different (small) download size:\r\n{code}\r\n[ERROR] The application has crashed with an uncaught exception 'NSInvalidArgumentException'.\r\nReason:\r\n*** NSAllocateMemoryPages(183259200) failed\r\nStack trace:\r\n0 CoreFoundation 0x24d3fe3f + 126\r\n1 libobjc.A.dylib 0x327f3c8b objc_exception_throw + 38\r\n2 CoreFoundation 0x24d3fd85 + 0\r\n3 Foundation 0x259ec989 NSAllocateMemoryPages + 92\r\n4 Foundation 0x259c4561 + 24\r\n5 Foundation 0x25993c09 + 220\r\n6 Foundation 0x25993b23 + 78\r\n7 Foundation 0x259a151b + 118\r\n8 Museo900 0x0038733b Museo900 + 2753339\r\n9 Museo900 0x003873fd Museo900 + 2753533\r\n10 Museo900 0x003893d5 Museo900 + 2761685\r\n11 CFNetwork 0x2489d5a1 + 56\r\n{code}\r\n\r\n\r\n", "attachment": [], "flagged": false, "summary": "iOS: Large or multiple downloads crash the app with NSInvalidArgumentException", "creator": { "name": "s.stefanek", "key": "s.stefanek", "displayName": "Szymon Tomasz Stefanek", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "s.stefanek", "key": "s.stefanek", "displayName": "Szymon Tomasz Stefanek", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "iOS 8\r\nTitanium 3.4.0 GA", "comment": { "comments": [ { "id": "333035", "author": { "name": "s.stefanek", "key": "s.stefanek", "displayName": "Szymon Tomasz Stefanek", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I should add that:\r\n\r\n- the very same code works reliably on Android (tried different devices)\r\n- the out-of-memory condition can't be handled from javascript in any way\r\n- limiting the number of concurrent downloads to 1 avoids the problem", "updateAuthor": { "name": "s.stefanek", "key": "s.stefanek", "displayName": "Szymon Tomasz Stefanek", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-11-20T10:45:20.000+0000", "updated": "2014-11-20T10:45:20.000+0000" }, { "id": "333184", "author": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "body": "Please provide a test case to reproduce this problem, Thanks", "updateAuthor": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "created": "2014-11-21T06:03:13.000+0000", "updated": "2014-11-21T06:03:13.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }