{ "id": "142632", "key": "TIMOB-18359", "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": "16593", "description": "Release 4.0.0", "name": "Release 4.0.0", "archived": false, "released": true, "releaseDate": "2015-05-21" }, { "id": "16723", "description": "Windows Platform Support, ListView updates, Vector overlays in maps", "name": "Release 4.1.0", "archived": false, "released": true, "releaseDate": "2015-07-08" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2015-03-11T17:56:37.000+0000", "created": "2015-01-10T01:17:09.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "qe-3.5.0" ], "versions": [ { "id": "16676", "description": "Release 3.4.1", "name": "Release 3.4.1", "archived": false, "released": true, "releaseDate": "2014-11-14" }, { "id": "16704", "description": "Release 3.5.0", "name": "Release 3.5.0", "archived": false, "released": true, "releaseDate": "2015-01-13" } ], "issuelinks": [], "assignee": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2015-03-11T20:37:42.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": "h5.Description\r\n\r\nWhen attempting to access certain information of a contact the app crashes and the below is output in the console, the file attached as crash.txt shows the crash log given. It is the same for all crashes.\r\n\r\nThe information that crashes the application is as follows\r\n\r\n* Anything related to birthday, including Islam, Hebrew and Chinese\r\n* Any social profile including\r\n** Twitter\r\n** Facebook\r\n** Flickr\r\n** LinkedIn\r\n** Myspace\r\n** Sina Weibo\r\n* Ringtone\r\n* Game Center\r\n\r\n*Notes* \r\nThe *native behavior* when accessing these through the *Apple contacts app* is that they all open external applications such as\r\n* any social media opens the web browser\r\n* birthdays open the calendar\r\n* ringtone opens a menu to change the ringtone\r\n\r\nWhen selecting Anniversary the app does not crash and simply returns the date, it is only for information pertaining to birthdays that the app crashes on. This was fixed in TIMOB-18359\r\n\r\nWhen the app is asked to return any information stored in the 'instant message' section it returns it in the format as below \r\n\r\n{code}\r\n{\r\n service = \r\n username = ;\r\n}\r\n\r\n{code}\r\nfor example\r\n\r\n{code}\r\n{\r\n service = AIM;\r\n username = Bob;\r\n}\r\n\r\n{code}\r\n*STUDIO CONSOLE LOG*\r\n{code}\r\n[ERROR] : The application has crashed with an uncaught exception 'NSRangeException'.\r\n[ERROR] : Reason:\r\n[ERROR] : *** -[__NSArrayI objectAtIndex:]: index 0 beyond bounds for empty array\r\n[ERROR] : Stack trace:\r\n[ERROR] : \r\n[ERROR] : 0 CoreFoundation 0x0000000184842084 + 132\r\n[ERROR] : 1 libobjc.A.dylib 0x0000000194e200e4 objc_exception_throw + 60\r\n[ERROR] : 2 CoreFoundation 0x0000000184727ec4 CFRunLoopRemoveTimer + 0\r\n[ERROR] : 3 KitchenSink 0x00000001001e1010 KitchenSink + 1314832\r\n[ERROR] : 4 KitchenSink 0x00000001001e141c KitchenSink + 1315868\r\n[ERROR] : 5 AddressBookUI 0x0000000183a4f3a0 + 276\r\n[ERROR] : 6 AddressBookUI 0x0000000183aff2d4 + 412\r\n[ERROR] : 7 AddressBookUI 0x0000000183aff7cc + 72\r\n[ERROR] : 8 libdispatch.dylib 0x000000019546549c + 24\r\n[ERROR] : 9 libdispatch.dylib 0x000000019546545c + 16\r\n[ERROR] : 10 libdispatch.dylib 0x0000000195469a70 _dispatch_main_queue_callback_4CF + 932\r\n[ERROR] : 11 CoreFoundation 0x00000001847f98dc + 12\r\n[ERROR] : 12 CoreFoundation 0x00000001847f7984 + 1492\r\n[ERROR] : 13 CoreFoundation 0x0000000184725664 CFRunLoopRunSpecific + 396\r\n[ERROR] : 14 GraphicsServices 0x000000018d8675a4 GSEventRunModal + 168\r\n[ERROR] : 15 UIKit 0x000000018902a4f8 UIApplicationMain + 1488\r\n[ERROR] : 16 KitchenSink 0x00000001000a6e60 KitchenSink + 28256\r\n[ERROR] : 17 libdyld.dylib 0x000000019548ea08 + 4\r\n[ERROR] : *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayI objectAtIndex:]: index 0 beyond bounds for empty array'\r\n[ERROR] : *** First throw call stack:\r\n[ERROR] : (0x184842084 0x194e200e4 0x184727ec4 0x1001e1010 0x1001e141c 0x183a4f3a0 0x183aff2d4 0x183aff7cc 0x19546549c 0x19546545c 0x195469a70 0x1847f98dc 0x1847f7984 0x184725664 0x18d8675a4 0x18902a4f8 0x1000a6e60 0x19548ea08)\r\n{code}\r\n\r\nh5.Steps To Reproduce\r\n\r\n1. Install KitchenSink to a device\r\n2. Navigate to Phone->Contacts->Contacts Picker\r\n3. Ensure that 'Stop on property' is enabled\r\n4.. Find a contact with any of the above\r\n\r\nh5.Actual Result\r\n\r\nWhen selecting these the app will crash\r\n\r\nh5.Expected Result\r\n\r\nThe app should not crash, the external applications should open (*in parity with native behaviour*) *or* the data should be displayed as normal (*in parity with Titanium existing behavior*)", "attachment": [ { "id": "53513", "filename": "crash.txt", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2015-01-10T01:17:09.000+0000", "size": 50167, "mimeType": "text/plain" } ], "flagged": false, "summary": "iOS: Crashes when accessing certain information of a contact via the contacts picker", "creator": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "subtasks": [], "reporter": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "environment": "Mac OSX 10.10.1\r\nAppcelerator Studio, build: 3.4.1.201410281743\r\nTitanium SDK build: 3.5.0.v20150109131718\r\nTitanium CLI, build: 3.4.1\r\nAlloy: 1.5.1\r\nXcode 6.1.1\r\niPhone 6 Plus (8.1.1), iPad Air 2 (8.2b3)", "closedSprints": [ { "id": 309, "state": "closed", "name": "2015 Sprint 02 SDK", "startDate": "2015-01-17T01:00:16.697Z", "endDate": "2015-01-31T01:00:00.000Z", "completeDate": "2015-02-02T14:36:09.696Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "340345", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "{code}\r\n\r\nvar win = Titanium.UI.createWindow({ \r\n title:'Contacts Test',\r\n backgroundColor:'#fff'\r\n});\r\n\r\nvar button1 = Titanium.UI.createButton({\r\n title:'request access',\r\n top:40\r\n});\r\n\r\nvar button2 = Titanium.UI.createButton({\r\n title:'insert contact',\r\n top:80\r\n});\r\n\r\nvar button3 = Titanium.UI.createButton({\r\n title:'open contact',\r\n top:120\r\n});\r\nwin.add(button1);\r\nwin.add(button2);\r\nwin.add(button3);\r\n\r\nbutton1.addEventListener('click', function(e){\r\n Ti.Contacts.requestAuthorization(function(e){});\r\n});\r\n\r\nbutton2.addEventListener('click', function(e){\r\n Ti.Contacts.createPerson({\r\n firstName: 'John',\r\n lastName: 'Deep',\r\n birthday: '2012-01-01T12:00:00.000+0000',\r\n alternateBirthday: {\r\n calendarIdentifier: 'chinese',\r\n day: 25,\r\n era: 78,\r\n isLeapMonth: false,\r\n month: 11,\r\n year: 16\r\n },\r\n socialProfile:{\r\n home:[{\r\n service: 'facebook',\r\n username: 'jdeep@facebook.com'\r\n },\r\n {\r\n service: 'gamecenter',\r\n username: 'jdeep@hotmail.com'\r\n }],\r\n work:[{\r\n service: 'linkedin',\r\n username: 'jdeep@linkedin.com'\r\n }]\r\n }\r\n });\r\n alert('contact John Deep added');\r\n});\r\nvar values = {cancel:function() {info.text = 'Cancelled';}};\r\nbutton3.addEventListener('click', function(e) {\r\n Titanium.Contacts.showContacts(values);\r\n});\r\n\r\nvar info = Ti.UI.createLabel({\r\n text:'result here',\r\n bottom:70,\r\n height:'auto',\r\n width:'auto'\r\n});\r\nwin.add(info);\r\n\r\nvalues.selectedProperty = function(e) {\r\n Ti,API.info(e);\r\n info.text = e.value;\r\n};\r\n \r\nwin.open();\r\n{code}\r\n\r\nh4. STEPS TO TEST:\r\n- Create a simple classic project.\r\n- Update project with test code\r\n- Run on iOS device/simulator (iOS 8)\r\n- press 'request access' to get permission to access and edit contacts\r\n- press 'insert contact' to insert a new contact 'John Deep'\r\n- press 'open contact' to open the contact picker\r\n- choose the newly added contact 'John Deep'\r\n- press 'birthday'\r\nh3. EXPECTED RESULT:\r\n{quote}birthday appears in label as a string{quote}\r\n- repeat to 'open contact'\r\n- choose 'John Deep'\r\n- press one of the social profiles\r\nh3. EXPECTED RESULT:\r\n{quote}corresponding social profile information appears in label{quote}\r\n- repeat to 'open contact'\r\n- choose 'John Deep'\r\n- press the alternate birthday\r\nh3. EXPECTED RESULT:\r\n{quote}corresponding alternative birthday information appears in label{quote}\r\n\r\n*Note* \r\nAll returned results from the contact picker should be displayed as normal (in parity with Titanium existing behavior)\r\nTest should be repeated in iOS 7, 'birthday', 'social profiles' should work, while 'alternate birthday' should not exist.\r\n", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-01-22T23:48:38.000+0000", "updated": "2015-03-11T04:04:28.000+0000" }, { "id": "340350", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "PR here: https://github.com/appcelerator/titanium_mobile/pull/6598", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-01-23T00:01:58.000+0000", "updated": "2015-01-23T00:01:58.000+0000" }, { "id": "341351", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "PR merged", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-01-30T04:00:06.000+0000", "updated": "2015-01-30T04:00:06.000+0000" }, { "id": "345021", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "Reopening ticket as I am still seeing crashes when accessing information related to birthdays when using the below:\r\n\r\nMac OSX 10.10.2\r\nAppcelerator Studio, build: 4.0.0.201502171827\r\nTitanium SDK build: 4.0.0.v20150303161012 \r\nTitanium CLI, build: 3.5.0-dev\r\nAlloy: 1.5.1\r\n\r\nSecondly, when using the test code provided, if you do the following then information is removed from the contact.\r\n\r\n1. Using the attached test code build to an iOS 8 device.\r\n2. Open the application and then request authorization if needed and then add a contact\r\n3. Close the application and then open the iOS contacts application\r\n4. Find John Deep, notice next to the Wifi icon that something is updating behind the scenes on iOS, this is the contacts on device syncing with I presume iCloud\r\n5. Open John Deep before the the sync is complete and Chinese Birthday will exist\r\n6. Open John Deep after the sync has been completed and the Chinese Birthday will no longer exist", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2015-03-04T02:22:38.000+0000", "updated": "2015-03-04T02:22:38.000+0000" }, { "id": "345144", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "[~eharris], Can you let me know which exact iOS version you are using? Surprisingly, I tried the test code today with my own iPhone which is iOS 8.1.3, setting either alternate birthday or social profile will not work. I'm not sure if it's an Apple bug but will continue to investigate. ", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-03-05T08:06:08.000+0000", "updated": "2015-03-05T08:06:08.000+0000" }, { "id": "345150", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "[~cng] I tested using an iPhone 6 Plus running iOS 8.1.3, I will revisit tomorrow and try earlier 8.X devices as well as beta and see if there is any difference in the behavior.", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2015-03-05T08:13:45.000+0000", "updated": "2015-03-05T08:13:45.000+0000" }, { "id": "345245", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Tested on simulator 8.1, device iOS 8.0 all working\r\nHowever, tested on my personal device running iOS 8.1.3, unable to add contacts parameters including alternate birthday and social profile.\r\nTo investigate further.", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-03-06T04:41:15.000+0000", "updated": "2015-03-06T04:41:15.000+0000" }, { "id": "345246", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Just found out why it wasn't working on my personal iPhone. Under settings -> Mail, Contacts, Calendars -> Contacts -> Default Account, it was set to Appcelerator, when it should be set to iCloud. This will result in 'ABAddressBookErrorDomain error 0' when creating a new person contact with socialProfile or alternate birthday parameters. \r\nOn the test devices, this 'default account' was nonexistent. \r\nWill put a note wrt this in apidocs.\r\n\r\n[~eharris], Can you elaborate or reproduce the crashes?\r\nAs for the 2nd case, I have tried to reproduce it, but my information stays permanent. I even logged into www.icloud.com to check and John Deep's info is persistent as well. Maybe you can check on the 'default account' i mentioned, and log into www.icloud.com to verify too.\r\n", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-03-06T05:14:13.000+0000", "updated": "2015-03-06T05:14:13.000+0000" }, { "id": "345247", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "[~eharris] looks like i found the crash when trying to read alternateBirthday or birthday. \r\nPR here: https://github.com/appcelerator/titanium_mobile/pull/6693 and merged. \r\nThink you can check it out again? ", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-03-06T06:27:40.000+0000", "updated": "2015-03-06T06:27:40.000+0000" }, { "id": "345288", "author": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Backport to 4_0_X: https://github.com/appcelerator/titanium_mobile/pull/6694\r\n", "updateAuthor": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-03-06T17:46:36.000+0000", "updated": "2015-03-06T17:46:36.000+0000" }, { "id": "345614", "author": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Everything except selecting 'Ringtone' for the contacts works. If you choose 'Ringtone', the same crash noted in the ticket description is thrown.\r\n\r\nTitanium SDK 4.0.0.v20150306095010\r\nStudio 4.0.0.201502171827\r\nCLI 3.4.2\r\nXcode 6.2\r\n\r\nOn: \r\niPhone 6, iOS 8.2\r\niPad Air 2, iOS 8.2", "updateAuthor": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-03-10T21:45:11.000+0000", "updated": "2015-03-10T21:47:58.000+0000" }, { "id": "345659", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "PR here: https://github.com/appcelerator/titanium_mobile/pull/6710\r\n4_0_X PR here: https://github.com/appcelerator/titanium_mobile/pull/6711\r\n\r\nNote: selecting RingTone or textTone will not crash the app after the fix. But the returned data only indicates the propertyName. Value is null, since Apple doesn't support the return of any value for these properties.\r\n\r\nUpdated the sample code to include Ti.API.info on the returned data to see more information.", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-03-11T04:03:05.000+0000", "updated": "2015-03-11T04:05:02.000+0000" }, { "id": "345711", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "PR's merged", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-03-11T17:56:37.000+0000", "updated": "2015-03-11T17:56:37.000+0000" }, { "id": "345738", "author": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Verified fixed using:\r\n\r\nTitanium SDK 4.0.0.v20150311105810\r\nStudio 4.0.0.201503062102\r\nCLI 3.4.2\r\nXcode 6.2\r\nNode 0.10.36\r\n\r\nOn: \r\niPhone 6, iOS 8.2\r\niPad Air 2, iOS 8.2\r\n\r\nNo longer encounter crashes when accessing contact's properties.", "updateAuthor": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-03-11T20:37:42.000+0000", "updated": "2015-03-11T20:37:42.000+0000" } ], "maxResults": 15, "total": 15, "startAt": 0 } } }