Click to See Complete Forum and Search --> : Assertion Errors


John Hagen
May 11th, 1999, 11:07 AM
I have an application that uses a lot of CString variables and calls to the UpdateData() function. While the application runs in either DEBUG or REAL TIME, I get DEBUG ASSERTION errors popping up at various times. I know that this means I have "assumed" something and that this assumption is what is causing the error. However, I don't know what I have assumed so it is hard to debug and fix my problem.

Can anyone give me an idea as to where I should use the ASSERT command to debug my application and under what conditions I should use this command? I am really at a loss so I need any and all information you can provide.

Thanks!

John Hagen

beaglebuddy
May 11th, 1999, 11:19 AM
An assertion message should tell you the name of the source code file and the exact line number where the assertion occurred. Just look at the source code to see what condition caused the assertion to be triggered. You can also move up the function call stack to trace through the sequence of events that led to the assertion.