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

Windows: Adding a hyperloop created UI element to a View multiple times throws an error

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: Release 7.1.0, Release 7.0.2, Release 7.2.0
    • Fix Version/s: Release 7.5.0
    • Component/s: Hyperloop, Windows
    • Labels:
      None
    • Environment:

      SDK: 7.2.0.v20180221081245, 7.1.0.v20180221064031, 7.0.2.GA
      Windows 10 1709
      Windows 10 Mobile Emulator 10.0.14393.0

    • Story Points:
      8
    • Sprint:
      2016 Sprint 17 SDK

      Description

      Description

      Adding a HL created view to a Titanium view multiple times throws the following error

      [ERROR] :  ----- Titanium Javascript Runtime Error -----
      [ERROR] :  Message: Uncaught Error: Runtime Error: add: unknown exception
      

      var win = Ti.UI.createWindow();
      var Canvas = require('Windows.UI.Xaml.Controls.Canvas');
      var view = Ti.UI.createView({
          backgroundColor: 'white'
      });
      var SolidColorBrush = require('Windows.UI.Xaml.Media.SolidColorBrush');
      var Colors = require('Windows.UI.Colors');
      var box = new Canvas();
      box.Background = new SolidColorBrush(Colors.Red);
      box.Width = 50;
      box.Height = 50;
      win.addEventListener('click', function () {
          view.add(box);
      });
      win.add(view);
      win.open();
      

      Steps to reproduce

      1. Add the above code to an existing classic project with hyperloop setup
      2. Build for any Windows target
      3. Click the view when the app launches
      4. Click the view again a second time

      Actual

      Error shown above is thrown on the second click

      Expected

      No error should be thrown

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

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

                  Git Source Code