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

QQmlComponent::setData segfaults if no parent

    XMLWordPrintable

Details

    • d73497f136fbfad5d367e5af429adb7d38af6dfe (qt/qtdeclarative/5.12)

    Description

      The following code segfaults for me :

      int main(int argc, char** argv)
      {
            QCoreApplication app(argc, argv);
      
            QQmlEngine eng;
            QQmlComponent comp;
            comp.setData("import QtQuick 1.0; QtObject { }", QUrl(""));
      }
      

      I have to set (rightfully) the parent of QQmlComponent (

      QQmlComponent comp{&eng};

      ) but I don't think that it should crash.

      Attachments

        For Gerrit Dashboard: QTBUG-55407
        # Subject Branch Project Status CR V

        Activity

          People

            shausman Simon Hausmann
            jcelerier Jean-Michaƫl Celerier
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes