473,387 Members | 1,515 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,387 software developers and data experts.

Runtime crash in a destructor

Hi,
We are migrating a product from vc6 to vs.net 2003, when we run the app
it crashes pointing to a c++ class destructor, we didnot make any code
changes during the migration. Can anybody help me giving some pointers
on what could be the possible reason?

Thanks in advance,
--sarath.

May 29 '06 #1
6 1562
> We are migrating a product from vc6 to vs.net 2003, when we run the app
it crashes pointing to a c++ class destructor, we didnot make any code
changes during the migration. Can anybody help me giving some pointers
on what could be the possible reason?


Hi Sarah,
Could you perhaps post the code inside the destructor,
with an indication of which line triggers the crash?

--

Kind regards,
Bruno van Dooren
br**********************@hotmail.com
Remove only "_nos_pam"
May 29 '06 #2
On Mon, 29 May 2006 03:12:37 -0700, ns*****@gmail.com wrote:
Hi,
We are migrating a product from vc6 to vs.net 2003, when we run the app
it crashes pointing to a c++ class destructor, we didnot make any code
changes during the migration. Can anybody help me giving some pointers
on what could be the possible reason?

Thanks in advance,
--sarath.


Well...what about the debugger?

Ciao, Andreas
May 29 '06 #3
Hi guys,
Thanks for showing intrest in my question.

regards,
--sarath.

Pls find the debugging comments inline with the code:

dlsDownloadXrefFile::dlsDownloadXrefFile(CMainFram e* p) : dlsmState(p)
{
init = false;
pSearchFirmwareDlg = NULL;
m_user = "";
m_password = "";
pAbortRequested = new bool(false); //crashes here and goes

//to the ~dlsmState
}

dlsDownloadXrefFile::~dlsDownloadXrefFile()
{
stopSearchDlg(); //safety code - kill any existing
if ( pAbortRequested )
delete pAbortRequested;
}

where,
dlsmState::dlsmState(CMainFrame* p) : pMainFrame(p)
{
bInit = false;
}

dlsmState::~dlsmState()
{//After the "break, continue" exception
//dialog box the debbugger jumps to this destructor
//the stack trace shows all msvcr71d.dll:function_names
// before this ~dlsmState
}

May 30 '06 #4
dlsDownloadXrefFile::dlsDownloadXrefFile(CMainFram e* p) : dlsmState(p)
{
init = false;
pSearchFirmwareDlg = NULL;
m_user = "";
m_password = "";
pAbortRequested = new bool(false); //crashes here


What kind of exception is raised?
What is on the call stack at this moment?

Regards,
Oleg
[VC++ MVP http://www.debuginfo.com/]


May 31 '06 #5
Hi,
Here I am pasting the stack trace.
--sarath.
ntdll.dll!_DbgBreakPoint@0()
ntdll.dll!_RtlpBreakPointHeap@4() + 0x28
ntdll.dll!_RtlpCheckBusyBlockTail@4() + 0x76
ntdll.dll!_RtlpValidateHeapEntry@12() + 0xa4
ntdll.dll!_RtlValidateHeap@12() + 0xe0
kernel32.dll!_HeapValidate@12() + 0x14
msvcr71d.dll!_CrtIsValidHeapPointer(const void * pUserData=0x00ebda88) Line 1807 C

msvcr71d.dll!_free_dbg_lk(void * pUserData=0x00ebda88, int
nBlockUse=1) Line 1132 + 0x9 C
msvcr71d.dll!_free_dbg(void * pUserData=0x00ebda88, int nBlockUse=1)
Line 1070 + 0xd C
mfc71d.dll!operator delete(void * p=0x00ebda88) Line 369 + 0xc C++
mfc71d.dll!operator delete(void * pData=0x00ebda88, const char *
__formal=0x004d3688, const char * __formal=0x004d3688) Line 78 +
0x9 C++
dwnld.exe!AfxGetModuleState() + 0x2038 C++

May 31 '06 #6
ntdll.dll!_DbgBreakPoint@0()
ntdll.dll!_RtlpBreakPointHeap@4() + 0x28
ntdll.dll!_RtlpCheckBusyBlockTail@4() + 0x76
ntdll.dll!_RtlpValidateHeapEntry@12() + 0xa4
ntdll.dll!_RtlValidateHeap@12() + 0xe0
kernel32.dll!_HeapValidate@12() + 0x14
msvcr71d.dll!_CrtIsValidHeapPointer(const void * pUserData=0x00ebda88) Line 1807 C

msvcr71d.dll!_free_dbg_lk(void * pUserData=0x00ebda88, int
nBlockUse=1) Line 1132 + 0x9 C
msvcr71d.dll!_free_dbg(void * pUserData=0x00ebda88, int nBlockUse=1)
Line 1070 + 0xd C
mfc71d.dll!operator delete(void * p=0x00ebda88) Line 369 + 0xc C++
mfc71d.dll!operator delete(void * pData=0x00ebda88, const char *
__formal=0x004d3688, const char * __formal=0x004d3688) Line 78 +
0x9 C++
dwnld.exe!AfxGetModuleState() + 0x2038 C++


The heap is corrupted, and heap manager notifies you about it.
Here is how you can find the reason of the problem:
http://www.debuginfo.com/tips/userbpntdll.html

Oleg


Jun 1 '06 #7

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

Similar topics

8
by: Tahir Hashmi | last post by:
Consider this piece of code: #include <iostream> using namespace std; class y { public: void draw()
18
by: Active8 | last post by:
I put the bare essentials in a console app. http://home.earthlink.net/~mcolasono/tmp/degub.zip Opening output.fft and loading it into a vector<float> screws up, but input1.dat doesn't. It does...
3
by: Tal Shachar | last post by:
Hi All, I posted this request on ...dotnet.framework.interop newsgroup, but I thought to try also here, and ask to get your inputs for the following issue: I have an application written in C++,...
3
by: Antti Keskinen | last post by:
Hello ppl ! Since this newsgroup is a place where Microsoft MVPs or related visit somewhat often, could someone give me an advice with possible causes of this error. Note that it does not happen...
24
by: ekz | last post by:
Hi guys I have a very weird bug and will welcome gracefully any help We developed ASP.Net application that run on production server, Net Framework 1.1 , IIS 6.0, the application is huge, having...
4
by: ashish_chap | last post by:
Hi, I am using _bstr_t class in a function. This is used in an application that is used in an multi-threaded environment. The function is implemented as follows: int Function(wchar_t *sqlCmd)...
3
by: Lyndsey.Ferguson | last post by:
Hello Everyone, I am investigating a crash within our application that has me stumped. I am developing for Mac OS X, but I believe that this may be a regular gcc c++ type question. Here is...
1
by: johnxhc | last post by:
I have the big application, it has C#, VB.NET, VB6 & VC++ components, those components calling each other, passing the objects between the managed & unmanaged layer. The application crashes in...
0
by: =?Utf-8?B?VGhvbWFzIFR1dGtv?= | last post by:
An ASP.NET web project has recently began crashing WebDev.WebServer.exe with a System.Runtime.InteropServices.SEHException. The EventLog for the crash looks like this: Application ID:...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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...

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.