Application crashes then starts?

I have a strange behaviour of my application. Usually, when you do an access violation or something else bad, you have the crash window from windows, proposing to send the problem to microsoft, and then your application is killed.
I am having the opposite case. When i start my application, i get the crash message before seing my application. And when i close this message, my application finally appears. I can't debug the problem, since it doesn't appear when i run my app from visual c++. If i launch the application , and then click the debug button in the crash window, i don't have the call stack either, my application just starts.
Any idea how to diagnose this?
Ah, i found out. For the curious ones, i was trying to use http://msdn.microsoft.com/en-us/library/xcb2z8hs%28v=VS.80%29.aspx to change my threads' name in the debugger. But i had not put the try{} around the RaiseException(), so outside of the IDE i had the crash exception message, and my application kept running afterwards since it was not fatal.
Topic archived. No new replies allowed.