VC ++中的异常错误c0000005 [英] Exception Error c0000005 in VC++

查看:1130
本文介绍了VC ++中的异常错误c0000005的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用VC ++控制台应用程序。

Am working on VC++ Console Application.

此应用程序从Appdata \Roaming文件夹发送一个文件一段时间。

This application sends a file from Appdata\Roaming folder for a period of time.

遇到此崩溃错误会发生什么:

What happens is am getting this Crash error :

Problem signature:
Problem Event Name: APPCRASH
Application Name:   App.exe
Application Version:    1.0.0.2
Application Timestamp:  51c02fa8
Fault Module Name:  PCMeter.exe
Fault Module Version:   1.0.0.2
Fault Module Timestamp: 51c02fa8
Exception Code: c0000005
Exception Offset:   000069eb
OS Version: 6.1.7601.2.1.0.256.48
Locale ID:  1033
Additional Information 1:   0a9e
Additional Information 2:   0a9e372d3b4ad19135b953a78882e789
Additional Information 3:   0a9e
Additional Information 4:   0a9e372d3b4ad19135b953a78882e789

任何人都可以帮我解决这个问题

Could anyone please help me to resolve this issue

推荐答案

异常代码 c0000005 是访问冲突的代码。这意味着你的程序正在访问(读或写)它没有权限的内存地址。最常见的原因是:

Exception code c0000005 is the code for an access violation. That means that your program is accessing (either reading or writing) a memory address to which it does not have rights. Most commonly this is caused by:


  • 访问失效指针。这是访问已经释放的内存。注意,这种过时的指针访问不总是导致访问冲突。只有当内存管理器将内存返回系统时,您才会遇到访问冲突。

  • 读取数组的末尾。这是当你有一个长度 N 的数组,并且访问索引> = N 的元素。

  • Accessing a stale pointer. That is accessing memory that has already been deallocated. Note that such stale pointer accesses do not always result in access violations. Only if the memory manager has returned the memory to the system do you get an access violation.
  • Reading off the end of an array. This is when you have an array of length N and you access elements with index >=N.

为了解决这个问题,你需要做一些调试。如果你不能在你的开发机器上的调试器下发生故障,你应该得到一个崩溃转储文件,并将其加载到你的调试器。这将允许您查看代码中的问题发生在哪里,并希望能带您到解决方案。您将需要具有与可执行文件相关联的调试符号,以便查看有意义的堆栈跟踪。

To solve the problem you'll need to do some debugging. If you are not in a position to get the fault to occur under your debugger on your development machine you should get a crash dump file and load it into your debugger. This will allow you to see where in the code the problem occurred and hopefully lead you to the solution. You'll need to have the debugging symbols associated with the executable in order to see meaningful stack traces.

这篇关于VC ++中的异常错误c0000005的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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