The title says it all. I was having a hang in our kiosk app after hours or days of our app working. I distilled it to CDhtmlDialog's Navigate(), or whatever it does.
Windows 10, Visual Studio 2013 Community Edition, MFC in shared DLL
Reproduced the issue in a bare-bones, freshly generated MFC dialog-based app that has a CDHtmlDialog-based modal dialog.
In that Dialog, all I do is set up a timer that calls every second or so to reload a page. Here is the timer routine.
void CDHtmlStressDlg::OnTimer(UINT nIDEvent)
{
Navigate(L"C:\\temp\\html\\test.html");
}
After a few hundred to a few thousand loads (not deterministic) - the entire UI freezes. If I try posting amessage to the window (which is what I tried in my old app) - I get error 1816 - (not enough quota). Dont know if its relevant, just one thing I observed.
Here is the thread dump after a hang (note, I do not create any threads of my own, this is all MFC stuff):
Not Flagged 764 0 Worker Thread msvcrt.dll!_threadstartex jscript9.dll!Event::Wait Normal
Not Flagged 6368 0 Main Thread Main Thread mfc120ud.dll!51fbbc54 Normal
Not Flagged 7228 0 Worker Thread ntdll.dll!TppWorkerThread ntdll.dll!_NtWaitForWorkViaWorkerFactory@20 Normal
Not Flagged 7936 0 Worker Thread ntdll.dll!TppWorkerThread ntdll.dll!_NtWaitForWorkViaWorkerFactory@20 Normal
Not Flagged 4284 0 Worker Thread ntdll.dll!TppWorkerThread ntdll.dll!_NtWaitForWorkViaWorkerFactory@20 Normal
Not Flagged 7844 0 Worker Thread msvcrt.dll!_threadstartex mshtml.dll!Memory::Recycler::ThreadProc Below Normal
Not Flagged 7252 0 Worker Thread mshtml.dll!CExecFT::StaticThreadProc() mshtml.dll!Memory::HeapBucketT<Memory::SmallNormalHeapBlockT<SmallAllocationBlockAttributes> >::SweepBucket Normal
Not Flagged 7172 0 Worker Thread ntdll.dll!TppWorkerThread ntdll.dll!_NtWaitForWorkViaWorkerFactory@20 Normal
Not Flagged 7176 0 Worker Thread mshtml.dll!CExecFT::StaticThreadProc() mshtml.dll!CTimerMan::ThreadExec Normal
Not Flagged 6252 0 Worker Thread ntdll.dll!TppWorkerThread ntdll.dll!_NtWaitForWorkViaWorkerFactory@20 Normal
Not Flagged 7812 0 Worker Thread winmm.dll!mciwindow win32u.dll!_NtUserGetMessage@16 Highest
Not Flagged > 5836 0 Worker Thread mshtml.dll!CExecFT::StaticThreadProc() combase.dll!CCliModalLoop::BlockFn Normal
Not Flagged 404 0 Worker Thread mshtml.dll!CExecFT::StaticThreadProc() combase.dll!CCliModalLoop::BlockFn Normal
Not Flagged 6920 0 Worker Thread msvcrt.dll!_threadstartex jscript9.dll!Recycler::ThreadProc Below Normal
And here is the html I'm loading
<!DOCTYPE html>
<html>
<head>
<style>
body {
overflow: hidden; /*suppress scroll bars*/
}
.box {
display: inline-block;
border-spacing: 0;
border-collapse: collapse;
font-family: Arial;
transform: rotate(90deg);
display: inline-block;
}
.line1 {
font-size: 210%;
color: Coral;
width: 1100px;
transform: translate(45%, 1120%);
text-align: center;
}
.pic1 {
width: 230px;
transform: translate(0%, -30px);
}
</style>
</head>
<body id=CHtmlMirror bgcolor=black>
<div class="box">
<div class="line1">Test Line to load</div>
</div>
<table border=0 class="pictureTable">
<tr><td><p><img class="pic1" src=file://c:/temp/icons/pic1.jpg></p></td></tr>
</table>
</body>
</html>