Click to See Complete Forum and Search --> : App crashing on exit in release mode not in debug
Steve McNeese
March 29th, 1999, 06:27 AM
My application is crashing when it executes in release mode but does fine in debug. I am using a thread for reading the serial port, but in AppExit I check for and kill the thread if it exists. What else would cause this? Is there any way to figure out where this is occurring by debugging the running release mode application?
Thanks,
Steve
Steve McNeese
March 29th, 1999, 06:39 AM
After further testing, it turns out to be a call to GetWindowPlacement(). The code is as follows:
CAWIMSApp* pApp = (CAWIMSApp*)AfxGetApp();
WINDOWPLACEMENT *wndpl;
pApp->m_pMainWnd->GetWindowPlacement(wndpl);
AfxMessageBox("Finished GetWindowPlacement");
pApp->WriteProfileInt("AWIMS Client","Maximized",pApp->m_pMainWnd->IsZoomed());
pApp->WriteProfileInt("AWIMS Client","Minimized",pApp->m_pMainWnd->IsIconic());
pApp->WriteProfileInt("AWIMS Client","Left",wndpl->rcNormalPosition.left);
pApp->WriteProfileInt("AWIMS Client","Right",wndpl->rcNormalPosition.right);
pApp->WriteProfileInt("AWIMS Client","Top",wndpl->rcNormalPosition.top);
pApp->WriteProfileInt("AWIMS Client","Bottom",wndpl->rcNormalPosition.bottom);
Steve McNeese
March 29th, 1999, 07:02 AM
Ok, I was reading my post looking at my code snippet, I noticed that I did not allocated memory for the wndpl variable. Oops! Nevermind!!!!
Steve McNeese
March 29th, 1999, 07:35 AM
Ok, now that I fixed that problem, I am still have the original crash. This time it occurs when I call exit(0); Any ideas?
sally
March 29th, 1999, 08:33 PM
Don't acll exit(0) from a windows app
Sally
March 29th, 1999, 08:33 PM
Don't acll exit(0) from a windows app
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.