MFC问题,vc6.0 mfc出现debug assertion failure

汇聚2000万达人的兴趣社区下载即送20张免费照片冲印
扫码下载App
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!&&|&&
LOFTER精选
网易考拉推荐
用微信&&“扫一扫”
将文章分享到朋友圈。
用易信&&“扫一扫”
将文章分享到朋友圈。
阅读(7669)|
用微信&&“扫一扫”
将文章分享到朋友圈。
用易信&&“扫一扫”
将文章分享到朋友圈。
历史上的今天
loftPermalink:'',
id:'fks_081',
blogTitle:'关于VC中出现“debug assertion failed”的问题',
blogAbstract:'昨天晚上,调试程序时出现debug assertion failed警告窗,如下:\r\nDebug Assertion Failed! &&&&&& Program: F:\\\\地址库\\\\src\\\\RDAddrFilter\\\\Debug\\\\RDAddrFilter.exe &&&&&& File: winbtn.cpp &&&&&& Line: 107 (不同的问题显示的信息不一样,这个不是我的问题,是我从网上摘录的,我的问题已解决,忘记截图了)',
blogTag:'',
blogUrl:'blog/static/',
isPublished:1,
istop:false,
modifyTime:0,
publishTime:7,
permalink:'blog/static/',
commentCount:0,
mainCommentCount:0,
recommendCount:0,
bsrk:-100,
publisherId:0,
recomBlogHome:false,
currentRecomBlog:false,
attachmentsFileIds:[],
groupInfo:{},
friendstatus:'none',
followstatus:'unFollow',
pubSucc:'',
visitorProvince:'',
visitorCity:'',
visitorNewUser:false,
postAddInfo:{},
mset:'000',
remindgoodnightblog:false,
isBlackVisitor:false,
isShowYodaoAd:false,
hostIntro:'',
hmcon:'1',
selfRecomBlogCount:'0',
lofter_single:''
{list a as x}
{if x.moveFrom=='wap'}
{elseif x.moveFrom=='iphone'}
{elseif x.moveFrom=='android'}
{elseif x.moveFrom=='mobile'}
${a.selfIntro|escape}{if great260}${suplement}{/if}
{list a as x}
推荐过这篇日志的人:
{list a as x}
{if !!b&&b.length>0}
他们还推荐了:
{list b as y}
转载记录:
{list d as x}
{list a as x}
{list a as x}
{list a as x}
{list a as x}
{if x_index>4}{break}{/if}
${fn2(x.publishTime,'yyyy-MM-dd HH:mm:ss')}
{list a as x}
{if !!(blogDetail.preBlogPermalink)}
{if !!(blogDetail.nextBlogPermalink)}
{list a as x}
{if defined('newslist')&&newslist.length>0}
{list newslist as x}
{if x_index>7}{break}{/if}
{list a as x}
{var first_option =}
{list x.voteDetailList as voteToOption}
{if voteToOption==1}
{if first_option==false},{/if}&&“${b[voteToOption_index]}”&&
{if (x.role!="-1") },“我是${c[x.role]}”&&{/if}
&&&&&&&&${fn1(x.voteTime)}
{if x.userName==''}{/if}
网易公司版权所有&&
{list x.l as y}
{if defined('wl')}
{list wl as x}{/list}Debug Assertion Failed! 我用VS2008编程,运行时点击菜单选项报错(悬赏80分,在另一个位置)_百度知道
Debug Assertion Failed! 我用VS2008编程,运行时点击菜单选项报错(悬赏80分,在另一个位置)
c,see the Visual C++ documentation on asserts.html我用VS2008编了一个服务器程序.hLprogram files&#92;include&#92,用的demo客户端调试.html" target="_blank">http:312 For information on how your program can cause vc&#92.exeFile:.&#92,在点击某菜单选项时出现以下错误.baidu,运行客户端程序后。 请问是何原因,放下链接我 麻烦回到那个知道里我好给积分://zhidao.;/question/://zhidao:&#92: Debug Assertion Failed.0&#92;atlmfc&#92.com/question/,没有办法改了.,系统报错误! POPCServer.:183 Line.baidu,谢谢啊 <a href="http,程序关闭! 我把我仅有的分数都出来了 先发才发现位置发错了;microsoft visual studio 9?谢谢. (Press Retry to debug the application) 点击Retry后;Debug&#92
其他可以自动初始化,那CComSafeDeleteCriticalSection如何手工初始化?
提问者采纳
; return CComCriticalS m_critsec member of CComObjectRootEx is now of type
/&#47。HRESULT Lock(){ &#47. It has to be initialized &#47:;/ CComAutoDeleteCriticalSection:_AtlInitialConstruct ATLASSUME(m_bInitialized); CComSafeDeleteCriticalSection:;
by calling CComObjectRootEx::Init or CComAutoDeleteCriticalSection:Init /&#47. //&#47,出错位置指向了CComSafeDeleteCriticalSection的Lock函数程序里用线程锁CComSafeDeleteCriticalSection了吗:Lock(),出错原因好像是说在运行Lock前没有运行Init初始化函数
提问者评价
感谢,是初始化部分的问题
其他类似问题
为您推荐:
debug的相关知识
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁For information on how your program can cause an assertion failure,see the Visual C++ documentation_百度文库
两大类热门资源免费畅读
续费一年阅读会员,立省24元!
评价文档:
For information on how your program can cause an assertion failure,see the Visual C++ documentation
F&#8203;o&#8203;r&#8203; &#8203;i&#8203;n&#8203;f&#8203;o&#8203;r&#8203;m&#8203;a&#8203;t&#8203;i&#8203;o&#8203;n&#8203; &#8203;o&#8203;n&#8203; &#8203;h&#8203;o&#8203;w&#8203; &#8203;y&#8203;o&#8203;u&#8203;r&#8203; &#8203;p&#8203;r&#8203;o&#8203;g&#8203;r&#8203;a&#8203;m&#8203; &#8203;c&#8203;a&#8203;n&#8203; &#8203;c&#8203;a&#8203;u&#8203;s&#8203;e&#8203; &#8203;a&#8203;n&#8203; &#8203;a&#8203;s&#8203;s&#8203;e&#8203;r&#8203;t&#8203;i&#8203;o&#8203;n&#8203; &#8203;f&#8203;a&#8203;i&#8203;l&#8203;u&#8203;r&#8203;e&#8203;,&#8203;s&#8203;e&#8203;e&#8203; &#8203;t&#8203;h&#8203;e&#8203; &#8203;V&#8203;i&#8203;s&#8203;u&#8203;a&#8203;l&#8203; &#8203;C&#8203;+&#8203;+&#8203; &#8203;d&#8203;o&#8203;c&#8203;u&#8203;m&#8203;e&#8203;n&#8203;t&#8203;a&#8203;t&#8203;i&#8203;o&#8203;n
阅读已结束,如果下载本文需要使用
想免费下载本文?
把文档贴到Blog、BBS或个人站等:
普通尺寸(450*500pix)
较大尺寸(630*500pix)
你可能喜欢MFC 出现debug assertion failed的问题_百度知道
MFC 出现debug assertion failed的问题
)); CTime m_time=CTime,wid)://d; }void CUserMr);
} } catch(_com_error&用列表显示数据库中表的内容想实现在列表中添加用户后立刻刷新.MoveNext():OnInitDialog();i&lt,m_addusername.m_pDatabase=& m_));权限&quot,wid).ErrorMessage());
CString sql,1.Open(AFX_DB_USE_DEFAULT_TYPE.column3);发现是执行OnBnClickedaddbutton()这个函数中的RefreshData()的时候出现上述错误:;写的程序&
m_userlist,m_addpower);
return.Format(_T(& } catch(CDBException e1) {
AfxMessageBox(_T(&insert into 用户密码表 values (&#39,_T(&quot:RefreshData(){ m_userlist://d;)),m_addpassword:; m_userlist,(CString)m_ int i=0; return TRUE,sql);; m_userlist.hiphotos.m_database: 在此添加控件通知处理程序代码 UpdateData(true).InsertColumn(0.jpg" esrc="http.)).Width()/2;
m_ ).SetRedraw(TRUE).column1),(CString)m_ m_userlist.InsertColumn(1;& m_userlist:;%s&#39.Format(_T(&%s&#39://d; try {
m_userset.SetColumnWidth(0; m_userlist.baidu我用MFC&nbsp:%M.SetExtendedStyle(LVS_EX_FULLROWSELECT|LVS_EX_GRIDLINES);数据库操作失败&quot.hiphotos.DeleteAllItems();数据库操作失败& try {
m_));)&/zhidao/wh%3D450%2C600/sign=b8c446f7cb8065387bbfac17a2ed8d72/6f061d950a7b63d9f2d:%S&quot:OnInitDialog(void){
CDialog,然后看到添加后的内容但出现一下错误<img class="ikqb_img" src="http,&#39;;%Y-%m-%d %H;sql2008&nbsp.InsertItem(i; } MessageBox(_T(&quot:GetCurrentTime():OnBnClickedaddbutton(){ // TODO;select * from 用户密码表&)).SetColumnWidth(1.SetItemText(i; int wid=r;m_userset,_T(&//初始list control控件 m_ } /zhidao/wh%3D600%2C800/sign=ed8be6b15243fbf2c579ae2/6f061d950a7b63d9f2d;用户名&quot.SetRedraw(FALSE);添加成功&quot:;}BOOL CUserM CString time=m_
m_userset.GetRecordCount();i++)
for(int i=0;
/zhidao/pic/item/6f061d950a7b63d9f2d.Format(_T(& } catch(CMemoryException e2) {
AfxMessageBox(_T(&quot.jpg" />断点调试&nbsp.与& e) {
AfxMessageBox(e; RefreshData().ExecuteSQL(sql):;));
RefreshData(),如何解决这是代码void CUserManage
提问者采纳
.cpp Line,F5多调几次dbcore:1072是void CUserManage:RefreshData()吗
就是OnBnClickedaddbutton()这个函数中调用的RefreshData()(也就是给出代码的最后一行)这一行出问题,这个RefreshData()就是void CUserManage::RefreshData() 问题出在哪???
在Line:1072打断点,F11进入到RefreshData()函数中一步步走
RefreshData()中当运行到这一行m_userset.Open(AFX_DB_USE_DEFAULT_TYPE,sql);的时候报错 难道不能两次打开数据库吗??
肯定不能,打开之后,保存对象句柄或者指针,用就是了,用完了记得关闭;
提问者评价
解决了,虽然跟你说的都没关系
其他类似问题
为您推荐:
debug的相关知识
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁}

我要回帖

更多关于 vc6.0 mfc使用教程 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信