fuzzer under Windows GUI hangs on minimize window
On the Windows GUI (nethackw.exe), while running the fuzzer, if the NetHack window gets minimized, or someone minimizes all desktop windows, the NetHack window stops responding and won't even repaint itself. The NetHack process continues to use the CPU. A break in the debugger shows that it is caught in a do loop. I didn't delve into the issue of why minimizing the window triggers a condition that leads to the endless loop. This just adds a kludge to exit the loop while fuzzing.
This commit is contained in:
@@ -1532,6 +1532,8 @@ onListChar(HWND hWnd, HWND hwndList, WORD ch)
|
||||
int iter = topIndex;
|
||||
do {
|
||||
i = iter % data->menui.menu.size;
|
||||
if (iflags.debug_fuzzer && iter > 1000000)
|
||||
ch = data->menui.menu.items[i].accelerator;
|
||||
if (data->menui.menu.items[i].accelerator == ch) {
|
||||
if (data->how == PICK_ANY) {
|
||||
SelectMenuItem(
|
||||
|
||||
Reference in New Issue
Block a user