buffer overwrite debugging in VC++
Ok, I did the watch variable and found the lines that make the problem, they are:
could that cause a problem?
Thanks.
m_vCollisions.Body1->m_MyState.AngularVelocity += (Impulse/state_a.MomentOfInertia)*(R_ap.Dot(Normal)); m_vCollisions.Body2->m_MyState.AngularVelocity -= (Impulse/state_b.MomentOfInertia)*(R_bp.Dot(Normal));
could that cause a problem?
Thanks.
Well, the obvious questions are:
Is i within permitted index values?
Does content of the array at index i have a valid Body1 pointer to an existing object?
-yes
-yes
I still can't figure out what the problem is:(
When it gets to th\t line it doesn't always crash, it seems to crash sort of randomly. What could this mean?
Thanks.
-yes
I still can't figure out what the problem is:(
When it gets to th\t line it doesn't always crash, it seems to crash sort of randomly. What could this mean?
Thanks.
What version of VC++ are you using? VC2005's STL implementation will break to the debugger if you access an invalid location in the vector, which pre-VC2005 STL implementations don't do.
It's usually impossible to tell if one line of code is going to cause a problem, it like saying "Have I used to correct version of the word 'there'?" - It's absolutely impossible to tell without some sort of context.
It's usually impossible to tell if one line of code is going to cause a problem, it like saying "Have I used to correct version of the word 'there'?" - It's absolutely impossible to tell without some sort of context.
I'm using Express - 2005. I got this on msdn:
What is the InitInstance function and were do I find it?
Thanks.
Quote:
To use the debug build to check for memory overwrite, you must first rebuild your project for debug. Then, go to the very beginning of your application's InitInstance function and add the following line:
afxMemDF |= checkAlwaysMemDF;
What is the InitInstance function and were do I find it?
Thanks.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement