Skip to main content
GameDev.net gamedev.net
🔒 Locked

ASSERT doesn't halt execution

Started by Hybrid666 Feb 16, 2005 at 1:39 PM 7 replies 2k views
Original Post
Hybrid666
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
Evil Steve
Evil Steve
Is the assertion in another thread? Or I think I had a problem trying to use an assertion in my window message procedure before...
Hybrid666
Hybrid666
ive used both a custom assert function and the standard one in ... both ultimately use abort() and the problem still persists :)

and it's all in one thread :)

thanks so far :)
chollida1
chollida1
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
Hybrid666
Hybrid666
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
Lorenzo
Lorenzo
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
Hybrid666
Hybrid666
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
Hybrid666
Hybrid666
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 :)

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.