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

Android: AssetCryptImpl buffer overflow for large JS assets

    Details

    • Story Points:
      8
    • Sprint:
      2019 Sprint 16

      Description

      Summary:
      A buffer overflow or out-of-memory exception can occur for device builds (ie: encrypted assets) if the total byte size of all JavaScript source code exceeds the max heap size. This is more likely to happen when transpiled and source-maps are enabled.

      Steps to reproduce:

      1. Create a Classic Titanium app project using current 8_1_X
      2. Unzip the attached TIMOB-27300.zip to the project's "Resources" directory.
      3. Build and run on a physical Android device. (Alternatively, build with deployment type -D test.)
      4. When the app launches, note that an exception occurs in the log.

      Result:

      • An "BufferOverflowException" gets logged.

      Expected Result:

      • App should have successfully started and display a green window.

      Notes

      • If you receive an "OutOfMemory" exception, test on a different device that has enough RAM to load the test case.

      Recommended Solution:
      Refactor titanium_prep to prevent BufferOverflowException for large Javascript files.

        Attachments

          Activity

            People

            • Assignee:
              gmathews Gary Mathews
              Reporter:
              gmathews Gary Mathews
              Reviewer:
              Joshua Quick
              Tester:
              Lokesh Choudhary
            • Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                  Git Source Code