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

SegFault when calling Component.createObject with properties

    XMLWordPrintable

Details

    • Linux/Wayland, Linux/X11
    • e68b498424f63c1cb6151e4fc6bbc50bac584909 (qt/qtdeclarative/dev) ae8fb3800ac880bfa9805f9163709d96b66b7788 (qt/qtdeclarative/6.0)

    Description

      Component::createObject accepts optional properties. Where the properties is some JavaScript object.

       

      If the property is specified, even if it is empty, under .mjs environment, segfault will happen and the whole application crash.

       

      For example, following code in .mjs environment will crash:

       

      ```

      component.createObject(root, { title: "B" });

      component.createObject(root, {});

      ```

       

      Segfault will not occur if the property is not specified.

       

      If JavaScript is defined in .qml or in .js file, segfault will not happen. Regardless property is defined or not.

       

      Attached code contains minimum code for reproducing this. Run it with `qmlscene Root.qml`.

      Attachments

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            holi0317 Hollis Wu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: