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

ActiveQt QApplication instance crashes if parameters() is called

    XMLWordPrintable

Details

    • c0d93d408d4eafcaab06d455b8c3ce1e2c21f8db (qtactiveqt/5.9, 21.2.2017, 5.9). 2fbd30b1de6abcb7b660083dde120c8b03a3abbc (qtactiveqt/5.6, 27.3.2017, 5.6.3)

    Description

      If parameters() method is called for a QApplication that is created by QAxServerBase, application crashes due to accessing a reference to the passed argc argument that went out of scope.

      Culprit code is located at QAxServerBase.cpp, QClassFactory::CreateInstanceHelper() method:

      if (!qApp) {
          qax_ownQApp = true;
          int argc = 0;
          new QApplication(argc, 0);
      }
      

      QCoreApplication seems to save reference to this passed argc argument rather than making a copy of it, even in this case.

      Attachments

        Issue Links

          Activity

            People

              kleint Friedemann Kleint
              jussi_witick Jussi Witick
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: