Titanium JIRA Archive
Appcelerator Community (AC)

[AC-2349] iOS: Ti.Contacts.showContacts crashes when opened multiple times

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionCannot Reproduce
Resolution Date2014-01-19T08:52:37.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labelsios
Reporterjosh rose
AssigneeShak Hossain
Created2014-01-15T23:22:49.000+0000
Updated2016-03-08T07:41:22.000+0000

Description

This happens on iOS device only, on simulator it works just fine over and over again. I have a button that launches this code when touched: Ti.Contacts.showContacts({ animated : false, selectedPerson : function(data){ } } }, selectedProperty : function(e){ }, cancel : function(e){ } }); }; If you cancel and press again multiple times you get an app crash. Excerpt from xcode: 2014-01-15 15:07:54.505 1stRnd[3202:60b] -[UISectionRowData barStyle]: unrecognized selector sent to instance 0x19463d50 [ERROR] The application has crashed with an uncaught exception 'NSInvalidArgumentException'. Reason: -[UISectionRowData barStyle]: unrecognized selector sent to instance 0x19463d50 It also crashes if you try to select a contact then relaunch contacts and select a contact again, the error is slightly different though. I can't get it back to the error right now, but it has also given me a stack trace mentioning that a property with "translucent" in the name is an invalid argument.

Comments

  1. Mostafizur Rahman 2014-01-16

    Hello, I tested this issue with the test code below. I can't reproduce this issue using TiSDK 3.2GA. Please try the code below and let us know if you notice anything different.

    Test Environment

    Mac OS X 10.8.5 Ti SDK 3.2.0.GA Ti CLI 3.2.0 IOS SDK 7 Device Xcode 5.0.2

    Test Code

    app.js
       var win = Ti.UI.createWindow();
       
       if (Ti.Contacts.contactsAuthorization == Ti.Contacts.AUTHORIZATION_AUTHORIZED) {
       
       } else if (Ti.Contacts.contactsAuthorization == Ti.Contacts.AUTHORIZATION_UNKNOWN) {
       	Ti.Contacts.requestAuthorization(function(e) {
       		if (e.success) {
       
       		}
       	});
       }
       
       var aButton = Ti.UI.createButton({
       	title : 'Button',
       
       });
       
       aButton.addEventListener('click', function() {
       
       	Ti.Contacts.showContacts({
       		animated : false,
       		selectedPerson : function(e) {
       
       		},
       		selectedProperty : function(e) {
       
       		},
       		cancel : function(e) {
       
       		}
       	});
       });
       
       win.add(aButton);
       
       win.open();
       
       

    Step to Test

    Create sample project in Ti Classic

    Update app.js with sample code

    Run on IOS device

    Press to Button Mode (hundred times)

    App is working without any crash

    Thanks
  2. Shak Hossain 2014-01-19

    Josh, Since we can't reproduce the issue, we are marking this resolved. Please update the ticket with your updates so that we can revisit this. Thanks,

JSON Source