Debug Assertion Failed!
-
I have a small console program that I have written that seems to execute correctly, but I keep getting a Debug Assertion Failed! error when the program is exiting. And it points to this file dbgdel.cpp line 52 and Expression: _BLOCK_TYPE_IS_VALID(pHead->nBlockUse). If I just comple a release version I do not get any error messages when the program exits. I am stuck on how to fix this error. Is it important that I do fix it? Any help will be great. ----------------------- Ok now what? -----------------------
-
I have a small console program that I have written that seems to execute correctly, but I keep getting a Debug Assertion Failed! error when the program is exiting. And it points to this file dbgdel.cpp line 52 and Expression: _BLOCK_TYPE_IS_VALID(pHead->nBlockUse). If I just comple a release version I do not get any error messages when the program exits. I am stuck on how to fix this error. Is it important that I do fix it? Any help will be great. ----------------------- Ok now what? -----------------------
It looks to me like perhaps you're calling delete twice ? When you delete a pointer, do you set it to NULL ? Christian Graus - Microsoft MVP - C++
-
It looks to me like perhaps you're calling delete twice ? When you delete a pointer, do you set it to NULL ? Christian Graus - Microsoft MVP - C++
I don't see any place that I am calling delete twice. I just got a different error. This one said "DAMAGE: after Normal block (#48) at 0x00F74F18" and when I click on the "Ignore" button then I get the first error message again. The program does make calles to a third parties api that I am using is it possible that something in thier code is calling delete after my code has finished? ----------------------- Ok now what? -----------------------
-
I don't see any place that I am calling delete twice. I just got a different error. This one said "DAMAGE: after Normal block (#48) at 0x00F74F18" and when I click on the "Ignore" button then I get the first error message again. The program does make calles to a third parties api that I am using is it possible that something in thier code is calling delete after my code has finished? ----------------------- Ok now what? -----------------------
It's entirely possible that a third party API is creating the ASSERT. Look at the call stack to see where the call comes from that ends up with that ASSERT. Christian Graus - Microsoft MVP - C++
-
I have a small console program that I have written that seems to execute correctly, but I keep getting a Debug Assertion Failed! error when the program is exiting. And it points to this file dbgdel.cpp line 52 and Expression: _BLOCK_TYPE_IS_VALID(pHead->nBlockUse). If I just comple a release version I do not get any error messages when the program exits. I am stuck on how to fix this error. Is it important that I do fix it? Any help will be great. ----------------------- Ok now what? -----------------------
Orville Warnick wrote: And it points to this file dbgdel.cpp line 52 Can you set a breakpoint on this line? When the breakpoint is hit, check the call stack to see how your program got there. Orville Warnick wrote: If I just comple a release version I do not get any error messages when the program exits. You may not get an error message, but the symptom that caused the error still exists. Orville Warnick wrote: Is it important that I do fix it? That all depends on if you want a bug in your program.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb