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

iOS: Setting headers outside of table view row creation crashes the app

    Details

      Description

      If we are trying to add a large number of rows into a tableview and set the header for each row, that will crash the app.

      Repro Steps

      Step 1. Create an application based on the following code.
      Step 2. Run the app and a crash will be happened.
      Step 2. If you comment out the line "row.header='A'", the app won't crash.

      // this sets the background color of the master UIView (when there are no windows/tab groups on it)
      Titanium.UI.setBackgroundColor('#000');
       
      //
      // create base UI tab and root window
      //
      var win = Titanium.UI.createWindow({  
          backgroundColor:'#fff'
      });
       
      var table = Titanium.UI.createTableView({});
      win.add(table);
      win.open();
       
      var addrow = function(){
      	
      		var row = Ti.UI.createTableViewRow({
      			height:65
      		});
      		
      		var photo = Ti.UI.createImageView({
      	        // image: ,
      	        top: 12,
      	        left: 9,
      	        width: 40,
      	        height: 40,
      	        clickName: 'photo'
      	      });
      	      
      	      row.add(photo);
      	      
      	      var photo2 = Ti.UI.createImageView({
      	        // image: ,
      	        top: 12,
      	        left: 9,
      	        width: 40,
      	        height: 40,
      	        clickName: 'photo2'
      	      });
      	      
      	      row.add(photo2);
      	      
      	      
      		row.header='A';
      		table.appendRow(row);
       
      }
      for(var i = 0; i<3000; i++){
      	addrow();
      	Ti.API.info(Ti.Platform.availableMemory);
      }
      

      Associated Helpdesk Tickdet:

      http://support-admin.appcelerator.com/display/APP-654533

        Attachments

          Activity

            People

            • Assignee:
              vduggal Vishal Duggal (Inactive)
              Reporter:
              qgao Qing Gao
            • Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

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

                  Git Integration