Re: Tips to hide "Debug Assertion Failed!"
- From: Joseph M. Newcomer <newcomer@xxxxxxxxxxxx>
- Date: Mon, 20 Jun 2005 21:34:17 -0400
Assert failures only come from the debug version. So you must have the symbol _DEBUG
defined somewhere, perhaps in a library build. Note that ASSERT statements are different
from the sort of message that indicates an uncaught exception, which is a different
problem, and also represents a bug in your program.
joe
On Mon, 20 Jun 2005 15:45:50 -0600, "Johnson Liuis" <gpsabove@xxxxxxxxx> wrote:
>Thanks for your reply, Joseph,
>
>Just let you know that the rror message happened in a release version, not a
>debug version. I am sure in the "Active Configure" I selected "Win32
>Release", and that is why I got surprised. Any idea?
>
>Johnson
>
>
>
>
>
>
>"Joseph M. Newcomer" <newcomer@xxxxxxxxxxxx> wrote in message
>news:c79bb1p2dsgcr7nck6ne9hm4be1pj9ru81@xxxxxxxxxx
>> There is a highly-effective way to "hide" this message box: fix the bug
>> that caused it!
>>
>> Note that you ARE released a debug version, which poses problems, because
>> the debug DLLs
>> for MFC are not redistributable. ASSERTs do not come out in the release
>> version; instead,
>> the program screws up in some other way, usually resulting in either
>> misbehavior or
>> something more serious like an access fault. In the release version,
>> ASSERTs compile out
>> and produce no code.
>>
>> It would be inappropriate to have a message box that said "You have
>> encountered a bug
>> caused by your operating system" when the truth is "I screwed up, and you
>> are the victim".
>> An ASSERT fault is *always* a bug in your program. Fix it.
>>
>> Why would you want to misrepresent your errors as operating system errors?
>> Why would you
>> want to blame your bugs on Microsoft? Why would you not endeavor to fix
>> the bugs you have
>> created?
>>
>> Do the job right! Don't try to pretend the bug isn't yours when it is.
>> joe
>>
>>
>> On Sat, 18 Jun 2005 21:21:41 -0600, "Johnson Liuis" <gpsabove@xxxxxxxxx>
>> wrote:
>>
>>>I am using Visual Studio 6.0 to develop a GUI software. Sometimes when I
>>>tested the software in a different OS, I can get the following error
>>>message:
>>>
>>>"Microsoft Visual C++ Debug Library
>>>Debug Assetion Failed!
>>>Program:...
>>>File: ...
>>>Line: ..."
>>>
>>>I do not like this kind of message box being displayed, since it looks
>>>like
>>>that I am releasing a "debug" version. In case there is an error occurred,
>>>I
>>>would like to use my own warning message box instead. For example, I would
>>>like to show "You have encountered a problem caused by your operating
>>>system. Try to run the software in Windows XP instead." Could anybody let
>>>me
>>>know if there is a back door that I can hide "Debug Assertion Failed"
>>>message in my software?
>>>
>>>Thanks in advance.
>>>
>>>Johnson
>>>
>>>
>>>
>>>
>>
>> Joseph M. Newcomer [MVP]
>> email: newcomer@xxxxxxxxxxxx
>> Web: http://www.flounder.com
>> MVP Tips: http://www.flounder.com/mvp_tips.htm
>
Joseph M. Newcomer [MVP]
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.
- References:
- Tips to hide "Debug Assertion Failed!"
- From: Johnson Liuis
- Re: Tips to hide "Debug Assertion Failed!"
- From: Joseph M . Newcomer
- Re: Tips to hide "Debug Assertion Failed!"
- From: Johnson Liuis
- Tips to hide "Debug Assertion Failed!"
- Prev by Date: MFC ActiveX control(.ocx file) on Internet exporer: File drag and drop
- Next by Date: Re: Problem with windows messages routing, DoModal and MessageBox
- Previous by thread: Re: Tips to hide "Debug Assertion Failed!"
- Next by thread: Re: Beginner to GUI
- Index(es):
Relevant Pages
|