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

Windows: Crash when adding tableview back to window

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: Release 6.1.2, Release 6.2.0
    • Fix Version/s: Release 7.0.0
    • Component/s: Windows
    • Labels:
      None
    • Environment:

      Ti SDK: 6.1.2.GA, 6.2.0.v20170906064110, 7.0.0.v20170906135653

    • Story Points:
      5
    • Sprint:
      2017 Sprint 22 SDK, 2017 Sprint 23 SDK

      Description

      Description

      The original Android ticket that this test came from was related to searchbar but this occurs when the searchbar isn't added too, when testing please ensure both (with searchbar and without searchbar) are exercised

      When adding a tableview back to a windows after removing it the app will freeze and crash

      var _window = Ti.UI.createWindow();
      var flag = false;
      var data = [{
          title: 'Row 1',
          hasChild: true,
          color: 'red',
          header: 'First'
      }, {
          title: 'Row 2',
          hasDetail: true,
          color: 'green'
      }, {
          title: 'Row 3',
          hasCheck: true,
          color: 'blue',
          header: 'Second'
      }, {
          title: 'Row 4',
          color: 'orange'
      }];
       
      var sb = Titanium.UI.createSearchBar({
          barColor: '#122a6f',
          showCancel: false,
          height: 44,
      });
       
      // Create a TableView.
      var table = Ti.UI.createTableView({
          height: 600,
          width: '100%',
          search: sb,
          top: 75,
          left: 0,
          data: data
      });
       
      _window.add(table);
       
      var button = Ti.UI.createButton({
          title: 'Show / Hide',
          height: 75,
          width: '100%',
          top: 0,
          left: 0
      });
       
      _window.add(button);
      button.addEventListener('click', function() {
          if (true == flag) {
              _window.add(table);
              flag = false;
          } else {
              _window.remove(table);
              flag = true;
          }
      });
      _window.open()
      

      Steps to reproduce
      1. Add the above code to an existing app.js
      2. Tap the button at the top
      3. Tap the button again
      Actual

      TableView is removed on first click, app freezes and crashes on second click

      Expected

      TableView is removed on first click, readded on second click

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                kiguchi Kota Iguchi
                Reporter:
                eharris Ewan Harris
                Reviewer:
                Gary Mathews
                Tester:
                Samir Mohammed
              • Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

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

                    Git Source Code