Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Special Interest Groups
  3. C++ Gurus
  4. [Valgrind] Conditional jump or move depends on uninitialised value on setTransform()
Forum Updated to NodeBB v4.3 + New Features

[Valgrind] Conditional jump or move depends on uninitialised value on setTransform()

Scheduled Pinned Locked Moved C++ Gurus
11 Posts 2 Posters 7.4k Views 1 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.
  • S Offline
    S Offline
    stukdev
    wrote on last edited by
    #1

    Hi, i create a function in a QGraphicsPixmapItem class for rotate on Y axis my object.
    Valgrind says to me Conditional jump or move depends on uninitialised value on this line
    @
    setTransform(QTransform().translate(icon.width()/2 ,icon.height()/2).rotate(v,Qt::YAxis).translate(-icon.width()/2 ,-icon.height()/2), false);
    @

    v is a parameter of function.
    Anybody know the problem?

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andre
      wrote on last edited by
      #2

      Valgrind is known to give some false positives for Qt. There are suppression files that contain the known ones. If you find a valgrind issue that is not in those files, please report it.

      One way of testing this is to use the new Qt Creator that has the Analysis function build in. That one uses valgrind and the suppression files I mentioned.

      1 Reply Last reply
      0
      • S Offline
        S Offline
        stukdev
        wrote on last edited by
        #3

        New Qt Creator mean 2.4.0?

        [quote author="Andre" date="1322039224"]Valgrind is known to give some false positives for Qt. There are suppression files that contain the known ones. If you find a valgrind issue that is not in those files, please report it.

        One way of testing this is to use the new Qt Creator that has the Analysis function build in. That one uses valgrind and the suppression files I mentioned. [/quote]

        1 Reply Last reply
        0
        • A Offline
          A Offline
          andre
          wrote on last edited by
          #4

          I think so, yes. I have spotted it in some version, but I am not at a system where I can check which version that is exactly.

          1 Reply Last reply
          0
          • S Offline
            S Offline
            stukdev
            wrote on last edited by
            #5

            I have a 2.3.1 with analyzer option. But i can't find the suppression files to add.
            Do you remember where it located?

            [quote author="Andre" date="1322039701"]I think so, yes. I have spotted it in some version, but I am not at a system where I can check which version that is exactly. [/quote]

            1 Reply Last reply
            0
            • A Offline
              A Offline
              andre
              wrote on last edited by
              #6

              For the build-in analyzer, they should be used automatically.

              1 Reply Last reply
              0
              • S Offline
                S Offline
                stukdev
                wrote on last edited by
                #7

                Mmm i try 2.4.0 but nothing change.
                Is there a method to know what suppression rules is used?

                [quote author="Andre" date="1322041126"]For the build-in analyzer, they should be used automatically. [/quote]

                1 Reply Last reply
                0
                • A Offline
                  A Offline
                  andre
                  wrote on last edited by
                  #8

                  I don't know that, sorry! And perhaps you just stumbled on a real issue that is not in the suppression files... I suggest you fire up your IRC client, connect to the freenode network, and drop into the #qt-labs channel. You can discuss the issue with Qt engineers there.

                  1 Reply Last reply
                  0
                  • S Offline
                    S Offline
                    stukdev
                    wrote on last edited by
                    #9

                    @Andre can you look this https://bugreports.qt.nokia.com/browse/QTCREATORBUG-6607

                    1 Reply Last reply
                    0
                    • A Offline
                      A Offline
                      andre
                      wrote on last edited by
                      #10

                      Ah, I am very sorry. I misread your initial post, and thought that the line you posted was in the code of Qt itself, instead of in your own code. That is why I thought you might have stumbled on a (Qt) bug, and you should head into #qt-labs and all the stuff about valgrind suppression lists.

                      Those lists are of course never going to apply to your own code. They are not magical :-)

                      Again, I apologize for sending you down the wrong track on this one.

                      As to why Valgrind tells you what it does: sorry, I don't know. That would require disecting your code to see what really happens there in detail. I'm afraid that that is your puzzle to make...

                      1 Reply Last reply
                      0
                      • S Offline
                        S Offline
                        stukdev
                        wrote on last edited by
                        #11

                        Ok, thanks to help.

                        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