开发者

Unhandled exception in Visual Studio 2008

I finished writing the program in C++. I used 'cout' for debugging. Everything was working, I deleted the debug comments, but there is a problem with running the program. When I use comments, everything works well. But when I delete them, the program starts, allows me to write file name, but when I press 'enter', the error occures:

Unhandled exception at 0x0142d866 in Pathfinder.exe: 0xC0000005: Access violation reading location 0xcccccc70

and xiosbase header file opens, indicating on

fmtflags __CLR_OR_THIS_CALL flags() const
{   // return format flags
    return (_Fmtfl);
}

The error occurs when I try to put elements in Map. This happens only when the debug comment is removed in the different function. Can anyone help?

-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 can开发者_JAVA百科not 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


The value 0xcccccc70 looks like the program uses an offset from an uninitialized pointer.

In debug mode memory is filled with 0xcccccccc to make this more visible.


This is going to be a real pain to troubleshoot by analyzing code. The others have pointed you out to a good general direction, but if you don't see something obvious like an uninitialized pointer, then it's probably some kind of memory corruption.

Enable full pageheap for your program, and then run in the debugger again. It should crash earlier if not at the point of corruption, which will give you more information to go forward with.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜