如何使用应用程序验证器找到代码中真正的问题行?
我现在正在尝试使用这个应用程序验证器调试工具,但我被卡住了,首先:它在简单变量设置行(s = 1;例如)的行中断了程序
其次,现在当我运行这个程序时在调试器下,我的程序似乎改变了它的行为:我正在绘制图像,现在其中一种颜色已经改变了o_O,图像的所有那些我不绘制的部分,已经将颜色更改为#CDCCDCD,而它应该是#000000,我已经将默认颜色设置为零,但它仍然变成#CDCCDCD。
我怎么理解这一点?
这是 AV 给我的输出:
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).
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).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
通常,当在调试器内像这样命中断点(通过 AV 或未处理的异常等)时,会有一个绿色箭头指向一行代码。该箭头指向线程从当前函数返回时要执行的下一条语句。也许这个绿色箭头指向您编写“s = 1”的行,但实际上有问题的代码是它上面的行。现在我看不到你的代码,所以我不能确切地知道,而且我没有足够的代表来发表评论 - 但这是下次命中断点时很容易检查的事情。
Typically when breakpoints are hit like this (via AV or an unhandled exception, etc.) inside a debugger, there is a green arrow pointing to a line of code. That arrow is pointing to the next statement to execute when the thread returns from the current function. Perhaps this green arrow is pointing to the line where you wrote "s = 1", but really the offending code is the line above it. Now I can't see your code so I can't exactly know for sure and I don't have enough rep to post a comment - but this is something that is easy to check the next time the breakpoint is hit.
我敢打赌
s
不是一个“简单”变量。我更有可能相信它是这样的:当然,它看起来像一个简单的
s=1
语句,但实际上它是一个this->s=1
代码>声明。如果this
是无效指针,则this->s
也不是正确的变量。I am willing to bet that
s
is NOT a "simple" variable. I'm much more likely to believe it's something like this:Sure, it looks like a simple
s=1
statement, but in reality it is athis->s=1
statement. And ifthis
is an invalid pointer,this->s
isn't a proper variable either.