Visual Studio 2008中出现未处理的异常
Unhandled exception in Visual Studio 2008
我用C++完成了程序的编写。我使用"cout"进行调试。一切都正常,我删除了调试注释,但运行程序时出现了问题。当我使用评论时,一切都很好。但当我删除它们时,程序启动,允许我写文件名,但当我按下"回车"时,错误发生了:
Pathfinder.exe中0x0142d866处未处理的异常:0xC0000005:读取位置0xcccccc70的访问冲突
xiosbase头文件打开,在上显示
fmtflags __CLR_OR_THIS_CALL flags() const
{ // return format flags
return (_Fmtfl);
}
当我尝试在Map中放置元素时,会发生错误。只有在不同函数中删除调试注释时才会发生这种情况。有人能帮忙吗?
-this 0xcccccc6c {_Stdstr=??? _Mystate=??? _Except=??? ...} const std::ios_base * const
std::_Iosb<int> {...} std::_Iosb<int>
__vfptr CXX0030: Error: expression cannot be evaluated
_Stdstr CXX0030: Error: expression cannot be evaluated
_Mystate CXX0030: Error: expression cannot be evaluated
_Except CXX0030: Error: expression cannot be evaluated
_Fmtfl CXX0030: Error: expression cannot be evaluated
_Prec CXX0030: Error: expression cannot be evaluated
_Wide CXX0030: Error: expression cannot be evaluated
_Arr CXX0017: Error: symbol "" not found
_Calls CXX0017: Error: symbol "" not found
_Ploc CXX0017: Error: symbol "" not found
_Index 0 int
_Sync true bool
值0xcccccc70看起来像是程序使用了未初始化指针的偏移量。
在调试模式下,内存中会填充0xcccccccc,以使其更加可见。
通过分析代码进行故障排除将是一件非常痛苦的事情。其他人已经为你指出了一个很好的总体方向,但如果你没有看到一些明显的东西,比如一个未初始化的指针,那么这可能是某种内存损坏。
为程序启用完整的页面堆,然后再次在调试器中运行。如果不是在腐败的时候,它应该早点崩溃,这会给你更多的信息。
相关文章:
- 如何修复链表类实现的未处理异常0xDDDDDDDD
- VisualC++ 2010 有没有办法找出有关未处理异常错误的更多详细信息
- C++ 程序中双链表的未处理异常
- 运算符重载时未处理<<异常
- 实验室中0x6BE20E11 (ucrtbased.dll) 的未处理异常.exe: 0xC0000005:访问冲突读取
- ImageMagick 的未处理异常
- 类数组大小为的未处理异常
- 尝试将构造函数设置为 0 - c++ 的未处理异常
- Dijkstra 中0x001e1078 s_Algorithm.exe的未处理异常:0xC0000005:访问冲突读取位置0xbaadf00d
- 运算符重载未处理异常
- 尝试使用 fread 读取文本文件时发生 'System.AccessViolationException' 类型的未处理异常
- c++中的Guard,在main中未处理异常时不调用析构函数
- 某些内存位置的未处理异常
- 错误 linkedlist .exe 中0x00D0345E处的未处理异常: 0xC0000005:访问违规写入位置0x
- 仅在发布模式下使用 glGenBuffer 的未处理异常 - QT
- 如何分析VS2010在调试模式下捕获的未处理异常
- glDrawArrays上的openGL未处理异常(GL_TRIANGLES,0,model.indicesCount)
- 使用Boost Spirit解析语法的未处理异常
- 解析"%Z" C++ 中将错误作为访问 voilation 的未处理异常给出?
- 为什么在win32计时器回调中引发的未处理异常未被调试器视为未处理异常