Hanging of whole application in IsDialogMessage() function

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
joim
In need of some credit
In need of some credit
Posts: 1
Joined: Wed Jan 27, 2016 9:26 am

Hanging of whole application in IsDialogMessage() function

Post by joim »

I have a problem with the windows version of wxWidgets.
I use VisualStudio 2010 compiler and wxWidgets version 3.0.2
My application (aqs.exe) is running on a tablet PC with touchscreen under Windows 8.1.

Sporadically suddenly the application GUI freezes, the whole application is hanging and must be killed by Windows Task Manager. This sometimes happens after a few minutes, sometimes after several hours.

I connected with the Visual studio remote debugger to the PC while the application was hanging and found out, that application hanged in the wx main message loop in file evtloop.cpp in the function "PreProcessMessage":
The ::IsDialogMessage() function call seems to lead to a kind of deadlock situation.

Here is the complete call stack:
ntdll.dll!_ZwWaitForMultipleObjects@20() + 0xc bytes
KernelBase.dll!_WaitForMultipleObjectsEx@20() - 0x5d bytes
user32.dll!MsgWaitForMultipleObjectsEx() + 0x163 bytes
combase.dll!CCliModalLoop::BlockFn(void * * ahEvent=0x01d0ede8, unsigned long cEvents=1, unsigned long * lpdwSignaled=0x01d0ede4) Line 1571 + 0xf bytes C++
combase.dll!ThreadSendReceive(CMessageCall * pCall=0x00000000, const _GUID & rmoid={...}) Line 5776 + 0xc0 bytes C++
combase.dll!CRpcChannelBuffer::SendReceive2(tagRPCOLEMESSAGE * pMessage=0x01d0f0ec, unsigned long * pstatus=0x01d0f0b4) Line 4796 + 0xd7 bytes C++
combase.dll!ClassicSTAThreadSendReceive(CAptRpcChnl * pChannel=0x059f81f0, tagRPCOLEMESSAGE * pMsg=0x01d0f0ec, unsigned long * pulStatus=0x01d0f0b4) Line 696 + 0x3b bytes C++
combase.dll!CCtxComChnl::SendReceive(tagRPCOLEMESSAGE * pMessage=0x01d0f0ec, unsigned long * pulStatus=0x01d0f0b4) Line 790 + 0x81 bytes C++
combase.dll!NdrExtpProxySendReceive(void * pThis=0x059f6164, _MIDL_STUB_MESSAGE * pStubMsg=0x01d0f118) Line 2017 C++
rpcrt4.dll!@NdrpProxySendReceive@4() + 0x29 bytes
rpcrt4.dll!_NdrClientCall2() + 0x22b bytes
combase.dll!ObjectStublessClient(void * ParamAddress=0x01d0f538, long Method=4) Line 215 + 0x9 bytes C++
combase.dll!_ObjectStubless@0() Line 171 Asm
tiptsf.dll!CCPenIMX::OnClearHW() + 0x4b bytes
tiptsf.dll!CPenIMX_WindowProc() + 0x126c0 bytes
user32.dll!__InternalCallWinProc@20() + 0x2b bytes
user32.dll!UserCallWinProcCheckWow() + 0x1a9 bytes
user32.dll!DispatchMessageWorker() + 0x200 bytes
user32.dll!IsDialogMessageW() + 0x10f bytes
aqs.exe!wxGUIEventLoop::PreProcessMessage(tagMSG * msg=0x01d0f714) Line 97 + 0x10 bytes C++
aqs.exe!wxGUIEventLoop::ProcessMessage(tagMSG * msg=0x01d0f714) Line 166 + 0xd bytes C++
aqs.exe!wxGUIEventLoop::Dispatch() Line 232 C++
aqs.exe!wxEventLoopBase::Run() Line 78 + 0xe bytes C++
aqs.exe!wxAppConsoleBase::MainLoop() Line 334 + 0xe bytes C++
aqs.exe!wxEntryReal(int & argc=1, wchar_t * * argv=0x02150a88) Line 495 + 0x11 bytes C++
aqs.exe!wxEntry(int & argc=1, wchar_t * * argv=0x02150a88) Line 188 + 0xd bytes C++
aqs.exe!wxEntry(HINSTANCE__ * hInstance=0x00930000, HINSTANCE__ * __formal=0x00000000, HINSTANCE__ * __formal=0x00000000, int nCmdShow=1) Line 395 + 0x19 bytes C++
aqs.exe!WinMain(HINSTANCE__ * hInstance=0x00930000, HINSTANCE__ * hPrevInstance=0x00000000, char * __formal=0x02041e56, int nCmdShow=1) Line 26 + 0x2a bytes C++
aqs.exe!__tmainCRTStartup() Line 547 + 0x1c bytes C
kernel32.dll!@BaseThreadInitThunk@12() + 0x24 bytes
ntdll.dll!__RtlUserThreadStart() + 0x2f bytes
ntdll.dll!__RtlUserThreadStart@8() + 0x1b bytes
Here is the content of the variable "msg" in watch window:
msg:
message 1033 unsigned int
wParam 0 unsigned int
lParam 0 long
time 1150266469 unsigned long
pt {x=1258 y=1130} tagPOINT
So my conclusions at the moment:
1. The message which is hanging has a coordinate "pt", which sometime lies inside of display dimensions, sometimes (as in above example) lies outside of display dimensions.
2. The message seems to be correlated with tiptsf.dll (see call stack), which belongs to the "Tablet PC Input Panel Text Services Framework", wich seems to provide the functionality for e.g. virtual keyboard.
3. If I disable the "touch keyboard and handwriting panel" service, I could not reproduce the error. But in this case, the Virtual keyboard does not work any more. So this is no solution, because user must be able to enter text in some dialogs of the application
4. I did not find any documentation what message 1033 could mean. Sometimes there are other numbers, but in most cases it is the 1033.

Does anybody have any ideas what could be the reason for the sporadic hangings?
Thank you very much for any feedback!
Post Reply