{"id":4090,"date":"2014-03-30T07:40:42","date_gmt":"2014-03-30T07:40:42","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/qt-finding-memory-leaks-and-errors-collection-of-common-programming-errors\/"},"modified":"2014-03-30T07:40:42","modified_gmt":"2014-03-30T07:40:42","slug":"qt-finding-memory-leaks-and-errors-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/qt-finding-memory-leaks-and-errors-collection-of-common-programming-errors\/","title":{"rendered":"Qt: Finding memory leaks and errors-Collection of common programming errors"},"content":{"rendered":"<p>I&#8217;m developing an application in Qt, and I&#8217;m having problems debbuging the application to find errors that crash my application with a runtime errors. Errors like array access out of bounds or wrong pointers access.<\/p>\n<p>QT Creator simply doens&#8217;t recognize this runtime error. All I have is the exit code, and sometimes an assert fail message in the application output. Something like:<\/p>\n<pre><code>ASSERT failure in QList::operator[]: \"index out of range\", file c:\/Qt\/2010.05\/qt\/include\/QtCore\/..\/..\/src\/corelib\/tools\/qlist.h, line 463\n<\/code><\/pre>\n<p>How can I find the point where this access is being made? I tried running gdb on my app executable, but after the application exits with an error code (03 in this above example) there&#8217;s no backtrace (no stack available).<\/p>\n<p>I have VS installed, and sometimes it asks to debug the exception (not this case :\/) but even so, doens&#8217;t recognize mingw32 debug symbols and only gives me a dissasembled view.<\/p>\n<p>Ideally I would have QT Creator dump stack before such asserts that crash my application. Any tips?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m developing an application in Qt, and I&#8217;m having problems debbuging the application to find errors that crash my application with a runtime errors. Errors like array access out of bounds or wrong pointers access. QT Creator simply doens&#8217;t recognize this runtime error. All I have is the exit code, and sometimes an assert fail [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-4090","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4090","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=4090"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4090\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=4090"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=4090"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=4090"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}