Re: VS Debugger Vs Exceptions
Jon Watte <jwatte <at> gmail.com>
2009-08-23 21:00:22 GMT
Ah, it's a structured exception, not a regular exception. Those are
handled either by a __except, or by a SetUnhandledExceptionHandler (or
whatever that Win32 function is called -- something like that)
F11 to "step in," and clicking "pass the exception to the program *might* work.
Is your app MFC? MFC silently catches segfaults and goes back to the
main loop. That's got to be one of the dumbest design decisions I've
ever seen...
Sincerely,
Jw
On 8/23/09, James Robertson <jamesr <at> funcom.com> wrote:
> Because I'm not convinced the catch is in my code.
>
> Actually, I'm not convinced that an exception is being caught at all
> after looking at this a bit more yesterday.
>
> What I know for sure is:
>
> 1) An access violation occurs inside the nvidia display driver while
> processing a call to Present. (Vista64, latest drivers, never happened
> before I updated the drivers two days ago.)
> 2) The debugger breaks, of course, and I can roughly see the callstack.
> (No symbols for the nvidia driver, but the bottom of the callstack looks
> correct.)
> 3) If the debugger exception settings aren't set to break when thrown
> the debugger quietly notes the access violation and execution continues.
> 4) The application does not crash (leading me to believe something
> somewhere is handling the exception) but the stack doesn't appear to be
> unwound, and subsequently Things Happen (tm).
>
> If I set a breakpoint at the top of the function that calls Present I
> can step through until I hit the Present call, hit F10 to step over it
> and the next thing I know is I'm back at my breakpoint again. (And a
> breakpoint after the call to Present isn't hit either.) I tried putting
> a few breakpoints in destructors of known local objects (thanks for that
> sneaky suggestion, Bert) but they weren't hit either.
>
>
>
> Kris Lamb wrote:
>> Not sure if maybe this is too obvious/tidious and you already tried
>> this, but why not set break points in all your catch statements?
>>
>> On Sat, Aug 22, 2009 at 4:32 AM, James Robertson <jamesr <at> funcom.com
>> <mailto:jamesr <at> funcom.com>> wrote:
>>
>> Ah, but I want to see *where* it was handled.
>>
>>
>> Andrew Finkenstadt wrote:
>>
>> On Fri, Aug 21, 2009 at 9:34 AM, James Robertson
>> <jamesr <at> funcom.com <mailto:jamesr <at> funcom.com>
>> <mailto:jamesr <at> funcom.com <mailto:jamesr <at> funcom.com>>> wrote:
>>
>> Hi,
>>
>> Anyone know whether it's possible to step to where an exception
>> will be caught when the VS debugger passes it on to the
>> application being debugged?
>>
>> James
>>
>>
>> Yes.
>>
>> In visual studio, configure your debug -> exception settings
>> to catch when thrown, as well as when it was not handled.
>>
>> --Andy
>>
>>
>> ------------------------------------------------------------------------
>>
>>
>>
>> _______________________________________________
>> Sweng-Gamedev mailing list
>> Sweng-Gamedev <at> lists.midnightryder.com
>> <mailto:Sweng-Gamedev <at> lists.midnightryder.com>
>>
>> http://lists.midnightryder.com/listinfo.cgi/sweng-gamedev-midnightryder.com
>>
>>
>> _______________________________________________
>> Sweng-Gamedev mailing list
>> Sweng-Gamedev <at> lists.midnightryder.com
>> <mailto:Sweng-Gamedev <at> lists.midnightryder.com>
>>
>> http://lists.midnightryder.com/listinfo.cgi/sweng-gamedev-midnightryder.com
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Sweng-Gamedev mailing list
>> Sweng-Gamedev <at> lists.midnightryder.com
>> http://lists.midnightryder.com/listinfo.cgi/sweng-gamedev-midnightryder.com
>>
> _______________________________________________
> Sweng-Gamedev mailing list
> Sweng-Gamedev <at> lists.midnightryder.com
> http://lists.midnightryder.com/listinfo.cgi/sweng-gamedev-midnightryder.com
>
--
--
--
Americans might object: there is no way we would sacrifice our living
standards for the benefit of people in the rest of the world.
Nevertheless, whether we get there willingly or not, we shall soon
have lower consumption rates, because our present rates are
unsustainable.
_______________________________________________
Sweng-Gamedev mailing list
Sweng-Gamedev <at> lists.midnightryder.com
http://lists.midnightryder.com/listinfo.cgi/sweng-gamedev-midnightryder.com