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

iOS Qt 5.5.0a QML engine nullifies values in array if used with push/shift resulting in assertion crashes

    XMLWordPrintable

Details

    • iOS/tvOS/watchOS

    Description

      Qt 5.5 Alpha nullifies values in an array if objects returned from a JavaScript obejct get pushed and shifted in and out of an array.

      I attached a simple example which adds up to 100 items into an array and subsequently prints out the current array status. After some iterations there is a log output like the following (truncated manually):

      qml: [ ...

      {"x":1}

      ,

      {"x":1}

      ,

      {"x":1}

      ,null,null,null,null,null,null,null,null,null,null,null,

      {"x":1}

      , ... ]

      Note that if we push the objects into the array without calling the doNothing() function all values are stored as intended.

      This is also related to QTBUG-45888 which crashes the app if you try to access such a null value (a sample is included in the attached example line 20).

      This looks like a regression as the sample runs perfectly fine on Qt 5.4.1 (iOS).

      Attachments

        1. main.qml
          0.6 kB
          Alex Leutgöb

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              vestbo Tor Arne Vestbø
              alexleutgoeb Alex Leutgöb
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes