Details

    • Type: Bug
    • Status: Closed
    • Priority: None
    • Resolution: Fixed
    • Affects Version/s: Release 7.3.0
    • Fix Version/s: Release 7.3.0
    • Component/s: Android
    • Labels:
      None
    • Story Points:
      5
    • Sprint:
      2018 Sprint 16 SDK

      Description

      Joshua Quick, Gary Mathews
      I noticed a change in the memory management after the recent changes on it that I think deserves some attention. Until 7.2.0.GA the sample app I have attached had this behavior.

      1. Open the application.
      2. Click "Remove".
      3. Force GC through the Android profiler tool.
      4. Click "Add again".

      The colorized views are successfully added again to the window.

      After the merge of: https://github.com/appcelerator/titanium_mobile/pull/10174 the same sequence results in a crash (attached in the ticket). That happens because the Views are garbage collected.
      The same goes with Ti.Map module when AnnotaionProxies are released (that happens when they are removed from the MapView) for example.
      What bothers me is that this change may cause problems in applications that are relying on keeping the references to proxies in the same context after heavy memory usage (one that can cause the system to garbage collect). And I think if that is the case for Proxies in general we may have that problem in a variety of usages.

      How do you think we should go about that?

      Note: I haven't matched the position of the views to be related to the device's screen. I have been testing on Pixel emulator.

      P.S. We talked with Joshua about that earlier this week and at that moment we had a upcoming changes in the most recent PR for memory management. I have tested today with it and the described change in behavior is still present.

        Attachments

        1. app.js
          2 kB
        2. consoleLog.txt
          4 kB
        3. lifecycle.svg
          14 kB

          Activity

            People

            • Assignee:
              gmathews Gary Mathews
              Reporter:
              ybanev Yordan Banev
              Reviewer:
              Christopher Williams
            • Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

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

                  Git Source Code