Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Memory problems using Qt 5.7

Memory problems using Qt 5.7

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
11 Posts 3 Posters 3.8k Views
  • 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.
  • S Offline
    S Offline
    schouwen
    wrote on 24 Oct 2016, 06:28 last edited by A Former User
    #1

    I am porting a QT 5.2 application using Qt Quick to QT 5.7. The compiler I use is MinGw ( so 32 bits). At first I ran into memory problems using QPluginLoader (in debug code) . Basically it couldnt allocate a single block of memory for the whole plugin. MinGw's debug code increases the size of the plugin immensly so memory fragmentation prevented loading the whole plugin at once, something QT does with plugins. Effect a bad_alloc and no sigar.
    I worked around this by dumping the QPluginLoader which resolved these kind of problems. Unofrtunately this moved the problem to QT itself ( at least QT Quikck) for now I get :
    plugin cannot be loaded for module "QtQuick.Controls": Cannot load library ..\qtquickcontrolsplugind.dll: Not enough storage is available to process this command

    Looking at the source of qt, the problem is identical. The MinGw debug plugins of qtquick are quite large and use the same mechanism to load plugins. If, as in my case, the initialization of the program allocates considerable memory ( but tbh, not excesively so, there is plenty left) QT (and by extension QT quick) can run into problems; in debug mode, using MinGw. This wasnt the case in 5.2 so I must assume that code of loading plugins was changed in between.

    Solutions:
    Switch to a different compiler. As far as I know MSVC allocates much of its debug stuff outside the dll, keeping the dll's bigger as a release but not 20 to 50 times as big as MinGw does. This should give the plugin loader an easier time
    Switch to 64 bits as memory fragmentation is less a problem there.
    Initialize and load all needed qt plugins before doing anything myself. My code is smart enough to deal with memory fragmentation while (it seems) QT's code isnt, at least not for plugins.

    Why do I bring it up here?
    Well first of all, if my conclusions are correct, it seems to me a flaw in the loading mechanisms for plugins. All solutions are dodging the problem but it still is there.
    It was sugested that I pose this question to a developers list but I dont have access to that. This is more a observation/warning for those that encounter these kind of problems.

    1 Reply Last reply
    1
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 24 Oct 2016, 20:12 last edited by
      #2

      Hi,

      Related to the developer list, maybe a silly question but: did you subscribe to the list before posting the email ?

      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
      0
      • S Offline
        S Offline
        schouwen
        wrote on 25 Oct 2016, 06:13 last edited by
        #3

        tried to subscribe (twice) but never got a reply to that

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 25 Oct 2016, 21:15 last edited by
          #4

          No activation email sent ?

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

          S 1 Reply Last reply 26 Oct 2016, 06:38
          0
          • S SGaist
            25 Oct 2016, 21:15

            No activation email sent ?

            S Offline
            S Offline
            schouwen
            wrote on 26 Oct 2016, 06:38 last edited by
            #5

            @SGaist Indeed

            1 Reply Last reply
            0
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 26 Oct 2016, 06:40 last edited by
              #6

              Where did you try to do the subscription ?

              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
              0
              • S Offline
                S Offline
                schouwen
                wrote on 27 Oct 2016, 21:52 last edited by
                #7

                I followed the link you gave in another post : http://lists.qt-project.org/mailman/listinfo/interest. Tried to subscribe; no reply. Few days later tried again. Same result.

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on 27 Oct 2016, 22:14 last edited by
                  #8

                  Pretty strange. You should have received an activation email right away.

                  Maybe @tekojo knows if there's been something messing up with mailing lists setup.

                  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
                  0
                  • T Offline
                    T Offline
                    tekojo
                    wrote on 28 Oct 2016, 08:09 last edited by
                    #9

                    Hi,
                    Haven't heard of anything, but will ask the admins.
                    And then a stupid question, the activation mail isn't in the spam filter?

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      schouwen
                      wrote on 29 Oct 2016, 20:29 last edited by
                      #10

                      I will recheck (thought I did, not 100% certain). Anyway will try a subcribe again. We will see :)

                      1 Reply Last reply
                      0
                      • S Offline
                        S Offline
                        schouwen
                        wrote on 29 Oct 2016, 20:34 last edited by
                        #11

                        ok problem solved ( the subscription that is). It did not ended up in spam or in my regular mail box but in a mail box for advertisements ( haven't a clue why it would end up there).

                        1 Reply Last reply
                        1

                        7/11

                        27 Oct 2016, 21:52

                        • Login

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