Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. QT plugins memory footprint and the debugger
QtWS25 Last Chance

QT plugins memory footprint and the debugger

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
5 Posts 3 Posters 1.4k 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 last edited by
    #1

    Hi,
    I am (trying) to upgrade a qtquick application from qt 5.2 to qt 5.7. Now I am running in a bit unexpected problem. The application is quite large and contains 10+ modules that use the QTPluginLoader mechanism to load its functionality. It worked fine under 5.2 but under 5.7 I get memory issues when loading the plugins. Smaller plugins load fine, bigger ones bug out with a bad_alloc. Now I am using the MingGW compiler and this generates debug plugins which can grow quite big, 50+ Mb. Note that the problem disappears when I shrink the size of a plugin (removing functionality) and is happening purely in the qt code. I traced it down to the attempt of the pluginloader to read the whole plugin at once in one chunck of memory at which point it (can) generates a bad_alloc.
    Of course I can split up my plugins but I was wondering if this is a real limitation or that I have to search elsewhere for the cause of this problem

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

      Hi and welcome to devnet,

      Interesting question. Since it's bit lower level, I'd recommend bringing this to the interest mailing list. You'll find there Qt's developers/maintainers. This forum is more user oriented.

      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
      0
      • SGaistS SGaist

        Hi and welcome to devnet,

        Interesting question. Since it's bit lower level, I'd recommend bringing this to the interest mailing list. You'll find there Qt's developers/maintainers. This forum is more user oriented.

        S Offline
        S Offline
        schouwen
        wrote on last edited by
        #3

        @SGaist I will do that

        1 Reply Last reply
        0
        • S schouwen

          Hi,
          I am (trying) to upgrade a qtquick application from qt 5.2 to qt 5.7. Now I am running in a bit unexpected problem. The application is quite large and contains 10+ modules that use the QTPluginLoader mechanism to load its functionality. It worked fine under 5.2 but under 5.7 I get memory issues when loading the plugins. Smaller plugins load fine, bigger ones bug out with a bad_alloc. Now I am using the MingGW compiler and this generates debug plugins which can grow quite big, 50+ Mb. Note that the problem disappears when I shrink the size of a plugin (removing functionality) and is happening purely in the qt code. I traced it down to the attempt of the pluginloader to read the whole plugin at once in one chunck of memory at which point it (can) generates a bad_alloc.
          Of course I can split up my plugins but I was wondering if this is a real limitation or that I have to search elsewhere for the cause of this problem

          kshegunovK Offline
          kshegunovK Offline
          kshegunov
          Moderators
          wrote on last edited by
          #4

          @schouwen said in QT plugins memory footprint and the debugger:

          which can grow quite big, 50+ Mb

          I'd bet my head you have tons of resources inside those. That is enormous, the whole of the QtCore or the QtGui is that size. My advice - reduce the plugins' size. Compile the resources as external files and not into the binary.

          Read and abide by the Qt Code of Conduct

          1 Reply Last reply
          2
          • S Offline
            S Offline
            schouwen
            wrote on last edited by
            #5

            Its the way MIngw creates its debug code. It puts it inside the the dll making it 20 times(or more) bigger then a release version. The relevant dll's (that causes a problem) have in fact no resources. It is pure algorithms. MS puts the bulk of debug stuff outside the dll making its size more managable.

            1 Reply Last reply
            0

            • Login

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