views:

67

answers:

1

I am now trying to use this Application Verifier debugging tool, but i am stuck, first of all: it breaks the program at a line that is simple variable set line (s = 1; for example)

Secondly, now when i run this program under debugger, my program seems to have changed its behaviour: i am drawing image, and now one of the colors has changed o_O, all those parts of the image that i dont draw on, has changed the color to #CDCDCD when it should be #000000, and i already set the default color to zero, still it becomes to #CDCDCD.

How do i make any sense to this?

Here is the output AV gave me:

VERIFIER STOP 00000002: pid 0x8C0: Access violation exception. 

    14873000 : Invalid address causing the exception
    004E422C : Code address executing the invalid access
    0012EB08 : Exception record
    0012EB24 : Context record

AVRF: Noncontinuable verifier stop 00000002 encountered. Terminating process ... 
The program '[2240] test.exe: Native' has exited with code -1073741823 (0xc0000001).
A: 

I am willing to bet that s is NOT a "simple" variable. I'm much more likely to believe it's something like this:

class Foo;
    int s;
    void Bar() {
        s = 1;
    }
};

Sure, it looks like a simple s=1 statement, but in reality it is a this->s=1 statement. And if this is an invalid pointer, this->s isn't a proper variable either.

MSalters
nope, it is this: bool var = 0; ... error line: var = 1; as simple as that.
Newbie
Global, function local? The point of my statement is that we need to know what kind of variable it is, to know where it lives. From there we might be able to understand the error.
MSalters
its defined as global yes, ourside of main() function.
Newbie