Click here to Skip to main content
15,924,507 members

Comments by arjits (Top 4 by date)

arjits 3-Aug-15 9:03am View    
No it doesn't look like that case, else it would have failed every time on this function call? Isn't so?
arjits 31-Jul-15 12:20pm View    
Hello Sergey and Richard and third one (sorry don't know your name)

Thanks you for your time. This is a very intermittent issue and I can not recreate it.
My exe is failing (crashing) very intermittently and memory dumps are not providing much details on where the issue is.

When I run it in debug mode it runs fine with no crash or hang.

I can understand the information is very less to give any suggestions, however if you guys can suggest me any line of action or couple of pointers where to look for crash and hang of exe that would be very helpful.

Regards,
Arjit
arjits 31-Jul-15 9:37am View    
Basically, this portion of code have generated that error. Though that was only one time.

if(nIDEvent == FOCUS_TIMER && !WINCOR_IF())
{
try
{
if(theApp.pActiveDialog != NULL && IsWindow(theApp.pActiveDialog->m_hWnd))
{

CWnd * CurrentWindow = GetActiveWindow();

if(CurrentWindow->m_hWnd != theApp.pActiveDialog->m_hWnd )
{
theApp.pActiveDialog->BringWindowToTop();
theApp.pActiveDialog->SetFocus();
theApp.pActiveDialog->RedrawWindow();
CString OutMessage;
CString cstrCurrent;
CurrentWindow->GetWindowText(cstrCurrent);
CString cstrActive;
theApp.pActiveDialog->GetWindowText(cstrActive);
OutMessage.Format("** Active Window has not got focus. Current Window = '%s' attempting to set '%s' as the active window",cstrCurrent,cstrActive);
LogErrorMessage(__LINE__,__FILE__,OutMessage);
}
}

}
catch(...)
{
//Not a valid pointer
theApp.pActiveDialog = NULL;
}

Is it because of any windows related issue???
arjits 31-Jul-15 9:35am View    
I am sorry Dear, That was by mistake.