{ "id": "137310", "key": "TIMOB-17826", "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": [ { "id": "16586", "description": "Release 3.4.2", "name": "Release 3.4.2", "archived": false, "released": true, "releaseDate": "2017-03-11" }, { "id": "16704", "description": "Release 3.5.0", "name": "Release 3.5.0", "archived": false, "released": true, "releaseDate": "2015-01-13" }, { "id": "16593", "description": "Release 4.0.0", "name": "Release 4.0.0", "archived": false, "released": true, "releaseDate": "2015-05-21" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-11-27T10:12:00.000+0000", "created": "2014-09-27T16:17:34.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "TCSupportTriage", "analytics", "device", "iad", "ios", "module_analytics", "qe-manualtest" ], "versions": [ { "id": "15972", "description": "Release 3.4.0", "name": "Release 3.4.0", "archived": false, "released": true, "releaseDate": "2014-09-28" } ], "issuelinks": [], "assignee": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2014-11-27T10:12:00.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "If you disable the analytics in tiapp.xml and then try to use iAds it will crash with the following log:\r\n{code}\r\n[ERROR] The application has crashed with an uncaught exception 'NSInvalidArgumentException'.\r\n[ERROR] Reason:\r\n[ERROR] *** setObjectForKey: object cannot be nil (key: sid)\r\n[ERROR] Stack trace:\r\n[ERROR] \r\n[ERROR] 0 CoreFoundation 0x240eae3f + 126\r\n[ERROR] 1 libobjc.A.dylib 0x31798c8b objc_exception_throw + 38\r\n[ERROR] 2 CoreFoundation 0x24008ec3 + 850\r\n[ERROR] 3 Comnio 0x0022de8f Comnio + 1871503\r\n[ERROR] 4 Comnio 0x0022febd Comnio + 1879741\r\n[ERROR] 5 Foundation 0x24de4ae1 + 8\r\n[ERROR] 6 Foundation 0x24d4fb7d + 148\r\n[ERROR] 7 Foundation 0x24d42337 + 774\r\n[ERROR] 8 Foundation 0x24de744b + 186\r\n[ERROR] 9 libdispatch.dylib 0x31d00651 + 952\r\n[ERROR] 10 libdispatch.dylib 0x31cfb09d + 84\r\n[ERROR] 11 libdispatch.dylib 0x31d01ba1 + 320\r\n[ERROR] 12 libdispatch.dylib 0x31d02cd7 + 94\r\n[ERROR] 13 libsystem_pthread.dylib 0x31e59e31 _pthread_wqthread + 668\r\n[ERROR] 14 libsystem_pthread.dylib 0x31e59b84 start_wqthread + 8\r\n[ERROR] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** setObjectForKey: object cannot be nil (key: sid)'\r\n[ERROR] *** First throw call stack:\r\n[ERROR] (0x240eae3f 0x31798c8b 0x24008ec3 0x22de8f 0x22febd 0x24de4ae1 0x24d4fb7d 0x24d42337 0x24de744b 0x31d00651 0x31cfb09d 0x31d01ba1 0x31d02cd7 0x31e59e31 0x31e59b84)\r\n^C \r\n\r\n{code}\r\n\r\nThe only place where I see an object with a key \"sid\" is the Geolocation module\r\n\r\nhttps://github.com/appcelerator/titanium_mobile/blob/ad9eea392dd7b0820c1b5f65c9147cf1ce4c8662/iphone/Classes/GeolocationModule.m#L525\r\n\r\nthat asks for a Ti.App.sessionId that seems to be set by the analytics.\r\n\r\nPutting back analytics to true in tiapp.xml fixes the issue, however it is not ok. \r\n\r\nHow to reproduce:\r\n1. Disable analytics in tiapp.xml\r\n{code}\r\nfalse\r\n{code}\r\n\r\n2. Add this is alloy.js (or anywhere)\r\n{code}\r\n\r\niad = Titanium.UI.iOS.createAdView({\r\n\tadSize: Titanium.UI.iOS.AD_SIZE_PORTRAIT\r\n});\r\n\r\n{code}\r\n\r\n", "attachment": [ { "id": "52144", "filename": "monkey_console.txt", "author": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-10-23T22:42:14.000+0000", "size": 1419, "mimeType": "text/plain" }, { "id": "52145", "filename": "monkey_no_analytics.crash", "author": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-10-23T22:42:14.000+0000", "size": 43942, "mimeType": "application/octet-stream" } ], "flagged": false, "summary": "iOS: Disabling analytics in tiapp.xml leads to iads crash on device", "creator": { "name": "rborn", "key": "rborn", "displayName": "Dan Tamas", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "rborn", "key": "rborn", "displayName": "Dan Tamas", "active": true, "timeZone": "Europe/Berlin" }, "environment": "device only, iOs 7, iOs 8, Ti SDK 3.3.0.GA and 3.4.X", "closedSprints": [ { "id": 126, "state": "closed", "name": "2018 Sprint 05 SDK", "startDate": "2018-02-25T19:38:08.926Z", "endDate": "2018-03-11T18:38:00.000Z", "completeDate": "2018-03-11T22:06:01.520Z", "originBoardId": 100 } ], "comment": { "comments": [ { "id": "325987", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "That might even imply just geolocation module by itself only works with analyics enabled. Have you tested that?\r\n\r\nThe {{Ti.App.sessionId}} is not set by analytics, but \"just\" an UUID set on boot:\r\n\r\nhttps://github.com/appcelerator/titanium_mobile/blob/ad9eea392dd7b0820c1b5f65c9147cf1ce4c8662/iphone/Classes/TiApp.m#L181", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2014-09-27T17:49:12.000+0000", "updated": "2014-09-27T17:51:48.000+0000" }, { "id": "326100", "author": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi [~rborn],\r\n\r\nWe haven't been able to reproduce your issue using the instructions above.\r\nBelow is a small sample that we have used to test for the crash when `analytics` is false on device. Please run it and let us know if `reateAdView` or `forwardGeocoder` cause the crash (If the issue was coming from geolocation then it should happen when calling `forwardGeocoder`). If this sample doesn't work, please include a sample that we can use to reproduce the issue.\r\n\r\nAlso, what devices is this happening on?\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: \"#FFF\"\r\n});\r\nwin.open();\r\n\r\nwin.addEventListener('click', function() {\r\n console.log('click');\r\n // Titanium.Geolocation.forwardGeocoder(\"440 N Bernardo Ave\", function(evt) {\r\n // console.log(\"callback\");\r\n // console.log(JSON.stringify(evt));\r\n // });\r\n\r\n var iad = Titanium.UI.iOS.createAdView({\r\n adSize: Titanium.UI.iOS.AD_SIZE_PORTRAIT\r\n });\r\n win.add(iad);\r\n});\r\n{code}\r\n", "updateAuthor": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-09-29T16:45:27.000+0000", "updated": "2014-09-29T16:46:42.000+0000" }, { "id": "326319", "author": { "name": "rborn", "key": "rborn", "displayName": "Dan Tamas", "active": true, "timeZone": "Europe/Berlin" }, "body": "Sorry for the late reply\r\n\r\nI'm using few modules\r\n{code}\r\n\r\n com.widbook.blur\r\n dk.napp.social\r\n ti.admob\r\n facebook\r\n ti.admob\r\n facebook\r\n com.tripvi.drawerlayout\r\n bencoding.securely\r\n bencoding.securely\r\n de.marcelpociot.autofocus\r\n \r\n{code} \r\n\r\nI will try to run your test app with and without the modules, and mine as well to see if there is any of the modules that does this.\r\n", "updateAuthor": { "name": "rborn", "key": "rborn", "displayName": "Dan Tamas", "active": true, "timeZone": "Europe/Berlin" }, "created": "2014-09-30T10:28:24.000+0000", "updated": "2014-09-30T10:28:24.000+0000" }, { "id": "327135", "author": { "name": "sfeather", "key": "sfeather", "displayName": "Stephen Feather", "active": true, "timeZone": "America/New_York" }, "body": "h4.Crittercism crash report (see symbolicated below)\r\n{code}\r\nName: NSInvalidArgumentException\r\nReason: *** setObjectForKey: object cannot be nil (key: sid)\r\nApp Version: 2.0.5\r\nDevice: iPhone 6 (don't know if 6 or 6+)\r\niOS Version: 8.0.2\r\nReported: 2014-10-07 13:40:1412689212\r\nUser: Anon.\r\n\r\nStack Trace:\r\n\r\n0\tCoreFoundation\t0x2c078e3f __exceptionPreprocess + 127\r\n1\tlibobjc.A.dylib\t0x39797c8b objc_exception_throw + 36\r\n2\tCoreFoundation\t0x2bf96ec3 -[__NSDictionaryM setObject:forKey:] + 848\r\n3\tUinterview\t0x001c7627 0x000db000 + 968231\r\n4\tUinterview\t0x001c9655 0x000db000 + 976469\r\n5\tFoundation\t0x2cd72ae1 __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 6\r\n6\tFoundation\t0x2ccddb7d -[NSBlockOperation main] + 146\r\n7\tFoundation\t0x2ccd0337 -[__NSOperationInternal _start:] + 772\r\n8\tFoundation\t0x2cd7544b __NSOQSchedule_f + 184\r\n9\tlibdispatch.dylib\t0x39cff651 _dispatch_queue_drain + 950\r\n10\tlibdispatch.dylib\t0x39cfa09d _dispatch_queue_invoke + 82\r\n11\tlibdispatch.dylib\t0x39d00ba1 _dispatch_root_queue_drain + 318\r\n12\tlibdispatch.dylib\t0x39d01cd7 _dispatch_worker_thread3 + 92\r\n13\tlibsystem_pthread.dylib\t0x39e58e31 _pthread_wqthread + 666\r\n14\tlibsystem_pthread.dylib\t0x39e58b84 start_wqthread + 6\r\n{code}\r\n\r\nh4.Modules in use\r\n{code}\r\nti.cloud \r\n dk.napp.drawer\r\n com.featherdirect.ticomscore\r\n facebook\r\n crittercism\r\n{code}\r\n\r\nh4. Other\r\niAds is used in the app.\r\nSystem Version: 8.0.2\r\niOS sdk target was 7.x\r\n{code}\r\nfalse\r\n3.4.0.v20140925164115\r\n{code}\r\n\r\nHad to use the patched libAPSAnalytics.a from TIMOB-17350 to get around the duplicate symbols error at the time.\r\n\r\nh4. Symbolicated report\r\n{code}\r\nCrashed Thread\r\n0\t\r\nCoreFoundation 0x2c078e3f __exceptionPreprocess + 127\r\n1\t\r\nlibobjc.A.dylib 0x39797c8b objc_exception_throw + 36\r\n2\t\r\nCoreFoundation 0x2bf96ec3 -[__NSDictionaryM setObject:forKey:] + 848\r\n3\t\r\nUinterview 0x001c7627 -[APSAnalytics queueEvent:type:data:immediate:] (APSAnalytics.m:449)\r\n4\t\r\nUinterview 0x001c9655 __54-[APSAnalytics sendCustomEvent:withEventType:payload:]_block_invoke_2 (APSAnalytics.m:855)\r\n5\t\r\nFoundation 0x2cd72ae1 __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 6\r\n6\t\r\nFoundation 0x2ccddb7d -[NSBlockOperation main] + 146\r\n7\t\r\nFoundation 0x2ccd0337 -[__NSOperationInternal _start:] + 772\r\n8\t\r\nFoundation 0x2cd7544b __NSOQSchedule_f + 184\r\n9\t\r\nlibdispatch.dylib 0x39cff651 _dispatch_queue_drain + 950\r\n10\t\r\nlibdispatch.dylib 0x39cfa09d _dispatch_queue_invoke + 82\r\n11\t\r\nlibdispatch.dylib 0x39d00ba1 _dispatch_root_queue_drain + 318\r\n12\t\r\nlibdispatch.dylib 0x39d01cd7 _dispatch_worker_thread3 + 92\r\n13\t\r\nlibsystem_pthread.dylib 0x39e58e31 _pthread_wqthread + 666\r\n14\t\r\nlibsystem_pthread.dylib 0x39e58b84 start_wqthread + 6\r\n{code}", "updateAuthor": { "name": "sfeather", "key": "sfeather", "displayName": "Stephen Feather", "active": true, "timeZone": "America/New_York" }, "created": "2014-10-07T15:54:10.000+0000", "updated": "2014-10-08T00:12:25.000+0000" }, { "id": "327136", "author": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hey [~sfeather] - Any chance we could get some repro steps?\r\n\r\nAlso, can you reproduce this issue without the other modules included in the project?", "updateAuthor": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-10-07T15:59:55.000+0000", "updated": "2014-10-07T15:59:55.000+0000" }, { "id": "327142", "author": { "name": "sfeather", "key": "sfeather", "displayName": "Stephen Feather", "active": true, "timeZone": "America/New_York" }, "body": "This is an app in the wild. Simply confirming the bug by Dan.\r\nI do not know what steps took place to cause it.\r\n\r\nI changed the comment to add the symbolicated report which indicates its in the APSanalytics.m\r\n\r\n", "updateAuthor": { "name": "sfeather", "key": "sfeather", "displayName": "Stephen Feather", "active": true, "timeZone": "America/New_York" }, "created": "2014-10-07T16:09:35.000+0000", "updated": "2014-10-07T16:09:35.000+0000" }, { "id": "327225", "author": { "name": "mdadu", "key": "mdadu", "displayName": "Muhammad Dadu", "active": false, "timeZone": "Europe/London" }, "updateAuthor": { "name": "mdadu", "key": "mdadu", "displayName": "Muhammad Dadu", "active": false, "timeZone": "Europe/London" }, "created": "2014-10-07T23:27:04.000+0000", "updated": "2014-10-07T23:27:39.000+0000" }, { "id": "327268", "author": { "name": "rborn", "key": "rborn", "displayName": "Dan Tamas", "active": true, "timeZone": "Europe/Berlin" }, "body": "I tried to reproduce the bug in a new project, however I didn't manage to do it yet. I'll keep trying.\r\n\r\n", "updateAuthor": { "name": "rborn", "key": "rborn", "displayName": "Dan Tamas", "active": true, "timeZone": "Europe/Berlin" }, "created": "2014-10-08T10:01:55.000+0000", "updated": "2014-10-08T10:01:55.000+0000" }, { "id": "328545", "author": { "name": "favo", "key": "favo", "displayName": "Mario", "active": true, "timeZone": "Europe/Berlin" }, "body": "I just ran into the same problem with an existing App and luckily found this ticket.\r\n\r\nEnabling Analytics in tiapp.xml fixed the iAd-Crash.\r\n\r\nAlso using SDK 3.4.0GA (not tried the patch from TIMOB-17350 since I am OK with the analytics for now), iOS 8.0.2 on an iPhone 6.\r\n\r\nI'm using other modules then the ones mentioned in the other comments:\r\n{quote}\r\n ti.storekit\r\n ti.airprint\r\n com.0x82.dropbox\r\n com.0x82.key.chain\r\n ti.aws\r\n com.lightapps.icloudkeyvalue\r\n{quote}\r\n\r\nFrom what I see, it crashes in the analytics-conditional in {{bannerViewDidLoadAd}} in which it should not go because analytics is disabled. Looking at {{main.m}} I can see that {{TI_APPLICATION_ANALYTICS}} is correctly set to {{NO}} but for some reasons must evaluate differently in the iAd module.", "updateAuthor": { "name": "favo", "key": "favo", "displayName": "Mario", "active": true, "timeZone": "Europe/Berlin" }, "created": "2014-10-19T15:07:52.000+0000", "updated": "2014-10-19T15:07:52.000+0000" }, { "id": "328603", "author": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Thanks for the info [~favo]. Agreed, it looks like the crash is here: https://github.com/appcelerator/titanium_mobile/blob/master/iphone/Classes/TiUIiOSAdView.m#L81\r\nBut we have still not been able to reproduce the issue on this end. Any info that will help us reproduce the issue will be greatly appreciated.", "updateAuthor": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-10-20T16:31:34.000+0000", "updated": "2014-10-20T16:31:34.000+0000" }, { "id": "329252", "author": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "body": "I was able to reproduce this issue with SDK build 3.4.1.v20141022101712; looks like adView.show() is triggering the crash.\r\n\r\n*Steps to reproduce:*\r\n1. Create a new Titanium classic app\r\n2. In the tiapp.xml, look for *analytics* node and set to false\r\n3. In the app.js, use the following code:\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: 'white',\r\n layout: 'vertical' \r\n});\r\n\r\nvar adView = Ti.UI.iOS.createAdView({\r\n width : Ti.UI.FILL,\r\n height : Ti.UI.FILL,\r\n top : 10,\r\n backgroundColor: 'red'\r\n});\r\n\r\nwin.add(adView);\r\n\r\nadView.show(); \r\nwin.open();\r\n{code}\r\n4. Install app to device\r\n\r\n*Actual:* After the app launches and a couple of seconds, the app will crash; see monkey_console.txt and monkey_no_analytics.crash.\r\n\r\n*Tested on:*\r\n\r\nAppcelerator Studio, build: 3.4.1.201410191611\r\nSDK build: 3.4.1.v20141022101712\r\nCLI: 3.4.1-dev\r\nAlloy: 1.5.1\r\nXcode: 6.1\r\nDevices: iphone 5 (8.1)", "updateAuthor": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-10-23T22:41:48.000+0000", "updated": "2014-10-23T22:41:58.000+0000" }, { "id": "329312", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Thanks [~wluu].\r\nProblem found and fixed.\r\nPR here: https://github.com/appcelerator/titanium_mobile/pull/6267\r\n3_4_X PR: https://github.com/appcelerator/titanium_mobile/pull/6268", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-10-24T09:41:48.000+0000", "updated": "2014-10-24T10:00:51.000+0000" }, { "id": "333817", "author": { "name": "kagrawal", "key": "kagrawal", "displayName": "Khushbu Agrawal", "active": true, "timeZone": "Asia/Shanghai" }, "body": "The Apple iAds view is showed without crash when the Analytics is turned off in tiApp.xml. Hence closing the ticket.\r\nTested with below Environment: \r\n1. Mac OSX Yosemite 10.10\r\n2. Appcelerator Studio, build: 3.4.1.201410281743\r\n3. Titanium SDK, build: 3.5.0.v20141125154115\r\n4. Titanium CLI, build: 3.4.1\r\n5. Alloy: 1.5.1\r\n6. Xcode 6.1\r\n7. iOS SDK 8.1\r\n8. iPhone 5s with iOS 8.1\r\n", "updateAuthor": { "name": "kagrawal", "key": "kagrawal", "displayName": "Khushbu Agrawal", "active": true, "timeZone": "Asia/Shanghai" }, "created": "2014-11-26T04:33:09.000+0000", "updated": "2014-11-26T04:33:09.000+0000" } ], "maxResults": 16, "total": 16, "startAt": 0 } } }