Skip to main content
gamedev.net
🔒 Locked

Unhandled exception !!

Started by md_lasalle 3 replies 550+ views
Original Post
md_lasalle
md_lasalle
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.
darookie
darookie
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.
chollida1
chollida1
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
CheersChris
md_lasalle
md_lasalle
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 :(
nife
nife
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.
Killers don't end up in jailThey end up on a high-score!

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.