Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-51756

Runtime error on iOS when adding/removing properties of JS objects

XMLWordPrintable

    • iOS/tvOS/watchOS

      When properties of a Javascript object are dynamically added or deleted, the application may crash on iOS with the message:
      ASSERT: "to >= inlineSize && from > to" in file jsruntime/qv4internalclass.cpp, line 174

      This only happens for Debug builds on iOS (both on actual devices and the simulator).

      The error can be reproduced with the following use-case:

      • Create a javascript object
      • Add N properties (e.g. add 3 properties)
      • Remove N-1 properties (e.g. remove 2 properties, no problems until here)
      • Remove another property (causes the error)

      Every iOS app that dynamically modifies a JS object cannot run in Debug mode anymore because of this issue. A quick workaround is to already include all possible properties in the initial JS object with 'undefined' as the property value.

        1. main.qml
          0.6 kB
          Günther Teufl
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            shausman Simon Hausmann
            GTDev Günther Teufl
            Votes:
            4 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes