Nominate our 2022 Qt Champions!

Source of Debug Error of Heap block modified

  • Hi,
    when I debugging I get an error

    HEAP: Free Heap block 008C3608 modified at 008C368C after it was freed

    in Aplication Output window.
    How to find source of this?
    it actually shows me a disassemble window, but it does not tell me anything. And I really do not get where in app I use memory after deletion.
    *this message does not appear when app works in Release.

  • Moderators

    Try running Valgrind analysis in Qt Creator - I have found it often produces better output than standard debugger, showing exactly where and issue occurs

  • @sierdzio thank you.
    However I think this confusion happened thro I used delete QNetworkAccessManager or QNetworkReply which somehow has sophisticated afterwork.
    I just used deleteLater() and everything comes ok

  • Moderators

    Yes, deleteLater() is a good thing to use, especially in networking code.

Log in to reply