[TIMOB-10017] Android: TableView: Child window contains tableview.App crashes on second visit to child window from parent window.
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2013-11-13T22:38:30.000+0000 |
Affected Version/s | Release 2.1.1, Release 3.1.0 |
Fix Version/s | 2013 Sprint 23, 2013 Sprint 23 API |
Components | Android |
Labels | api, exalture, qe-closed-3.3.0 |
Reporter | Shyam Bhadauria |
Assignee | Biju pm |
Created | 2012-07-18T05:11:55.000+0000 |
Updated | 2014-07-17T10:37:09.000+0000 |
Description
This is not a regression. It occurs in 2.1.0 and 2.0.2 as well.
From parent window, going to child window for the second time crashes the app.
Steps to reproduce:
1) Use the code below to make a sample app.
var winMain = Ti.UI.createWindow({
backgroundColor : 'white',
fullscreen : true,
});
var SecWin= Ti.UI.createWindow({
backgroundColor : 'red',
fullscreen : true,
});
var ClickMe = Ti.UI.createButton({
title : 'Click',
backgroundColor:'orange',
width : 60,
height : 40
});
ClickMe.addEventListener('click',function() {
SecWin.backgroundColor = 'white';
var tableView = Ti.UI.createTableView();
var data = [];
for (var c=0;c<4;c++)
{
var label = Ti.UI.createLabel({
text:'Header ' + (c+1),
color:'black',
width:'auto',
height: 'auto',
left:4
});
var pinkHeader = Ti.UI.createView({backgroundColor: 'pink', height: 40});
pinkHeader.add(label);
data[c] = Ti.UI.createTableViewSection({
headerView: pinkHeader
});
for (var x=0;x<10;x++)
{
data[c].add(Ti.UI.createTableViewRow({title:'Group '+(c+1)+', Row '+(x+1)}));
}
}
tableView.data = data;
SecWin.add(tableView);
SecWin.open();
});
winMain.add(ClickMe);
winMain.open();
2) Run the app.
3) Click the button'Click'
4) Press android 'back' button.
5) Click the button'Click'
Expected result:
2) After step 2, a white window with a 'click' button should get displayed.
3) The child window with pink header rows should get displayed.
4) Earlier white parent window should get displayed.
5) The child window should get displayed again.
Actual result:
2) After step 2, a white window with a 'click' button gets displayed.
3) The child window with pink header rows gets displayed.
4) Earlier white parent window gets displayed.
5) App is forced closed.
PR: https://github.com/appcelerator/titanium_mobile/pull/3607
Another test case:
Issue reproduces with Titanium Studio, build: 3.0.1.201212181159 Titanium SDK version: 3.1.0 (03/11/13 15:43 0c88429) Titanium SDK version: 3.0.2 (02/07/13 16:46 a4def81) Device: Samsung galaxy s duos Android version: 4.0.4 Android Emulator: Android SDK version: 2.2
Added a null value checking. https://github.com/appcelerator/titanium_mobile/pull/4353
https://github.com/appcelerator/titanium_mobile/pull/3607 Failed FR and was closed due to inactivity.
Tested with latest master. Unable to reproduce this issue. Closing.
Issue is not reproducible, hence closing the issue. Tested on: Device : Google Nexus 7, Android Version: 4.4.4 SDK: 3.3.0.v20140711123603 CLI version : 3.3.0-rc4 OS : MAC OSX 10.9.2 Alloy: 1.4.0-rc5 ACS: 1.0.15 npm:1.3.2 LiveView: 1.0.4 Appcelerator Studio, build: 3.3.0.201407111535 titanium-code-processor: 1.1.1 XCode : 5.1.1