Sign in to follow this  
Hybrid666

ASSERT doesn't halt execution

Recommended Posts

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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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 :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this