473,403 Members | 2,270 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

Debugger Error in VC++.NET

ziv
I am encountering a very strange error
Openning a Visual C++/Win32 Console project with mfc support, writing a simple Sleep(5000) function in the main and running the app in Debug mode (default settings). while closing the app in the middle of execution (click on the close window button) i am getting the following error
"Unhandled exception at 0x7c29ed41 (mfc71d.dll) in test2.exe: 0xC0000005: Access violation reading location 0xf78b78e8.

This behavior occurs only in debug mode configuration

We are encountering many problems in porting our code from VC6 to VC++.NET but we would like to solve this first..

Running Visual Studio.NET 7.1.3088, .NET Framework 1.1.4322 SP1, on Windows2000 Professional, SP

thanks in advance, ziv

---
Posted using Wimdows.net Newsgroups - http://www.wimdows.net/newsgroups/
Nov 17 '05 #1
1 2127
I am encountering a very strange error:
Openning a Visual C++/Win32 Console project with mfc support, writing a simple Sleep(5000) function in the main and running the app in Debug mode (default settings). while closing the app in the middle of execution (click on the close
window button) i am getting the following error: "Unhandled exception at 0x7c29ed41 (mfc71d.dll) in test2.exe: 0xC0000005: Access violation reading location 0xf78b78e8."
This behavior occurs only in debug mode configuration.

We are encountering many problems in porting our code from VC6 to VC++.NET but we would like to solve this first...

Running Visual Studio.NET 7.1.3088, .NET Framework 1.1.4322 SP1, on Windows2000 Professional, SP4


When you click Close button, the default handler for the event calls ExitProcess,
thus triggering MFC cleanup. The problem is that the system starts a new thread
to call the handler, and therefore the cleanup is made on that thread, not on
the main thread (which is killed by ExitProcess by that time).

The solution is to register your own handler for Close, Ctrl-C and Ctrl-Break events
(using SetConsoleCtrlHandler function), handle these events and ask your main thread
to exit cleanly.

Regards,
Oleg


Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: A C | last post by:
Hi Can someone explain why the following is happening. ProjectA <-- depends on B, C, .... ProjectB ProjectC... etc Project B contains b.cpp and b.h. Also has conditional compiler directive...
8
by: mrelectron | last post by:
hi: Nir Aides who wrote the rpdb debugger has enhanced it and stuck a frontend on it whoo-hoo. it is fantastico! see and download it at http://www.digitalpeers.com/pythondebugger/ cheers mark
6
by: Ken Varn | last post by:
I am trying to remote debug a C# application but the debugger is reporting the following exception: An unhandled exception of type 'System.IO.FileLoadException' occurred in Unknown Module....
1
by: Boris Dynin | last post by:
Hi, I have some projects (native - not managed code) in VC++ 2003. I'm trying to debug that stuff on Win98 system that has VC6.0 installed. Is it possible to use VC6.0 for debugging code built...
9
by: RalphTheExpert | last post by:
I'm getting different behavior if my code is running under the debugger or not. I have modified Winmain to look like this: // Copyright (C) 2002 Microsoft Corporation // All rights reserved....
5
by: thomas1107 | last post by:
I am running Visual Studio .NET 2002 Professional on Windows 2000 SP4. When I try to launch the debugger from inside the IDE for VC++ applications I get the following error “Application failed...
2
by: Chris Stiefeling | last post by:
Hi, I am experiencing a strange problem. I am reading and writing xml files via XmlDocument and XmlTextWriter. In the debugger everything works fine but outside the debugger (debug or release)...
2
bartonc
by: bartonc | last post by:
Perhaps this belongs in Techie Talk, but I thought one of you all might have some suggestions: I have VC++ Express installed on my development machine. I don't use it often, but the compiler is...
5
by: Zytan | last post by:
I cannot stand being unable to change the code while the debugger is running. Is there a way to do this? thanks, Zytan
20
by: =?Utf-8?B?V0o=?= | last post by:
I have a VC++ application that just crashes on one tester/client's machine. It runs fine everywhere else. What are the other options to debug (on the client's machine) without installing VC++...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.