Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Application Error message box

Status
Not open for further replies.

mfm

Programmer
Jul 9, 2001
16
FR
Hi guys,
At the moment I'm trying to edit my project, after checking the whole thing alright... it can be compiled and built, even there is no problem when I execute the program, however, when I close the application file (*.exe), an 'Application Error' message box appeared and I don't know how to debug it. This is because it shows the access vioaltion from the supported MFC file (...\MFC\SRC\Bartool.cpp)

CToolBar::~CToolBar()
{
AfxDeleteObject((HGDIOBJ*)&m_hbmImageWell);
delete m_pStringMap; //<-this is marked with prob.

m_nCount = 0;
}

I dont think it comes from the CTooolbar variable in my project cos it nothing to do with it, it could be others, what do you reckon?
I tried to use call stack to debug upwards, but I have no idea where to find the bugs...

errgghh.. any idea guys???
thx a lot

 
Do you delete your CToolBar object? It looks like the destructor is trying to delete some memory, and maybe you already deleted it or overwrote that memory and now it cant. I think it can't find that variable to delete, either because you already deleted it or overwrote it.

tchouch gave me a bunch of things to look for as far as deleting varibale, you can read his stuff at the end of this post:

thread116-199140 luck, I know how frustrating that can be.
 
Thank you for the reply and the link, it is really great to get the info... really great stuff.... but still can't find oyut my mistake.... do you have any other resources... the thing is my c++ has not have a good base, that's why sometimes this vc++ confuse me a lot
right i'm still working on it.... hopefully can get some more info....
thx a lot
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top