Thread: error question

  1. #1
    Registered User
    Join Date
    Dec 2006
    Jacksonville, AR

    error question


    What does debug assertion failed mean?


  2. #2
    and the hat of sweating
    Join Date
    Aug 2007
    Toronto, ON
    I believe you're referring to an assert() function that failed it's test, but I'd need to see the exact error to be 100% sure.
    "I am probably the laziest programmer on the planet, a fact with which anyone who has ever seen my code will agree." - esbo, 11/15/2008

    "the internet is a scary place to be thats why i dont use it much." - billet, 03/17/2010

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    A function you called validated it's input parameters, and it failed.

    Look at the error message, or better still run the code in the debugger. Then when the debugger catches the assert, you start looking round to see what you did wrong.

    A good on is to fopen() a file, which returns NULL on error, then attempt to use that to read a file. The reading function could easily assert with fp != NULL (for example).
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed