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

[Reg 6.2.0 -> 6.2.11 (possibly 6.2.3->6.2.4)][ActiveQt] Resizing QTableView header inside a QAXCLASS freezes COM application

    XMLWordPrintable

Details

    • Windows
    • 3ff32f4a2 (dev), 0db25e6c7 (dev)

    Description

      Code

      // main.cpp
      #include <QAxFactory>
      #include <QTableView>
      #include <QFileSystemModel>
      
      class Qt6ActivexSample : public QTableView
      {
          Q_OBJECT
          Q_CLASSINFO("ClassID", "{8710B852-5257-4C17-AA81-BD5F46CF2F0A}")
          Q_CLASSINFO("InterfaceID", "{E892965D-A972-45DC-BF59-CD00D6B20A3A}")
          Q_CLASSINFO("EventsID", "{C11A1760-585B-4930-A4F0-301C56B0029E}")
      
      public:
          Qt6ActivexSample(QWidget *parent = nullptr) : QTableView(parent)
          {
              auto model = new QFileSystemModel(this);
              model->setRootPath("C:/");
              setModel(model);
          }
      };
      
      #include "main.moc"
      
      QAXFACTORY_BEGIN(
          "{E544E321-EF8B-4CD4-91F6-DB55A59DBADB}", // type library ID
          "{E37E3131-DEA2-44EB-97A2-01CDD09A5A4D}") // application ID
          QAXCLASS(Qt6ActivexSample)
      QAXFACTORY_END()
      

       

      Steps to reproduce

      1. Load the attached project (which uses the filenames and GUIDs from the now-defunct "Simple QML" example)
      2. Build and register the DLL (I simply ran Qt Creator as Administrator and clicked "Build Project")
      3. Run windeployqt on the DLL
      4. Run testcon, select "File" > "Insert Control", and select "Qt6ActivexSample"
      5. Keep resizing the QTableView header

      (Remember to unregister the DLL when done testing)

       

      Outcomes
      Within a few seconds, the whole testcon app will freeze and one CPU core will be stuck running at 100%

       

      Notes

      Attachments

        1. image-2024-09-12-17-45-09-034.png
          image-2024-09-12-17-45-09-034.png
          21 kB
        2. IssueReproduce.mp4
          222 kB
        3. qtbug123498.zip
          2 kB
        4. qtbug-123498.zip
          2 kB
        5. qtbug123498-win11.gif
          qtbug123498-win11.gif
          883 kB
        6. QTTestActivex_issue.zip
          499 kB

        Issue Links

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

          Activity

            People

              owolff Oliver Wolff
              skoh-qt Sze Howe Koh
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are 2 open Gerrit changes