Debug Assertion Failed! File:afx.inl File:afx.inl
来源:互联网 发布:淘宝好还是自建商城好 编辑:程序博客网 时间:2024/05/22 00:24
Debug Assertion Failed!
proogram:…….exe
File:afx.inl
File:afx.inl
我是这样产生的这个问题:
原来定义了一个保护型的变量,由于外部需要访问,我直接把它放到PUBLIC的位置,结果编译运行都没问题,在关闭程序后报
Debug Assertion Failed!
proogram:…….exe
File:afx.inl
Line:122
我怀疑是编译产生的旧文件没有感觉到这一改变,于是把DEBUG目录下的所有文件全删了,重新编译,果不其然,问题解决。。。
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
以下内容来自互联网:
Debug Assertion Failed!
proogram:…….exe
File:afx.inl
Line:122
我的程序中遇到了这个问题,在网上搜了搜了,大致有两类解释:
一、内存访问越界,破坏了内存块结构。内存申请太小,非正常释放,找不到数组最后结束的标志。
二、根据出错提示,VC6.0查看afx.inl文件定位
_AFX_INLINE CStringData* CString::GetData() const
{ ASSERT(m_pchData != NULL); return ((CStringData*)m_pchData)-1; }
指向字符串数据的指针为空。
三、使用了野指针。
网上给出的解决办法:
一、Build->clear all->Rebuild All->运行
二、release的方法是这样的...
打开"编译"->"配置"->"把里面除了release其他的选项全部删除,再构件就OK了
三、可以先声明一个临时的CString变量然后作为暂存 然后把你取得的值放入其中 之后再赋给 另一个你要使用的变量 即可解决问题。
或者 将CString 成员变量 改成 类成员变量就没有问题了。
四、"Project"->"setting"->"点击c/c++"->"Category选项中选择Preprocessor"
->"在Undefined symbols:填写_DEBUG" 重新编译运行即可
五、首先如果你用的是vc6的话:
1。按F5运行你的程序
2。在出错时,选择“重试”
3。按ALT+7调出“调用栈”窗口
4。双击从上往下的最近一个自己定义的函数,系统会自动把该函数所在的文件显示出来,此时程序就暂停在光标处。一般来说错误就出在这附近。你可以通过查看变量的值来确认
而我自己的解决办法却是:组建->配置->移除Win32 Release,编译后发现我的工程配置没了,重新添加Win32 Release(组建->配置->添加Win32 Release),重新配置工程,编译链接后程序就好了。
这个问题太诡异了,我昨天花了一天的时间也没解
- Debug Assertion Failed! File:afx.inl File:afx.inl
- Debug Assertion Failed! File:afx.inl (转载)
- Debug Assertion Failed! File: afx.inl
- Debug Assertion Failed file:afx.inl Line 177
- MFC程序出现“Debug Assertion Failed! File:afx.inl Line:177”错误
- File:afx.inl Line:122
- "Debug Assertion Failed", File:afxcmn.inl
- Debug Assertion Failed! File:afxwin1.inl Line:22的解决
- Debug Assertion Failed! File:afxwin1.inl Line:22
- Debug Assertion Failed! File:afxwin1.inl Line:22
- Debug Assertion Failed! FIle:afxhtml.inl Line 57的错误的解决
- Debug Assertion Failed!——File:\dd\vctools\vc7libs\ship\atlmfc\include\afxwin1.inl
- MFC学习笔记003之调试错误DebugAssertionFailed!File:afx.inl Line:157
- Run time error assertion failed afxwin1.inl Line24
- Afx
- afx
- AFX
- debug assertion failed, file:dlgdata.cpp,line43
- NSTimer 简单用法
- VS2008中C++打开Excel(MFC)
- 技术人员如何创业《一》—— 产品及想法
- 【资源列表】CAD 开源社区
- 申请成为微信开发者,申请消息接口
- Debug Assertion Failed! File:afx.inl File:afx.inl
- cocos2d-x 初学三问(下)
- opencv中的CvTermCriteria
- 解决vs2010下不能创建项目及文件的问题
- UPMS通用用户权限系统——如何动态添加用户属性
- hdu 1515 Anagrams by Stack
- linux内存总结
- #翻译# 介绍后缀树(suffix tree)
- android(16)_数据存储与访问_SQLite数据库_数据库的创建管理