#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2002
    Location
    Charleston, SC
    Posts
    0
    Rep Power
    0

    Debug Assertion Failed!


    I get a Debug Assertion Failed error message (_CrtCheckMemory) when I run my code. Anywhere I use a "new" statement is succeptible to this error. It doesn't happen every time certain code is executed but I can reproduce the error when certain code is run more than once. Someone told me I could be running out of heap space but I find that hard to believe. I am having hard time debugging because I think the errors are appearing at places which are the symptom of the problem, not the cause. Anyone have any ideas where I should look to try and track this down?

    Thanks
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Posts
    10
    Rep Power
    0
    Your heap may be getting corrupted in another part of your code, and the internal checks inside new may be noticing this and asserting false. There are several ways this can happen, but it is often because you're freeing memory that's already been freed.

    Running your code with a utility like Rational Purify may help identify where the invalid memory usage is occurring. If you don't have access to Purify, you might look for similar tools that are available on the web.

IMN logo majestic logo threadwatch logo seochat tools logo