CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 1999
    Location
    Oklahoma
    Posts
    263

    Assertion Errors

    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




  2. #2
    Join Date
    Apr 1999
    Location
    Scottsdale, Arizona
    Posts
    28

    Re: Assertion Errors

    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.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured