Sign in to follow this  

Unhandled exception !!

This topic is 4391 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

Hi, I've bring my c++ project home for the week end...strangely when i quit the program, it gives me an unhandled exception : an invalid HANDLE was specified. Which did not happened before when i was at work... When this occurs, the .net IDE offers to Break or Continue, if I break, it tells me that source code is unavailable and can only show me assembler...which I don't quite understand. But, if i look at the current stack frame while looking at assembler...it tells me ntdll.dll! and some adress. Does this mean that the problem occurs in ntdll.dll ? What could be causing this ? Bad destruction of objets ? I check with some break points, and the problem really occurs when all my code has finished. Thank you for any help.

Share this post


Link to post
Share on other sites
The problem most likely lies in your code. The invalid handle means that you use a handle (most probably a window handle) in some API function after said handle has become invalid (e.g. the window has been destroyed).
Check your window procedure and make sure to handle both WM_CLOSE and WM_DESTROY messages properly.

Share this post


Link to post
Share on other sites
Those kind of errors can be tough to track down. It really helps to continously debug your code as you develop so taht you can say with certanty that a bug wasnt' in your code say a week ago.

Other than that start commenting out code modules until the error stops and then ease that code back in until you can pinpoint the offending module.

If you download the windgb and windows symbol files you can also see the stack trace, though with an exception that may not help:)

A good start would be searching for any HANDLE declarations in your code!!

Cheers
Chris

Share this post


Link to post
Share on other sites
ok i found the problem... i recently removed my geforce 6600 from my computer to sell it to someone... and put in a geforce2 ti from asus before i buy a new card... when i installed the drivers from nVidia website, it said that no hardware was qualifying for the drivers. So i got the ones from asus since it's a asus v7700... now games like Cod2 run great... BUT, that is what gave the unhandled exception... when i ROLLED BACK the driver to the default one given by Windows xp...the bug is gone, but now my games run crappy as hell :(

Share this post


Link to post
Share on other sites
It's because the most recent drivers from nVidia doesn't support older hardware, like your G2. You need to look in the driver archive (located in the left menu, when you have selected the most recent driver). I'm not sure in which driver they quit supporting G2, but I'm sure than can be found in the release notes (located in the bottom). But what I'm sure of is that the 66.93 supports G2, since I've just installed that on my brother's TNT2 system :P But that driver is a year old, so there should be much newer ones with support for G2 - I think it's quite recently they've quit supporting those chipsets, but that should be written somewhere in the release notes, as I've mentioned before.

Share this post


Link to post
Share on other sites

This topic is 4391 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.

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