void CWindowedDisplay::Flip(void)
{
RECT dest;
dest.left =offset.x;
dest.top =offset.y;
int y=0;//testing to see if this crazy thing works
y+=5;
dest.right =offset.x + width;
dest.bottom =offset.y + height;
hResult=ddsPrimary->Blt(&dest, ddsBack, NULL, DDBLT_WAIT, NULL);
if(FAILED(hResult)) { err.Log("GFX: %s",ErrName(hResult)); return; }
}
Yet when I try to run the program to the cursor point in the debugger, It jumps to the ''hResult=dd...'' line, even if the cursor was up near the rect stuff. If I comment out that line, the debugger seems to ignore the entire function and skips back to the first line of the program and claims there is no code at the cursor location I specified.... wtf? Anyone know what would cause this?
There is no code at that location...!?!?
I have a function that looks a bit like this:
Oh, and I just took a look at the compiled source for that function and it looks so:
...so apparently the RECT stuff isn''t getting compiled at all. And no, it isn''t in a comment or anything
111: void CWindowedDisplay::Flip(void)112: {00401C60 sub esp,10h00401C63 push esi00401C64 mov esi,ecx113:114:115: RECT dest;116: dest.left =offset.x;117: dest.top =offset.y;118:119: int y=0;120: y+=5;121:122: dest.right =offset.x + width;123: dest.bottom =offset.y + height;124:125: hResult=ddsPrimary->Blt(&dest, ddsBack, NULL, DDBLT_WAIT, NULL);00401C66 push 000401C68 push 1000000h...(goes on)...
...so apparently the RECT stuff isn''t getting compiled at all. And no, it isn''t in a comment or anything
December 14, 2000 11:42 AM
You didn''t post enough of the assembly. It''s possible that the compiler is moving the RECT stuff further down. Are you debugging code that was compiled with optimizations on?
-Mike
-Mike
I''ve had this happen a few times. It''s a bug in Visual Studio 6.0. I''m not sure if one of the service packs fixes it or not, but I''d make sure you have the latest SP installed (SP4).
As for fixing it, do a full recompile on the project in question. Basically, you made a change to the source code but Visual Studio didn''t see it so didn''t recompile, hence it is still using the old compiled code.
- Houdini
As for fixing it, do a full recompile on the project in question. Basically, you made a change to the source code but Visual Studio didn''t see it so didn''t recompile, hence it is still using the old compiled code.
- Houdini
- Houdini
Hrm.. recompiling doesn''t seem to have much of an effect. Also, after a little experimentation, I''ve determined that when I step through any part of the program, it skips any line that doesn''t contain a function call. Now, I could''ve sworn that a week ago it would step through all statements, but perhaps I''m just confused... Is this normal behavior for msvc?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement