“afxtempl.h Line:254” 或者 “afxtempl.h Line:285”
来源:互联网 发布:蝙蝠侠致命玩笑知乎 编辑:程序博客网 时间:2024/06/11 00:51
一、程序现场:1, DEBUG版下运行正常,2,在程序中设置断点,然后跟踪程序,一调试就会报错;,
3,极端条件:在CWinApp::InitInstance()设置断点也会报错!!!
二、错误信息: “afxtempl.h Line:254”
三、MFC源代码:
template<class TYPE, class ARG_TYPE>
AFX_INLINE TYPE CArray<TYPE, ARG_TYPE>::GetAt(int nIndex) const
{ ASSERT(nIndex >= 0 && nIndex < m_nSize);
return m_pData[nIndex]; }
四、可能原因:程序中用到了CArray数组,afxtempl.h 254行这里有一个异常判断。
五、网上查证:找到了错误原因
1、数组访问越界:可能是程序中确实存在这个问题
2、可能是在Watch框内想要查看一个越界的数组元素
如果是后者则会出现运行正常,但是调试的时候会出错
六、解决办法:
1 单步跟踪查找到越界数组
2 删除所有Watch项
删除掉Watch中的CArray变量,恢复正常。
阅读全文
0 0
- “afxtempl.h Line:254” 或者 “afxtempl.h Line:285”
- VC 的一个错误原因 (afxtempl.h Line:254)
- 关于afxtempl.h文件
- #include <afxtempl.h>
- 关于afxtempl.h文件
- Afxtempl.h 254 产生的原因
- Line.h
- afxtempl.h(127) : fatal error C1076: compiler limit : internal heap limit reached; use /Zm to specif
- 【ACM_1】H - Line Gimmick
- afxtempl.h(127) : fatal error C1076: compiler limit : internal heap limit reached; use /Zm to specify a higher limit
- LINE
- line
- line
- line
- Design of an H.264/AVC Decoder with Memory Hierarchy and Line-Pixel-Lookahead
- backup.sh: line 1: date+%Y%m%d%H: command not found
- solve SetDefaultDllDirectories’ : is not a member of ‘`global namespace” from line 638 in atlcore.h
- error C2857: '#include' statement specified with the /Ycstdafx.h command-line option 解决方法
- windows环境下安装npm、cnpm、bower
- Person p = new Person("li",20); 到底干了些什么?
- java.net.SocketTimeoutException: Read timed out解决办法
- 番茄工作法
- yarn-site.xml相关配置参数列表说明
- “afxtempl.h Line:254” 或者 “afxtempl.h Line:285”
- 解决ZXING生成二维码图片白框太大的问题
- 基于SSH框架的登陆的简单实例
- 一文读懂深度学习框架下的目标检测(附数据集)
- 10.1作业
- python文件复制机
- 移动端键盘问题
- 样式链接表格
- Gym 101164.H