Titanium JIRA Archive
Appcelerator Community (AC)

[AC-2849] nested push animation can result in corrupted navigation bar

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionInvalid
Resolution Date2011-12-28T06:58:55.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labelsn/a
Reporterjean-baptsite pringuey
AssigneePaul Dowsett
Created2011-10-27T20:59:18.000+0000
Updated2016-03-08T07:47:47.000+0000

Description

Problem

Nested push animation can result in corrupted navigation bar

Logs

I am getting the following message in the logs and a buggy navigation group
'2011-10-27 21:41:21.575 bugtitanium[15903:207] nested push animation can result in corrupted navigation bar
2011-10-27 21:41:21.945 bugtitanium[15903:207] Finishing up a navigation transition in an unexpected state. Navigation Bar subview tree might get corrupted.
2011-10-27 21:41:21.946 bugtitanium[15903:207] Finishing up a navigation transition in an unexpected state. Navigation Bar subview tree might get corrupted.

Test case

On the first load, everything is ok, hit 1 time reload, click on one row and click the back button Do the same and reload 2 times, you will have to hit the back button 2 times, and so on ....
Ti.UI.setBackgroundColor('#000');

var tabGroup = Ti.UI.createTabGroup();

var win1 = Ti.UI.createWindow({
  title:'Tab 1',
  backgroundColor:'#fff'
});

var mytasks_helping_button = Ti.UI.createButton({
  title : 'Reload',
  top:0,
  color:'black',
  width:200,
  height:30,
  style:Ti.UI.iPhone.SystemButtonStyle.BORDERED
});
win1.add(mytasks_helping_button);

var mytasks_helping_tableview = Ti.UI.createTableView({
  top:100
});
win1.add(mytasks_helping_tableview);

var tab1 = Ti.UI.createTab({
  icon:'KS_nav_views.png',
  title:'Tab 1',
  window:win1
});

function populateData(datasourcetmp,tabletmp){
  var data = [];
  for(var i = 0; i < datasourcetmp.length; i++) {
    var row = Ti.UI.createTableViewRow({
      height : 120,
      backgroundColor:'#fff',
      borderWidth : 0,
      borderColor : 'transparent'
    });
  
    var my_tasks_table_top_label = Ti.UI.createLabel({
      text : 'test row:'+i+' date:'+new Date(),
      width : "100%",
      font : {
        fontSize : 12,
        fontFamily : 'Helvetica'
      },
      color : "black",
      top : 30,
      height : 20,
      left : 5
    });
    row.add(my_tasks_table_top_label);
  
    data.push(row);
  }

mytasks_helping_tableview.addEventListener('click', function(e) {
  //view a task screen
  var viewTask = Ti.UI.createWindow({
    height : "100%",
    width : "100%",
    title : "Helping with",
    barColor : 'lightGray'
  });

  var viewTask_top_label = Ti.UI.createLabel({
    text : 'nested view '+ e.index,
    width : "80%",
    font : {
      fontSize : 15,
      fontFamily : 'Helvetica'
    },
    color : "gray",
    top : 10,
    height : 20,
    left : 60
  });
  viewTask.add(viewTask_top_label);

  tab1.open(viewTask);
  });
  
  tabletmp.setData(data);
}

var datasource = ['1','2','3','4','5','6','7'];
  populateData(datasource,mytasks_helping_tableview);

mytasks_helping_button.addEventListener('click', function(e) {
  populateData(datasource,mytasks_helping_tableview);
});

tabGroup.addTab(tab1);
tabGroup.open();

Discussions

Q&A: [bug-nested push animation can result in corrupted navigation bar](http://developer.appcelerator.com/question/127482/bug--nested-push-animation-can-result-in-corrupted-navigation-bar)

Comments

  1. jean-baptsite pringuey 2011-10-28

    Resolved by putting the listener outside of the populate data
  2. Paul Dowsett 2011-12-28

    Thanks for the update - I wish I had seen your comment before restructuring the ticket. ;) Please note the changes I made, so that you can use the format for your future tickets. Please see [How to Submit a Bug Report](https://wiki.appcelerator.org/display/guides/How+to+Submit+a+Bug+Report) for full details.
  3. Paul Dowsett 2011-12-28

    As stated by user, closing as invalid.

JSON Source