Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-6183] iOS: leftNavButton causing app to crash

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2012-01-05T15:03:17.000+0000
Affected Version/sRelease 1.8.0, Release 1.8.0.1
Fix Version/sSprint 2011-46, Release 1.8.0.1
ComponentsiOS
Labelsmodule_tabgroup, qe-testadded
ReporterKarol Pomaski
AssigneeBlain Hamon
Created2011-11-14T13:30:35.000+0000
Updated2012-01-05T15:03:17.000+0000

Description

Problem

Left navigation button (leftNavButton) causing app to crash.

REGRESSION works correctly with 1.7.5

Reproducible Steps

1. Run the sample code 2. Toggle back and forth between the windows by clicking on the 'Settings' and 'Done' buttons

Sample Code

Titanium.UI.setBackgroundColor("#C5CCD4");


function handleSettings(_event) {
    var modal = Ti.UI.createWindow();
  
    function handleClose(_event) {
      modal.close();
      Ti.API.info("closed");
    };
    
    /*
     * UI INSTANTIATION
     */
    var win2 = Ti.UI.createWindow({titleid: "Settings", barColor: "#000"});
    var navGroup = Ti.UI.iPhone.createNavigationGroup({
      window: win2
    });
    
    var buttonClose  = Ti.UI.createButton({systemButton: Ti.UI.iPhone.SystemButton.DONE});
    win2.leftNavButton = buttonClose;
    modal.add(navGroup);
    
    
    buttonClose.addEventListener("click",function(e){
      modal.close();
    });
    
    var view = Ti.UI.createView({width: "100%",
    height: "100%",
    top: 0,
    left: 0,
    layout: "vertical",
    backgroundColor: "#C5CCD4"});

    win2.add(view);
    modal.open();      
};
    
var win1 = Titanium.UI.createWindow({  
    title:'Tab 1',
    backgroundColor:'#fff',
    navBarHidden: false,
    tabBarHidden: true
});
      
var buttonSettings    = Ti.UI.createButton({titleid: "Settings"});
buttonSettings.addEventListener("click",handleSettings);
    
win1.leftNavButton = buttonSettings;
  
tabGroup = Ti.UI.createTabGroup();
  
tabSR = Ti.UI.createTab({
  window: win1
})
  
tabGroup.addTab(this.tabSR);
  
// Open the tab group, without animation since the tabs are hidden
tabGroup.open({
  transition: Titanium.UI.iPhone.AnimationStyle.NONE
});

Log

Nov 14 14:04:50 unknown UIKitApplication:com.test.searchtest[0xd569][8324] <Notice>: [FATAL] Orphaned [object TiUIWindow] is trying to forget (null).
Nov 14 14:04:50 unknown UIKitApplication:com.test.searchtest[0xd569][8324] <Notice>: [FATAL] Orphaned [object TiUIWindow] is trying to forget [object TiUIWindow].
Nov 14 14:04:51 unknown UIKitApplication:com.test.searchtest[0xd569][8324] <Notice>: [FATAL] Orphaned [object TiUIWindow] is trying to forget (null).
Nov 14 14:04:51 unknown UIKitApplication:com.test.searchtest[0xd569][8324] <Notice>: [FATAL] Orphaned [object TiUIWindow] is trying to forget [object TiUIWindow].
Nov 14 14:04:52 unknown UIKitApplication:com.test.searchtest[0xd569][8324] <Notice>: [FATAL] Orphaned [object TiUIWindow] is trying to forget (null).
Nov 14 14:04:52 unknown UIKitApplication:com.test.searchtest[0xd569][8324] <Notice>: [FATAL] Orphaned [object TiUIWindow] is trying to forget [object TiUIWindow].
Nov 14 14:04:52 unknown ReportCrash[8326] <Notice>: Formulating crash report for process SearchTest[8324]

Associated HelpDesk Ticket

http://appc.me/c/APP-687672

Comments

  1. Mark Allen 2011-11-15

    Noticed this was a low priority. This is not the case as far as EMC is concerned. We need the bug fixed before we can deploy. Deployment is scheduled for 12/10/2011. Using SDK 1.7.5 is NOT an option for us.
  2. Blain Hamon 2011-11-15

    Pull #708 pending.
  3. Michael Pettiford 2011-12-07

    Tested on Ti Studio 1.0.7.201112061404 
Ti Mob SDK 1.8.0.1.v20111207091653 
OSX Lion 
iPod Touch 4.3.5, iPhone 4S OS 5.0.1, iPad 2 OS 4.3.5, iPhone Simulator 5.0 Expected behavior is shown of application not crashing
  4. Eric Merriman 2012-01-05

    Reopening to edit labels

JSON Source