Intermittent crash in frame hook |
Post Reply |
Author | |
ericgen34
Newbie Joined: 16 July 2019 Location: Salisbury Status: Offline Points: 6 |
Post Options
Thanks(0)
Posted: 22 September 2020 at 5:03am |
Hi,
We keep having some intermittent crashes reported by customers that we cannot reproduce in dev. The call stack of a typical crash is shown below. I wonder if someone has any idea what is going on? Or how we can start looking into this? We are using the framework normally as far as I know Thank you! |
|
ericgen34
Newbie Joined: 16 July 2019 Location: Salisbury Status: Offline Points: 6 |
Post Options
Thanks(0)
|
Apologies, the call stack screen shot didnt show. Here it is copied:
KERNELBASE.dll!_RaiseException@16() Unknown VCRUNTIME140.dll!_CxxThrowException(void * pExceptionObject, const _s__ThrowInfo * pThrowInfo) Line 129 C++ mfc140u.dll!AfxThrowResourceException() Line 1347 C++ > mfc140u.dll!CWindowDC::CWindowDC(CWnd * pWnd) Line 1018 C++ ToolkitPro1900vc150U.dll!CXTPCommandBarsFrameHook::RedrawFrame() Line 627 C++ ToolkitPro1900vc150U.dll!CXTPCommandBarsFrameHook::OnHookMessage(HWND__ * hWnd, unsigned int nMessage, unsigned int & wParam, long & lParam, long & lResult) Line 1025 C++ ToolkitPro1900vc150U.dll!CXTPHookManager::CHookSink::OnHookMessage(HWND__ * hWnd, unsigned int nMessage, unsigned int & wParam, long & lParam, long & lResult) Line 319 C++ ToolkitPro1900vc150U.dll!CXTPHookManager::HookWndProc(HWND__ * hWnd, unsigned int message, unsigned int wParam, long lParam) Line 440 C++ user32.dll!__InternalCallWinProc@20() Unknown user32.dll!UserCallWinProcCheckWow() Unknown user32.dll!DispatchClientMessage() Unknown user32.dll!___fnDWORD@4() Unknown ntdll.dll!_KiUserCallbackDispatcher@12() Unknown user32.dll!RealDefWindowProcWorker() Unknown user32.dll!RealDefWindowProcW() Unknown uxtheme.dll!_ThemeDefWindowProc() Unknown uxtheme.dll!_ThemeDefWindowProcW@16() Unknown user32.dll!DefWindowProcW() Unknown user32.dll!DefWindowProcWorker() Unknown user32.dll!DefDlgProcWorker() Unknown user32.dll!_DefDlgProcW@16() Unknown user32.dll!UserCallWinProcCheckWow() Unknown |
|
agontarenko
Admin Group Joined: 25 March 2016 Status: Offline Points: 299 |
Post Options
Thanks(0)
|
Hello,
Unfortunately it is not clear what
exactly is going wrong. Can you please provide more detailed
information. If it cannot be re-produced in any of our sample
applications provided I would appreciate you sending a sample
application so that we could debug it. Regards, Artem Gontarenko
|
|
ericgen34
Newbie Joined: 16 July 2019 Location: Salisbury Status: Offline Points: 6 |
Post Options
Thanks(0)
|
Well, we cant reproduce it either, and the application is rather big, I cant really send a sample I'm afraid. I just wondered if there are specific areas to look into
|
|
rdhd
Senior Member Joined: 13 August 2007 Location: United States Status: Offline Points: 891 |
Post Options
Thanks(0)
|
It would appear the input window to the constructor is not a valid window during the entire call to the constructor. Are you threading? MFC isn't thread safe. A lot can go on while this code executes: ASSERT(pWnd == NULL || ::IsWindow(pWnd->m_hWnd)); if (!Attach(::GetWindowDC(m_hWnd = pWnd->GetSafeHwnd()))) The first line is only executed for debug builds. If you want to validate a window during release builds, you have to make the IsWindow call before calling the constructor. If a thread takes over while doing "m_hWnd = ...) no the m_hWnd could be bad before the call to Attach is made.
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |