Sign in to follow this  

ASSERT doesn't halt execution

This topic is 4716 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Is the assertion in another thread? Or I think I had a problem trying to use an assertion in my window message procedure before...

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Are you using a custom assert macro/func? If you are could you post it pls.

Share this post


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

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
Sign in to follow this