Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Assert !isEmpty in file C:\Qt\5.7\msvc2013\include\QtCore\qlist.h when execute *.exe

Assert !isEmpty in file C:\Qt\5.7\msvc2013\include\QtCore\qlist.h when execute *.exe

Scheduled Pinned Locked Moved Solved General and Desktop
12 Posts 4 Posters 9.4k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • mrjjM Offline
    mrjjM Offline
    mrjj
    Lifetime Qt Champion
    wrote on last edited by
    #3

    Hi
    1: I assume main.qml is in resource and its compiled into the project?

    2:
    Have you tried to make a deployment folder and check it issue persists ?
    http://doc.qt.io/qt-5/windows-deployment.html

    Pr default, You cannot just click a Qt exe in the build folder.
    It needs its support dlls.
    However, sometimes it does work as it find the ones from the development folder.

    But since you need this to have it run on any other computer, why not just the
    actual way now?

    1 Reply Last reply
    1
    • L Offline
      L Offline
      Locate
      wrote on last edited by
      #4

      I did it like mrjj described. But the error still occures. I figured out that it has something to do that I use QtQuick.Controls 2.0 in my qml files. Without that the program starts. But I Need elements from QtQuick.Controls 2.0. In my *.pro file I use QT += quickcontrols2.

      1 Reply Last reply
      0
      • mrjjM Offline
        mrjjM Offline
        mrjj
        Lifetime Qt Champion
        wrote on last edited by
        #5

        Super
        if you use QML , you also need the
        dependencies of those plugins.

        Also did you see
        http://doc.qt.io/qt-5/qtquick-deployment.html
        and
        http://stackoverflow.com/questions/25049116/deploy-qt5-qml-application

        So most likely , its just missing a dll.

        There is also
        http://www.dependencywalker.com/
        You can use this tool to look at what DLLS the .exe wants. and also what dlss the plugins wants.
        to spot out if something is missing.

        1 Reply Last reply
        0
        • L Offline
          L Offline
          Locate
          wrote on last edited by
          #6

          With CONFIG += console I get the following message in the console:

          "QML debugging is enabled. Only use this in a safe environment.
          QQmlApplicationEngine failed to load component
          qrc:/main.qml:24 Das Plugin des Moduls "QtQuick.Controls" kann nicht geladen wer
          den: Die Bibliothek C:\Daten\IPCam\ConfigV2\debug\QtQuick\Controls.2\qtquickcontrols2plugind.dll kann nicht geladen werden: Das angegebene Modul wurde nicht gef
          unden.

          ASSERT: "!isEmpty()" in file C:\Qt\5.7\msvc2013\include\QtCore/qlist.h, line 341"

          But the qtquickcontrols2plugind.dll is in the folder C:\Daten\IPCam\ConfigV2\debug\QtQuick\Controls.2.

          mrjjM 1 Reply Last reply
          0
          • L Locate

            With CONFIG += console I get the following message in the console:

            "QML debugging is enabled. Only use this in a safe environment.
            QQmlApplicationEngine failed to load component
            qrc:/main.qml:24 Das Plugin des Moduls "QtQuick.Controls" kann nicht geladen wer
            den: Die Bibliothek C:\Daten\IPCam\ConfigV2\debug\QtQuick\Controls.2\qtquickcontrols2plugind.dll kann nicht geladen werden: Das angegebene Modul wurde nicht gef
            unden.

            ASSERT: "!isEmpty()" in file C:\Qt\5.7\msvc2013\include\QtCore/qlist.h, line 341"

            But the qtquickcontrols2plugind.dll is in the folder C:\Daten\IPCam\ConfigV2\debug\QtQuick\Controls.2.

            mrjjM Offline
            mrjjM Offline
            mrjj
            Lifetime Qt Champion
            wrote on last edited by
            #7

            @Locate said in Assert !isEmpty in file C:\Qt\5.7\msvc2013\include\QtCore\qlist.h when execute *.exe:

            qtquickcontrols2plugind.dll

            That is the debug version. See the small d just before.dll
            I assume you trying this with a Debug Build?

            If you look at qtquickcontrols2plugind.dll with dependencywalker.com can it find all it needs?

            I know it says "Das angegebene Modul wurde nicht gefunden." but i had such case with with other DLL and got tired and
            copied all dlls to the folder and then it worked. so it seems it was not "found" due to some dlls it wanted was not there.

            https://forum.qt.io/topic/34210/problem-with-qtquick-controls/15

            Best way seems to check if anything missing

            http://www.dependencywalker.com/help/html/hidm_execute.htm

            1 Reply Last reply
            0
            • L Offline
              L Offline
              Locate
              wrote on last edited by Locate
              #8

              The dependencywalker doesn't give me any missing file. It is the debug Version of my Project and I already copied the whole qml and plugin folders in the Folder of my exe file. But the problem is the same.
              And an other project with QtQuick.Controls 1.4 works fine.

              mrjjM 1 Reply Last reply
              0
              • L Locate

                The dependencywalker doesn't give me any missing file. It is the debug Version of my Project and I already copied the whole qml and plugin folders in the Folder of my exe file. But the problem is the same.
                And an other project with QtQuick.Controls 1.4 works fine.

                mrjjM Offline
                mrjjM Offline
                mrjj
                Lifetime Qt Champion
                wrote on last edited by
                #9

                @Locate said in Assert !isEmpty in file C:\Qt\5.7\msvc2013\include\QtCore\qlist.h when execute *.exe:

                And an other project with QtQuick.Controls 1.4 works fine.

                Hmm normally dep walker finds it.

                You could try with QFile to read the
                "qrc:/main.qml"
                and see if its truly embedded as it should.

                Else Im not sure what goes wrong.

                You do test the deployment folder on a pc with no Qt installed?

                1 Reply Last reply
                0
                • L Offline
                  L Offline
                  Locate
                  wrote on last edited by
                  #10

                  There were to dlls missing Qt5QuickControls2d.dll and Qt5QuickTemplates2d.dll which wasn't copied by C:\Qt\5.7\msvc2013\bin\windeployqt.exe .
                  Maybe windeployqt.exe could be changed to copie all needed DLLS?

                  mrjjM 1 Reply Last reply
                  1
                  • L Locate

                    There were to dlls missing Qt5QuickControls2d.dll and Qt5QuickTemplates2d.dll which wasn't copied by C:\Qt\5.7\msvc2013\bin\windeployqt.exe .
                    Maybe windeployqt.exe could be changed to copie all needed DLLS?

                    mrjjM Offline
                    mrjjM Offline
                    mrjj
                    Lifetime Qt Champion
                    wrote on last edited by mrjj
                    #11

                    @Locate
                    Good work.
                    Yes it would be cool if windeployqt took them too.

                    Not sure if a Qt bug or something in this case that made it not
                    copy it also.

                    If you feel like finding out, you can look in
                    https://bugreports.qt.io
                    or even add as a bug or feature request.

                    1 Reply Last reply
                    0
                    • SGaistS Offline
                      SGaistS Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on last edited by
                      #12

                      Hi,

                      You can manually add modules as parameters of windeployqt, that might be enough in your case.

                      Hope it helps

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      1

                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved