Archived

This topic is now archived and is closed to further replies.

lc_gta

weird debug problem w/ VC++

Recommended Posts

lc_gta    122
Ok, i''ve been trying to fix this for a couple days now and i''ve come no closer to figuring out what''s going on so hopefully one of you can point me in the right direction. When i try to run my program(a software renderer) i get a message saying: Debug Assertion Failed, and then something about the expression _CrtIsValidHeapPointer(pUserData) it then says an exception breakpoint has been reached or something like that. I''ve stepped through my program more times than i care to recall trying to find out what''s wrong with my code, but when i get to the point where this error comes up it just pops up some assembly code. anyone run into something like this? Lance

Share this post


Link to post
Share on other sites
Shannon Barber    1681
It''s bad. If you''re lucky you''re passing a bad pointer to delete - or deleting something twice, etc...

Normally you would look at the call-stack (view->debug windows->call stack) and it would indicate which of your functions is causing the error. This is somewhat unlikely in this case - as the problem is just being _detected_ in that function. It''s cause is likely memory corruption in code that was executed earlier.

Make sure you''ve not doing something silly like delete''ing an uninitialized pointer, or deleteing the same one twice.
Then start commenting out large chunks of code until you can start-up and exit gracefully. Then uncomment in smaller blocks... happy hunting Orkin Man

Share this post


Link to post
Share on other sites
lc_gta    122
thanks for the suggestions. I''m still not exactly sure what''s causing my problems but i''ve got it narrowed down to my clipping function so that narrows things down a lot. This function was originally written on a unix box and I''ve found lots of things that VC++ doesn''t like that g++ was fine with so hopefully its a fairly simple fix

thanks again
Lance

Share this post


Link to post
Share on other sites