如何追踪访问冲突“地址00000000” [英] How to track down access violation "at address 00000000"

查看:659
本文介绍了如何追踪访问冲突“地址00000000”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



但是,如果错误消息说

,那么我知道如何创建一个.map文件,以便在错误消息中包含实际地址时跟踪访问冲突错误。 / p>

 访问地址为00000000。地址为00000000. 

我在哪里开始寻找这个问题的原因?

解决方案

地址00000000附近的访问冲突表示空指针访问。您在使用某些东西之前,很有可能是在FreeAndNil()'d之后。



很多时候这是由访问组件引起的在表单创建过程中错误的地方,或者让您的主窗体尝试访问尚未创建的数据模块中的某些内容。



MadExcept 使得它很容易跟踪这些事情,并且是免费的非商业用途。 (实际上,商业使用许可证也是相当便宜的,值得的钱。)


I know how to create a .map file to track down access violation errors when the error message includes an actual address.

But what if the error message says

Access violation at address 00000000. Read of address 00000000.

Where do I start looking for the cause of this problem... ?

解决方案

An access violation at anywhere near adress '00000000' indicates a null pointer access. You're using something before it's ever been created, most likely, or after it's been FreeAndNil()'d.

A lot of times this is caused by accessing a component in the wrong place during form creation, or by having your main form try and access something in a datamodule that hasn't been created yet.

MadExcept makes it pretty easy to track these things down, and is free for non-commercial use. (Actually, a commercial use license is pretty inexpensive as well, and well worth the money.)

这篇关于如何追踪访问冲突“地址00000000”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆