Details

    • Type: Bug
    • Status: Reopened
    • Priority: Low
    • Resolution: Unresolved
    • Affects Version/s: Release 2.1.2, Release 3.1.0
    • Fix Version/s: None
    • Component/s: Android
    • Labels:
    • Environment:
      • Titanium SDK 2.2.0.v20120823190912
      • Android 4.0.3
      • v8
      • Thinkpad Tablet
      • OSX Mountain Lion

      Description

      The problem

      Well, I don't know how to explain the problem, or what precisely is causing it ... so it's the best if I just jump to example.

      Test case

      var i = 0;
       
      var win = {
          backgroundColor: '#000',
          __TiElement: null,
          __getTiElement: function() {
              if (!this.__TiElement) {
                  this.__TiElement = Ti.UI.createWindow(this);
              }
              return this.__TiElement;
          },
          open: function() {
              Ti.API.info(i++);
              this.__getTiElement().open();
          }
      };
       
      win.open();
      

      Run this example, and you should get infinite loop (see in DDMS, i goes from 0 to infinity).

      As I said, I'm not sure what's causing the problem, but it seems that "this" value is somehow set to wrong value (TiUIWindow because "win" and that causes infinite loop).

      The problem can be solved if non-enumerable properties are used (by using "Object.defineProperty").

      The issue does not exist on iOS.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                ivan.skugor Ivan Skugor
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Backbone Issue Sync

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

                    Git Integration