Re: MFC Application has encountered a problem and needs to close. HELP
- From: Joseph M. Newcomer <newcomer@xxxxxxxxxxxx>
- Date: Thu, 15 Nov 2007 22:44:07 -0500
See below...
On Thu, 15 Nov 2007 09:38:04 -0800, Alan Williams-Key
<AlanWilliamsKey@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
This is driving me nuts.****
Whenever I run my program in release configuraiton it always crashes with
the above error message offering me an option to send a message to Microsoft.
I have discovered it is an access violation (code 5).
Whenever I run the program in debug configuration it runs OK.
I have two main questions:
1 How can the program behave so differently in the two configurations?
Actually, this is not at all surprising; in fact, it might even be expected.
*****
I can****
find no explanation of this in the help files.
Explanation of what? That release is different than debug?
****
2 How can I get useful information about the access violation?****
I cannot save the crash dump produced which the exception handler offers to
send to Microsoft for me because it is deleted as soon as I click out of the
dialog and my Norton wizard for recovering lost files doesn't look in the
right directory. Is it possible to disable the MFC exception handling so that
I can generate a drwtsn32 crash dump? If I can, will Visual Studio 6.0 read
it?
This has absolutely nothing to do with "MFC exception handling", which is completely
unrelated to the problem.
Run the release version under the debugger!
****
****
I have tried analysing the stack dump in the crash file (a laborious process
using the small scroll window in the report viewer) to find addresses from my
program space, but so far this hasn't led to anything.
Ideally I would like to make the debug configuration detect the access
violation so that I can investigate but I cannot find any options that allow
me to force the debug version to behave in the same way as the release
version. Is there such an option (this is obviously related to my main
question No 1).
This statement doesn't even make sense. If the access fault appears only in the release
version, it seems unlikely that it will appear in the debug version. You don't "make the
debug configuration" detect a bug that doesn't appear in the debug version.
See my essay "surviving the release version", on my MVP Tips site. Among other things, it
tells how to debug a release version.
joe
****
Joseph M. Newcomer [MVP]
Alan
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.
- References:
- MFC Application has encountered a problem and needs to close. HELP
- From: Alan Williams-Key
- MFC Application has encountered a problem and needs to close. HELP
- Prev by Date: Re: Unicode Basic Latin and Latin-1 coverage of Western Europe
- Next by Date: Re: Multilanguage support for CEdit
- Previous by thread: Re: MFC Application has encountered a problem and needs to close. HELP
- Next by thread: WM_DROPFILES
- Index(es):
Relevant Pages
|