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
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.
Pull #708 pending.
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
Reopening to edit labels