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. HEAP CORRUPTION DETECTED
QtWS25 Last Chance

HEAP CORRUPTION DETECTED

Scheduled Pinned Locked Moved General and Desktop
6 Posts 5 Posters 8.7k 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.
  • Y Offline
    Y Offline
    yaseminyilmaz
    wrote on 17 Jul 2012, 11:32 last edited by
    #1

    Hi all,

    I use Qt 4.8.2 libraries compiled with VS2008 and Qt Creator 2.4.1 on Windows 7 host machine. My project settings uses Microsoft Visual C++ Compiler 9.0 (x86) as tool chain.

    I start my application at debug mode on Qt Creator. Sometimes it throws "HEAP CORRUPTION DETECTED" error when I close the application. This error occurs always while closing after one time occurs until I start it with clean build. After clean build, this error does not occur for a uncertain time.

    I've read a bug report at link https://bugreports.qt-project.org/browse/QTBUG-24741 . Is there anyone encountered with such problem? What can be the problem?

    Thanks advance for your helps and explanations,
    Yasemin

    1 Reply Last reply
    0
    • S Online
      S Online
      sierdzio
      Moderators
      wrote on 17 Jul 2012, 11:36 last edited by
      #2

      Does it ever happen when run in release mode?

      PS. The link you provided does not work.

      (Z(:^

      1 Reply Last reply
      0
      • Y Offline
        Y Offline
        yaseminyilmaz
        wrote on 18 Jul 2012, 07:46 last edited by
        #3

        Sorry about late answer because the error occurs randomly, sometimes it takes a long time. I've tried in release mode and it does not crash in release mode. As according to you, why does this error occur in debug mode? Is the problem related to Qt or my code or else?

        Thanks a lot for your helps

        1 Reply Last reply
        0
        • K Offline
          K Offline
          koahnig
          wrote on 18 Jul 2012, 08:01 last edited by
          #4

          IMHO it may be a problem of the compiler tool chain. However, if it does produce the error in debug, but not in release mode, is not a sufficient prove. Mysterious problems such this are often triggered by some less optimal code lines. Did you take care of all warnings and eliminated them in your code? Sometimes a different compiler will provide different warnings. Did you try with another compiler and check its warnings?

          Vote the answer(s) that helped you to solve your issue(s)

          1 Reply Last reply
          0
          • F Offline
            F Offline
            franku
            wrote on 18 Jul 2012, 15:49 last edited by
            #5

            Kidding: Sometimes the error lies between both ears, where someone does strange things on the heap. But maybe I can only speak for myself.

            Please also have a look at your own code. What are you doing with the heap and when or where are the objects destroyed you've allocated?

            This, Jen, is the internet.

            1 Reply Last reply
            0
            • K Offline
              K Offline
              KeithS
              wrote on 19 Jul 2012, 14:09 last edited by
              #6

              You will see the error concerning heap corruption in debug builds because heap checking is being carried out when freeing memory only in the debug C++ runtime libraries.

              Usual causes are writing past the end of an array you've allocated on the heap, using delete / delete [] wrongly etc.

              1 Reply Last reply
              0

              4/6

              18 Jul 2012, 08:01

              • Login

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