Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-9052] Android: app crashes accessig to AddressBook on Android OS 4

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-06-07T17:14:35.000+0000
Affected Version/sRelease 2.0.1
Fix Version/sRelease 2.1.0, Sprint 2012-12 API
ComponentsAndroid
Labelsapi, module_android, qe-testadded
ReporterFederico Casali
AssigneeHieu Pham
Created2012-05-08T09:21:03.000+0000
Updated2014-02-25T11:25:41.000+0000

Description

Problem description

App crashes when accessing to contacts in Address Book on Android OS 4.0

Steps to reproduce

- Run the sample code below - Click the button and get to the Address Book contact list. - Click on a contact, then get back to the app Result: app crashes. Crash not reproducible on Android OS 2.3.3 Attaching crash log.
Titanium.UI.setBackgroundColor('#000');
var win1 = Titanium.UI.createWindow({ 
    title:'Tab 1',
    backgroundColor:'#fff'
});
var info = Titanium.UI.createLabel({
    color:'#999',
    text:'I am Window 1',
    font:{fontSize:20,fontFamily:'Helvetica Neue'},
    textAlign:'center',
    width:'auto'
});
// Create a Button.
var btn1 = Ti.UI.createButton({
    title : 'btn1',
    height : 50,
    width : 300,
    bottom : 50
});
var values = {
    cancel:function() {info.text = 'Cancelled';},
    selectedPerson : function() {info.text = "select";}};
// Listen for click events.
btn1.addEventListener('click', function() {
    Titanium.Contacts.showContacts(values);
});
// Add to the parent view.
win1.add(btn1);
win1.add(info);
win1.open();

Additional notes

Customer ticket: http://support-admin.appcelerator.com/display/APP-461234

Attachments

FileDateSize
APP-461234log.txt2012-05-08T09:21:03.000+00007530

Comments

  1. Vishal Duggal 2012-06-04

    Putting it back in queue
  2. Josh Roesslein 2012-06-06

    This appears to be caused by closing a Cursor from a managed query. On ICS this results in a fatal exception when the activity which created the managed query resumes. Worked with Hieu on a solution that seems to fix the issue. He will be sending a PR for the fix and wrapping up this issue.
  3. Tamila Smolich 2012-06-23

    Closing as fixed. Verified with: Titanium Studio, build: 2.1.0.201206221045 Titanium SDK: 2.1.0.v20120622174154 Devices: Nexus S (4.0.4); Samsung Galaxy tab (3.2)
  4. jithinpv 2014-02-25

    Anvil test case added. PR Link: https://github.com/appcelerator/titanium_mobile/pull/5380

JSON Source