Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-10017

Android: TableView: Child window contains tableview.App crashes on second visit to child window from parent window.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Cannot Reproduce
    • Affects Version/s: Release 2.1.1, Release 3.1.0
    • Component/s: Android
    • Environment:

      Tested with Titanium SDK: 2.1.1.v20120717154609
      Tested with Titanium  Studio: 2.1.1.201207161421
      Device - Android 2.2.2 LG-P970
      Machine OS - MAC 10.7.3

      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.

        Attachments

          Activity

            People

            • Assignee:
              bijuexalture Biju pm
              Reporter:
              sbhadauria Shyam Bhadauria
              Reviewer:
              Allen Yeung
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-5421
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Source Code