App hangs related to calling PeekMessageA

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
<span style="line-height:115%; font-family:Verdana,sans-serif; font-size:9pt I have an application that allows users to select objects on the screen by circle around them using the mouse. That is, left-click to start, move the pointer
to circle around the object, and then right-click to complete the operation. This operation causes the app hand sometimes when running on Windows 7. Based on the information in the dump file, the hang happens when
the app code calls PeekMessage API to get mouse position. I include the code segment and the debug information here. Could someone provide some directions as to the possible causes? Any suggestions will be greatly appreciated.
-jwang
---------------------------------------------------------------------------------------------------------------------
SetCapture(hWnd);<br/>
while (TRUE)<br/>
{<br/>
if (PeekMessage(lpMsg, hWnd, WM_MOUSEFIRST, WM_MOUSELAST,<br/>
PM_REMOVE | PM_NOYIELD))<br/>
{<br/>
for (iIndex = 0; iIndex < iNumFilters; iIndex++)<br/>
{<br/>
if (lpMsg->message == WM_MOUSEMOVE) {
<br/>

<br/>
#if defined(WIN32)<br/>
LONG2POINT(lpMsg->lParam, mousePoint);<br/>
#else<br/>
mousePoint = MAKEPOINT(lpMsg->lParam);
<br/>
#endif<br/>
<br/>
xformDpt2Nxy(lpXform,&rX,&rY,&mousePoint,1);
<br/>
stbarCoordUpdate(pSB,(double) rX, (double) rY, (LTGetNumberOfFiles() > 0));<br/>
}


<br/>
if (lpMsg->message EQUALS pnFilter[iIndex])<br/>
{<br/>

<br/>
#if defined(WIN32)<br/>
LONG2POINT(lpMsg->lParam,*lpPoint);<br/>
#else<br/>
*lpPoint = MAKEPOINT(lpMsg->lParam);<br/>
#endif
mstdRtn = MODESTATUS_SUCCESS;<br/>
break;<br/>
}<br/>
}
if (mstdRtn EQUALS MODESTATUS_SUCCESS)<br/>
{<br/>
break;<br/>
}<br/>
}<br/>
<span style="color:#c0504d <span> <a> else if (PeekMessageA(lpMsg, NULL, WM_KEYFIRST, WM_KEYLAST,
<span style="line-height:115%; font-family:Calibri,sans-serif; color:#c0504d; font-size:11pt <span>
PM_REMOVE | PM_NOYIELD)) //line 296 of ltmouse.cpp
{<br/>
if ((lpMsg->message EQUALS WM_KEYDOWN) AND<br/>
(lpMsg->wParam EQUALS VK_ESCAPE))<br/>
{<br/>
mstdRtn = MODESTATUS_ESCAPE;<br/>
break;<br/>
}<br/>
}<br/>
}
ReleaseCapture();

-----------------------------------------------
FAULTING_IP: <br/>
+11d68130<br/>
00000000 ?? ???
EXCEPTION_RECORD: ffffffff -- (.exr 0xffffffffffffffff)<br/>
ExceptionAddress: 00000000<br/>
ExceptionCode: 80000003 (Break instruction exception)<br/>
ExceptionFlags: 00000000<br/>
NumberParameters: 0
FAULTING_THREAD: 00000e0c
DEFAULT_BUCKET_ID: WRONG_SYMBOLS
PROCESS_NAME: MyApp.exe
ADDITIONAL_DEBUG_TEXT: <br/>
Use !findthebuild command to search for the target build information.<br/>
If the build information is available, run !findthebuild -s ; .reload to set symbol path and load symbols.
FAULTING_MODULE: 77500000 ntdll
DEBUG_FLR_IMAGE_TIMESTAMP: 4f634528
ERROR_CODE: (NTSTATUS) 0x80000003 - {EXCEPTION} Breakpoint A breakpoint has been reached.
EXCEPTION_CODE: (HRESULT) 0x80000003 (2147483651) - One or more arguments are invalid
MOD_LIST: <ANALYSIS/>
PRIMARY_PROBLEM_CLASS: WRONG_SYMBOLS
BUGCHECK_STR: APPLICATION_FAULT_WRONG_SYMBOLS
LAST_CONTROL_TRANSFER: from 75da2fdc to 77546194
STACK_TEXT: <br/>
WARNING: Stack unwind information not available. Following frames may be wrong.<br/>
00127678 75da2fdc 00127a14 00000000 00000100 ntdll!KiFastSystemCallRet<br/>
001276a4 00564fe2 00127a14 00000000 00000100 user32!PeekMessageA+0x12a<br/>
00127730 0056561d 001277a8 00127a14 00127a68 MyApp!LTGetMousePoint+0x162 [e:lt_vc7ltwin32ltltmouse.cpp @ 396]<br/>
001277b0 0056bca6 00127a4c 00127a48 00127a14 MyApp!LTGetMouseLocation+0x5d [e:lt_vc7ltwin32ltltmouse.cpp @ 705]<br/>
0012781c 13072cd2 00127a4c 00127a48 00127a14 MyApp!ServLTGetMouseLocation+0x26 [e:lt_vc7ltwin32ltltservic.cpp @ 878]<br/>
00127988 0557d990 00127a4c 00127a48 00127a14 svc!GetMouseLocation+0x82 [e:lt_vc7ltwin32svcwrappers.cpp @ 357]<br/>
00127b50 00569e87 00128434 0012fcb8 ffffffff ltzone!TOOL_DigitizeMapZone+0x590 [e:lt_vc7ltwin32ltzoneltzneutl.cpp @ 1332]<br/>
00127dcc 1307317f 00128434 0012fcb8 ffffffff MyApp!RunFunction+0xb7 [e:lt_vc7ltwin32ltltrunfun.cpp @ 1130]<br/>
00127f24 1295cc63 00128434 0012fcb8 ffffffff svc!RunFunctionSvc+0x6f [e:lt_vc7ltwin32svcwrappers.cpp @ 455]<br/>
00127f80 1295f5bb 00128434 0012fcb8 ffffffff macintrf!macintrfExecLTTool+0x13 [e:lt_vc7ltwin32macintrfmaccode.cpp @ 196]<br/>
001280f8 114a909b 0012fcb8 ffffffff 00000000 macintrf!ToolParametersCL::callTool+0x6b [e:lt_vc7ltwin32macintrftoolparameterscl.cpp @ 362]<br/>
00129b5c 114a2f04 001c5848 00129dc8 0012fcb8 intrprtr!intrprtrExecuteMacroImageHelper+0x604b [e:lt_vc7ltwin32intrprtrintexec.cpp @ 1374]<br/>
00129df8 1295d6a3 001c5848 0012fcb8 ffffffff intrprtr!intrprtrExecuteMacroImage+0x54 [e:lt_vc7ltwin32intrprtrintexec.cpp @ 1519]<br/>
00129e80 00569a5b 06b4b590 0012fcb8 ffffffff macintrf!macintrfRunMacroToolHelper+0x3b3 [e:lt_vc7ltwin32macintrfmaccode.cpp @ 789]<br/>
00129ef0 00569e63 0012a7d4 0012fcb8 ffffffff MyApp!RunMacro+0x6b [e:lt_vc7ltwin32ltltrunfun.cpp @ 108]<br/>
0012a16c 1307317f 0012a7d4 0012fcb8 ffffffff MyApp!RunFunction+0x93 [e:lt_vc7ltwin32ltltrunfun.cpp @ 1123]<br/>
0012a2c4 1295cc63 0012a7d4 0012fcb8 ffffffff svc!RunFunctionSvc+0x6f [e:lt_vc7ltwin32svcwrappers.cpp @ 455]<br/>
0012a320 1295f5bb 0012a7d4 0012fcb8 ffffffff macintrf!macintrfExecLTTool+0x13 [e:lt_vc7ltwin32macintrfmaccode.cpp @ 196]<br/>
0012a498 114a909b 0012fcb8 ffffffff 00000000 macintrf!ToolParametersCL::callTool+0x6b [e:lt_vc7ltwin32macintrftoolparameterscl.cpp @ 362]<br/>
0012befc 114a2f04 001c56c8 0012c168 0012fcb8 intrprtr!intrprtrExecuteMacroImageHelper+0x604b [e:lt_vc7ltwin32intrprtrintexec.cpp @ 1374]<br/>
0012c198 1295d6a3 001c56c8 0012fcb8 ffffffff intrprtr!intrprtrExecuteMacroImage+0x54 [e:lt_vc7ltwin32intrprtrintexec.cpp @ 1519]<br/>
0012c220 00569a5b 06b4b110 0012fcb8 ffffffff macintrf!macintrfRunMacroToolHelper+0x3b3 [e:lt_vc7ltwin32macintrfmaccode.cpp @ 789]<br/>
0012c290 00569e63 0012cb74 0012fcb8 ffffffff MyApp!RunMacro+0x6b [e:lt_vc7ltwin32ltltrunfun.cpp @ 108]<br/>
0012c50c 1307317f 0012cb74 0012fcb8 ffffffff MyApp!RunFunction+0x93 [e:lt_vc7ltwin32ltltrunfun.cpp @ 1123]<br/>
0012c664 1295cc63 0012cb74 0012fcb8 ffffffff svc!RunFunctionSvc+0x6f [e:lt_vc7ltwin32svcwrappers.cpp @ 455]<br/>
0012c6c0 1295f5bb 0012cb74 0012fcb8 ffffffff macintrf!macintrfExecLTTool+0x13 [e:lt_vc7ltwin32macintrfmaccode.cpp @ 196]<br/>
0012c838 114a909b 0012fcb8 ffffffff 00000000 macintrf!ToolParametersCL::callTool+0x6b [e:lt_vc7ltwin32macintrftoolparameterscl.cpp @ 362]<br/>
0012e29c 114a2f04 001c5338 0012e508 0012fcb8 intrprtr!intrprtrExecuteMacroImageHelper+0x604b [e:lt_vc7ltwin32intrprtrintexec.cpp @ 1374]<br/>
0012e538 1295d6a3 001c5338 0012fcb8 ffffffff intrprtr!intrprtrExecuteMacroImage+0x54 [e:lt_vc7ltwin32intrprtrintexec.cpp @ 1519]<br/>
0012e5c0 00569a5b 06b4b230 0012fcb8 ffffffff macintrf!macintrfRunMacroToolHelper+0x3b3 [e:lt_vc7ltwin32macintrfmaccode.cpp @ 789]<br/>
0012e630 00569e63 0012ec34 0012fcb8 ffffffff MyApp!RunMacro+0x6b [e:lt_vc7ltwin32ltltrunfun.cpp @ 108]<br/>
0012e8ac 1307317f 0012ec34 0012fcb8 ffffffff MyApp!RunFunction+0x93 [e:lt_vc7ltwin32ltltrunfun.cpp @ 1123]<br/>
0012ea04 1295cc63 0012ec34 0012fcb8 ffffffff svc!RunFunctionSvc+0x6f [e:lt_vc7ltwin32svcwrappers.cpp @ 455]<br/>
0012ea60 1295f5bb 0012ec34 0012fcb8 ffffffff macintrf!macintrfExecLTTool+0x13 [e:lt_vc7ltwin32macintrfmaccode.cpp @ 196]<br/>
0012ebd8 1295d25a 0012fcb8 ffffffff 00000000 macintrf!ToolParametersCL::callTool+0x6b [e:lt_vc7ltwin32macintrftoolparameterscl.cpp @ 362]<br/>
0012f6d4 11174885 06b4b2f0 0012fcb8 0018cb88 macintrf!macintrfRunMacroFileDrv+0x9a [e:lt_vc7ltwin32macintrfmaccode.cpp @ 580]<br/>
0012f788 11170f2e 0012fcb8 0018cb88 00000000 cmdmgr!MacroCommandCL::Execute+0x395 [e:lt_vc7ltwin32cmdmgrmacrocommandcl.cpp @ 236]<br/>
0012f7e4 1117030b 00008043 0012fcb8 0018cb88 cmdmgr!CommandRegistryCL::OnCommandExecute+0x2e [e:lt_vc7ltwin32cmdmgrcommandregistrycl.cpp @ 216]<br/>
0012f840 12bd5bb0 00008043 0012fcb8 0018cb88 cmdmgr!CommandMasterCL::OnCommandExecute+0x1b [e:lt_vc7ltwin32cmdmgrcommandmastercl.cpp @ 485]<br/>
0012f8a0 68f891f3 00008043 00000003 00000176 project!ProjectDocCL::OnProjCommand+0x20 [e:lt_vc7ltwin32projectprojectdoccl.cpp @ 456]<br/>
0012f8e8 68f898ca 01e02860 00008043 00000000 mfc100d+0x3191f3<br/>
0012f94c 690034e1 00008043 00000000 00000000 mfc100d+0x3198ca<br/>
0012f968 6909e98c 00008043 00000000 00000000 mfc100d+0x3934e1<br/>
0012f9a4 690e6b1b 00008043 00000000 00000000 mfc100d+0x42e98c<br/>
0012f9f4 68d75d41 00008043 00000000 00000000 mfc100d+0x476b1b<br/>
0012fa10 690c1584 00008043 00000000 00000000 mfc100d+0x105d41<br/>
0012fa74 690e55c1 00008043 00000000 01e38a40 mfc100d+0x451584<br/>
0012fa94 68d7459f 00008043 00000000 01e38a40 mfc100d+0x4755c1<br/>
0012faac 690c00a9 00008043 00000000 39ae3ec8 mfc100d+0x10459f<br/>
0012fc30 690bfff2 00000111 00008043 00000000 mfc100d+0x4500a9<br/>
0012fc50 690bc523 00000111 00008043 00000000 mfc100d+0x44fff2<br/>
0012fcd0 690bcb16 01e38a40 003801ec 00000111 mfc100d+0x44c523<br/>
0012fcf0 68ea8f7b 003801ec 00000111 00008043 mfc100d+0x44cb16<br/>
0012fd2c 75da86ef 003801ec 00000111 00008043 mfc100d+0x238f7b<br/>
0012fd58 75da8876 68ea8f20 003801ec 00000111 user32!IsThreadDesktopComposited+0x11f<br/>
0012fdd0 75da89b5 00186d0c 68ea8f20 003801ec user32!IsThreadDesktopComposited+0x2a6<br/>
0012fe30 75da3578 68ea8f20 00000001 0012fe60 user32!IsThreadDesktopComposited+0x3e5<br/>
0012fe40 69099012 0018cb40 00000000 00000000 user32!DispatchMessageA+0xf<br/>
0012fe60 6909a5ce 00785728 0012fe88 69099d9d mfc100d+0x429012<br/>
0012fe6c 69099d9d 00000001 00785728 0018cb10 mfc100d+0x42a5ce<br/>
0012fe88 68f6bd09 00785728 006756af ffffffff mfc100d+0x429d9d<br/>
0012fe9c 690f3b5f 00000000 00000000 00000000 mfc100d+0x2fbd09<br/>
0012fec0 006742ea 00400000 00000000 00171e5e mfc100d+0x483b5f<br/>
0012fed8 00641c80 00400000 00000000 00171e5e MyApp!WinMain+0x1a [f:ddvctoolsvc7libsshipatlmfcsrcmfcappmodul.cpp @ 26]<br/>
0012ff80 00641a0f 0012ff94 77311114 7ffdd000 MyApp!__tmainCRTStartup+0x260 [f:ddvctoolscrt_bldself_x86crtsrccrtexe.c @ 547]<br/>
0012ff88 77311114 7ffdd000 0012ffd4 7755b299 MyApp!WinMainCRTStartup+0xf [f:ddvctoolscrt_bldself_x86crtsrccrtexe.c @ 371]<br/>
0012ff94 7755b299 7ffdd000 712e5b66 00000000 kernel32!BaseThreadInitThunk+0x12<br/>
0012ffd4 7755b26c 00517e23 7ffdd000 00000000 ntdll!RtlInitializeExceptionChain+0x63<br/>
0012ffec 00000000 00517e23 7ffdd000 00000000 ntdll!RtlInitializeExceptionChain+0x36
<br/>
STACK_COMMAND: ~0s; .ecxr ; kb
FOLLOWUP_IP: <br/>
MyApp!LTGetMousePoint+162 [e:lt_vc7ltwin32ltltmouse.cpp @ 396]<br/>
00564fe2 85c0 test eax,eax
SYMBOL_STACK_INDEX: 2
SYMBOL_NAME: MyApp!LTGetMousePoint+162
FOLLOWUP_NAME: MachineOwner
MODULE_NAME: MyApp
IMAGE_NAME: MyApp.exe
BUCKET_ID: WRONG_SYMBOLS
FAILURE_BUCKET_ID: WRONG_SYMBOLS_80000003_MyApp.exe!LTGetMousePoint
WATSON_STAGEONE_URL: http://watson.microsoft.com/StageOne/RoutePro_exe/9_3_0_3/4f634528/unknown/0_0_0_0/bbbbbbb4/80000003/00000000.htm?Retriage=1
http://watson.microsoft.com/StageOne/RoutePro_exe/9_3_0_3/4f634528/unknown/0_0_0_0/bbbbbbb4/80000003/00000000.htm?Retriage=1
Followup: MachineOwner<br/>


View the full article
 
Back
Top