|
-
March 29th, 1999, 07:27 AM
#1
App crashing on exit in release mode not in debug
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
-
March 29th, 1999, 07:39 AM
#2
Re: App crashing on exit in release mode not in debug
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);
-
March 29th, 1999, 08:02 AM
#3
Re: App crashing on exit in release mode not in debug
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!!!!
-
March 29th, 1999, 08:35 AM
#4
Re: App crashing on exit in release mode not in debug
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?
-
March 29th, 1999, 09:33 PM
#5
Re: App crashing on exit in release mode not in debug
Don't acll exit(0) from a windows app
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|