[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1041
  • Last Modified:

Debug Assertion Failure in dbgheap.c

Hi Experts,

..."CrtIsValidHeapPointer(pUserData)"...

The application that I am working on crashes with this error message.  I do
not have the problem with the Release version.  It only happen in the Debug version.
It was actually crashing on a function call from a static library which I don't have the
source code.  But, I did some googling and it appears that this is something to do with
the Runtime/Debug mismatch.  But, I have checked my setting and all seems to be ok.  The
thing that the problem only happening in Debug version confirms that this is a problem related to
the Runtime/Debug mismatch.  Can anybody tell me how to fix this or some insight into this....
Thanks


0
thanesh
Asked:
thanesh
  • 2
1 Solution
 
jhanceCommented:
First, you only get this in the DEBUG build because this macro or function (can't remember which it is) doesn't do anything in the RELEASE build.  There is no heap debug code in the RELEASE build for this to check so it's essentially a NOP.

Second, this is reporting that there is a problem in the HEAP.  Could be, as you noted, a build mismatch problem but that is unlikely unless you are doing some tricks with the libraries or build options.  More likely it means exactly what it says, you've done something in your application that is trashing part of the heap and this is a RED FLAG that you need to resolve this prior to releasing your app.
0
 
jhanceCommented:
I take it you found the problem?  

You might want to post what you found so that someone who views this question in the future might learn from your situation.
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now