用此库,在Debug模式下,编译没问题,
但是执行的时候总是弹出Debug Assertion Failed
窗口,忽略后可以继续运行。
Release模式无此问题
这是怎么回事?
但是执行的时候总是弹出Debug Assertion Failed
窗口,忽略后可以继续运行。
Release模式无此问题
这是怎么回事?
解决方案 »
- 发现一个诡异的问题:dll导出类成员变量地址变化
- 自动包含头文件问题
- dll文件问题
- 如何判断系统是否空闲?如果空闲启动一个任务
- 字段值为NULL时面临的问题(sql2000)。
- socket编程,怎么设置代理?谢谢
- 请问pub3216.h是哪儿的?vc5.0中的吗?
- VC中的几个入门级的简单问题(之二),希望能得到大家的帮助,谢谢!
- 双缓冲问题!
- 我新建了一个MFC类,它派生自CWnd,为什么不能用OnTimer
- int iBits = ::GetDeviceCaps(hDC, BITSPIXEL) * ::GetDeviceCaps(hDC, PLANES)这句话是什么
- 请高手帮忙一个关于用VC给PE加外壳的问题.(1000分送,小弟的全部了)!急
requirement. It most of the time used to catch programming errors. For
example I write a method where I rely on the fact that my member has been
initialised. I then program the line ASSERT(m_var1 != NULL) before I use
that member. This way, in the debug version the programm will halt with the
Assertion Failed Dialog Box and give me the exact line position. I can then
follow it up and correct the problem as in this example, initialize my
variable.
In the Release version of the program this ASSERT will have no effect. If
my program does not have a problem whith my unititialised member, e.g. it
does not use it or it initializes it later, then my program works just
fine. If not you have a crash with little chance of finding it.
So it's good practice to use ASSERTS, specially for pointers.
But what when the damn thing happens deep, deep down in the MFC Code ? Now
that a easy way to find the problem (works most of the time). You run your
debug version and when it comes to a assert message you press RETRY. The
debugger will be invoked and points you the position where the assert is
programmed (Note that the line number is one above the pointer).
Normally you want to find out, from where your program delved into this MFC
Code. Open the Call Stack window and look at the list until you find the
first name of a method of your application. Double click, and you find the
caller. Here you need some more initialisation etc..
But when I press RETRY,nothing happen.
Why?
一般可能是因为你使用它的库,有些要注意的条件没有满足,或是用法错误
简单的忽略,以后可能会有别的问题发生,到时候再调试就麻烦了.
..\src\XTGlobal.cpp的line 301出现Assert Invalid.
我查了一下,出现是在函数void XT_AUX_DATA::LoadSysFonts()内
// This ASSERT will fire if the system's menu font is a symbol font.
ASSERT( FALSE );
我把上面这行注释调,重新编译了Xtreme库,Debug Assertion Failed不再出现了。
不知道,这会不会有隐患?
Xtreme Toolkit是哪个版本的?
我的OS:WINDOWS2000 SP2
各人遇到过这个问题吗?
在DEBUG模式下直接运行Wizard生成的代码,就有这个问题。