|
-
May 24th, 1999, 08:51 AM
#1
First Chance Exceptions in the relase build only! Help!!!!!
A certain stages of my program execution only in the release build it causes and exception which I can't track down! They all occur with the same dialog class so I'[m thinking it's something I did (well duh!)
With a little bit of help from someone on the board I managed to construct some settings that allowed be to kinda debug the release build.
I get a first chance exception and then this from the Call Stack window:
CMapPtrToPtr::GetValueAt(const CMapPtrToPtr * const 0x000004be {CMapPtrToPtr}, void * 0x00000cf0) line 178 + 1 byte
COleControlContainer::AttachControlSite(COleControlContainer * const 0x000004be {COleControlContainer}, CWnd * 0x0065fc18 {CStatic hWnd=???}) line 444
MFC42! 5f45d118()
CWnd::FromHandle(HWND__ * 0x00000cf0) line 293
CWinThread::PreTranslateMessage(CWinThread * const 0x000004be {CWinThread h=??? proc=???}, tagMSG * 0x0041ba74 {msg=0x0000000f wp=0x00000000 lp=0x00000000}) line 673
CWinThread::PumpMessage(CWinThread * const 0x000004be {CWinThread h=??? proc=???}) line 841 + 17 bytes
CWnd::RunModalLoop(CWnd * const 0x000004be {CWnd hWnd=???}, unsigned long 1598103293) line 3478 + 12 bytes
CDialog: oModal(CDialog * const 0x000004be {CDialog hWnd=???}) line 540
MFC42! AfxGetResourceHandleCompat(void) + 4677 bytes
INET TIMER V2! AfxWinMain(struct HINSTANCE__ *,struct HINSTANCE__ *,char *,int) + 574 bytes
INET TIMER V2! _except_handler3 address 0x004130b2
KERNEL32! bffbfe14()
It then points to this function in the MFC code:
void* CMapPtrToPtr::GetValueAt(void* key) const
// find value (or return NULL -- NULL values not different as a result)
{
if (m_pHashTable == NULL)
return NULL;
UINT nHash = HashKey(key) % m_nHashTableSize;
// see if it exists
CAssoc* pAssoc;
for (pAssoc = m_pHashTable[nHash]; pAssoc != NULL; pAssoc = pAssoc->pNext)
{
if (pAssoc->key == key)
return pAssoc->value;
}
return NULL;
}
None of the code has anything to do with me so i can't tell what's causing it! Could the clues lye in that the hWnds and HInstances are all '???' ?
Just so you know this happens when the Dialog tries to send a message and move itself.
Thanks for any help - Zubair Khan
-
May 24th, 1999, 08:57 AM
#2
Re: First Chance Exceptions in the relase build only! Help!!!!!
Just one question....
Are you sure ALL your message handlers are declared with BOTH the WPARAM and the LPARAM parameters?
Sally
-
May 24th, 1999, 09:35 AM
#3
Re: First Chance Exceptions in the relase build only! Help!!!!!
You genius.
That worked for one of them, but not all. Some have nothing to do messages. The same thing occurs when I call CDialog: estroyWindow() after I've used a CClientDC object. Even if I do nothing with it.
How did you figure that one out? Is it common knowledge?
-
May 24th, 1999, 11:29 AM
#4
Re: First Chance Exceptions in the relase build only! Help!!!!!
I'm suspicious of the line with the "CStatic hwnd=???". This means that it can't find a window handle for one of your static controls. The CWnd* exists, but the HWND (which is most important) does not exist. Are you attempting to send the message to the dialog before any of the controls (HWND's, *not CWnd*) really exist?
Regards,
Paul McKenzie
-
May 24th, 1999, 08:41 PM
#5
Re: First Chance Exceptions in the relase build only! Help!!!!!
I'd go with Paul's suggestion here.
Are you trying to work with the window after it has been deleted?
Are you using CCLientDC on the window AFTER it has been deleted?
Sally
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
|