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

QQmlApplicationEngine crashes if Qt6PrintSupport is loaded first.

    XMLWordPrintable

Details

    • Windows

    Description

      Hello

      I am having problems if I load and unload some Qt Libraries before creating my GUI with QQmlApplicationEngine.

      I did an example with LoadLibraryA, but also happens if the loading process is done statically.

       

      int main(int argc, char* argv[])
      { 
          QApplication app(argc, argv); 
          HMODULE hModule = LoadLibraryA("C:\\Qt\\6.5.0\\msvc2019_64\\bin\\Qt6PrintSupportd.dll"); 
          FreeLibrary(hModule); 
          QQmlApplicationEngine engine; 
          engine.load(QUrl(QStringLiteral("Welcome.qml"))); 
          app.exec(); 
      }
      

       

      If I dont call freelibrary, the example runs fine. If i call freelibrary, the app will crash in the last line.

       

      This is my Welcome.qml file

       

      import QtQuick
      import QtQuick.Controls
      
      ApplicationWindow { 
          id: mainWindow 
          title: "MyWindow"
          objectName: "mainWindow"
          visible:true
      }
      

      I hope it is clear.

       

      Regards

      PD 1. If i set the VS2022 to use VS2019 compiler, it happens aswell.

      PD 2. It works ok in Qt5

       

      Attachments

        1. gui.zip
          3 kB
        2. Stack.png
          Stack.png
          44 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qtqmlteam Qt Qml Team User
            jose_antonio Jose Antonio Palacios Alonso
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes