ASSERT doesn't halt execution

Started by
7 comments, last by Hybrid666 19 years, 1 month ago
when using assertions in my openGL program, my app doesn't stop, it just beeps, and brings up the abort/retry/ignore dialog and carries on! this is no good because i want to debug the call stack etc before the assertion occurred :( i didn's post this in the openGL bit because i think it is applicable to more than just this kind of application. any suggestions would be much appreciated as this is quite frustrating :( cheers, Hybrid
Advertisement
Is the assertion in another thread? Or I think I had a problem trying to use an assertion in my window message procedure before...
Are you using a custom assert macro/func? If you are could you post it pls.
ive used both a custom assert function and the standard one in <assert.h> ... both ultimately use abort() and the problem still persists :)

and it's all in one thread :)

thanks so far :)
How do you konw it carries on??

The graphics card will still continue, so if your using T/L then that won't stop. All execution of your process's current thread will stop, that's guarenteed as the dialog is modal.

Cheers
Chris
CheersChris
i know it carries on because if i put a random assert(0); in my code, it'l beep, bring up dialog box, but happily render my opengl stuff behind it, let me move around using mouse etc :(

hmmm. very confusing!

cheers guys
Quote:Original post by Hybrid666
when using assertions in my openGL program, my app doesn't stop, it just beeps, and brings up the abort/retry/ignore dialog and carries on! this is no good because i want to debug the call stack etc before the assertion occurred :(

i didn's post this in the openGL bit because i think it is applicable to more than just this kind of application.

any suggestions would be much appreciated as this is quite frustrating :(

cheers,
Hybrid


Press Retry, and it will open your debugger.
Cheers
Lorenzo
i know that. it says press retry to debug above it :p

the point is that wheni press it, i end up with a call stack in some other part of my program, cos the stupid thing is still running :( not good! (unless of course the assert causes it to run into an access violation etc first, in which case i get a call stack from the point of the access violation)

:(

maybe i could write a deliberate access violation into my assert function..? or is that a dirty solution? :D
u know.. the more i look at the way it's behaving.. the more i think chollida1 is right.. i've taken everything out of my assert function except the call to abort(), and problem is solved, except gfx card does carry on :)

think thats my answer tho, and theres something in my custom assert causing the weird crap :(

cheers chollida1 :)

This topic is closed to new replies.

Advertisement