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. Having problem with valgrind memcheck tool

Having problem with valgrind memcheck tool

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
10 Posts 3 Posters 4.3k 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.
  • AlienA Offline
    AlienA Offline
    Alien
    wrote on last edited by Alien
    #1

    Hey,
    I use Valgrind memcheck to check memory issue in QT Creator when I run this tool a message appear on title bar it says:
    "Memory Analyzer tool finished,40 issue where found."
    Look at the following screen-shot :
    https://ufile.io/1n1is
    but there isn't any issue inside the box.
    I don't know what does it mean and also does it dangerous for my app or not?

    I appreciate any help.
    Thanks!

    aha_1980A 1 Reply Last reply
    0
    • AlienA Alien

      Hey,
      I use Valgrind memcheck to check memory issue in QT Creator when I run this tool a message appear on title bar it says:
      "Memory Analyzer tool finished,40 issue where found."
      Look at the following screen-shot :
      https://ufile.io/1n1is
      but there isn't any issue inside the box.
      I don't know what does it mean and also does it dangerous for my app or not?

      I appreciate any help.
      Thanks!

      aha_1980A Offline
      aha_1980A Offline
      aha_1980
      Lifetime Qt Champion
      wrote on last edited by
      #2

      hi @Alien

      can you please tell us:

      • which platform,
      • QtCreator version and
      • valgrind version

      you are using?

      Qt has to stay free or it will die.

      AlienA 1 Reply Last reply
      0
      • aha_1980A aha_1980

        hi @Alien

        can you please tell us:

        • which platform,
        • QtCreator version and
        • valgrind version

        you are using?

        AlienA Offline
        AlienA Offline
        Alien
        wrote on last edited by
        #3

        Dear @aha_1980,
        Platform : ubuntu 4.13.0-37-generic 16.0.4 LTS
        QTCreator: 4.3.1 Based on QT 5.9.1
        Valgrind Version : valgrind-3.11.0

        aha_1980A 1 Reply Last reply
        0
        • AlienA Alien

          Dear @aha_1980,
          Platform : ubuntu 4.13.0-37-generic 16.0.4 LTS
          QTCreator: 4.3.1 Based on QT 5.9.1
          Valgrind Version : valgrind-3.11.0

          aha_1980A Offline
          aha_1980A Offline
          aha_1980
          Lifetime Qt Champion
          wrote on last edited by aha_1980
          #4

          Dear @Alien,

          from a quick look in the bug tracker, it seems QTCREATORBUG-19004 could be related.

          Edit: nope, that's with a newer valgrind version.

          Qt has to stay free or it will die.

          AlienA 1 Reply Last reply
          0
          • aha_1980A aha_1980

            Dear @Alien,

            from a quick look in the bug tracker, it seems QTCREATORBUG-19004 could be related.

            Edit: nope, that's with a newer valgrind version.

            AlienA Offline
            AlienA Offline
            Alien
            wrote on last edited by
            #5

            @aha_1980 said in Having problem with valgrind memcheck tool:

            that's with a newer valgrind version.

            So what should I do?
            What does it mean?
            Is it dangerous for my app I mean my app going to crash or not?
            Could you please explain more?

            aha_1980A 1 Reply Last reply
            0
            • AlienA Alien

              @aha_1980 said in Having problem with valgrind memcheck tool:

              that's with a newer valgrind version.

              So what should I do?
              What does it mean?
              Is it dangerous for my app I mean my app going to crash or not?
              Could you please explain more?

              aha_1980A Offline
              aha_1980A Offline
              aha_1980
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @Alien

              have you tried running your program with memcheck outside Creator ?

              Qt has to stay free or it will die.

              AlienA 1 Reply Last reply
              0
              • aha_1980A aha_1980

                @Alien

                have you tried running your program with memcheck outside Creator ?

                AlienA Offline
                AlienA Offline
                Alien
                wrote on last edited by
                #7

                Dear @aha_1980,
                I check the program with below command :
                valgrind --leak-check=yes ./QML_TEST
                and the summery is:
                ==15244== LEAK SUMMARY:
                ==15244== definitely lost: 1,108 bytes in 14 blocks
                ==15244== indirectly lost: 18,296 bytes in 133 blocks
                ==15244== possibly lost: 3,856 bytes in 33 blocks
                ==15244== still reachable: 1,393,828 bytes in 18,042 blocks
                ==15244== of which reachable via heuristic:
                ==15244== length64 : 5,336 bytes in 89 blocks
                ==15244== newarray : 2,160 bytes in 55 blocks
                ==15244== suppressed: 0 bytes in 0 blocks
                ==15244== Reachable blocks (those to which a pointer was found) are not shown.
                ==15244== To see them, rerun with: --leak-check=full --show-leak-kinds=all
                ==15244==
                ==15244== For counts of detected and suppressed errors, rerun with: -v
                ==15244== ERROR SUMMARY: 41 errors from 41 contexts (suppressed: 0 from 0)

                aha_1980A 1 Reply Last reply
                0
                • AlienA Alien

                  Dear @aha_1980,
                  I check the program with below command :
                  valgrind --leak-check=yes ./QML_TEST
                  and the summery is:
                  ==15244== LEAK SUMMARY:
                  ==15244== definitely lost: 1,108 bytes in 14 blocks
                  ==15244== indirectly lost: 18,296 bytes in 133 blocks
                  ==15244== possibly lost: 3,856 bytes in 33 blocks
                  ==15244== still reachable: 1,393,828 bytes in 18,042 blocks
                  ==15244== of which reachable via heuristic:
                  ==15244== length64 : 5,336 bytes in 89 blocks
                  ==15244== newarray : 2,160 bytes in 55 blocks
                  ==15244== suppressed: 0 bytes in 0 blocks
                  ==15244== Reachable blocks (those to which a pointer was found) are not shown.
                  ==15244== To see them, rerun with: --leak-check=full --show-leak-kinds=all
                  ==15244==
                  ==15244== For counts of detected and suppressed errors, rerun with: -v
                  ==15244== ERROR SUMMARY: 41 errors from 41 contexts (suppressed: 0 from 0)

                  aha_1980A Offline
                  aha_1980A Offline
                  aha_1980
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  Dear @Alien ,

                  so it seems memcheck does detect some problems, you will have to check deeper if these are *real * problems or false positives.

                  and it seems Creator has problems parsing the memcheck output, probably in relation to the bug i mentioned before.

                  I'm no expert in that regard, so I won't help you much further.

                  Qt has to stay free or it will die.

                  AlienA 1 Reply Last reply
                  0
                  • aha_1980A aha_1980

                    Dear @Alien ,

                    so it seems memcheck does detect some problems, you will have to check deeper if these are *real * problems or false positives.

                    and it seems Creator has problems parsing the memcheck output, probably in relation to the bug i mentioned before.

                    I'm no expert in that regard, so I won't help you much further.

                    AlienA Offline
                    AlienA Offline
                    Alien
                    wrote on last edited by
                    #9

                    @aha_1980 thank you for your reply by the way when I add some wrong code in order to find does valgrind in qt creator work properly or not I found that valgrind in QT Creator can detect them nicely in the memcheck box but It also show the statement of N issue where found.

                    I don't know whats wrong with it

                    Mighty MM 1 Reply Last reply
                    0
                    • AlienA Alien

                      @aha_1980 thank you for your reply by the way when I add some wrong code in order to find does valgrind in qt creator work properly or not I found that valgrind in QT Creator can detect them nicely in the memcheck box but It also show the statement of N issue where found.

                      I don't know whats wrong with it

                      Mighty MM Offline
                      Mighty MM Offline
                      Mighty M
                      wrote on last edited by
                      #10

                      @Alien I did notice mine also saying Memory Analyzer Too finished. 98 issues were found. And there is nothing showing in the Memory Issues window.

                      But if you click on the filter (the funnel/t shape button), and select show "External Errors" - which is the only one defaulted to off, you'll see you have errors but they are in external libraries (ie
                      I have errors in arm-linux-gnueabihf/ld-2.28.so). You can find these by opening the error and drilling down into it.

                      1 Reply Last reply
                      2

                      • Login

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