HLE: title window shows the busy cursor and goes "Not responding" during loads (fix on a fork) #1616

Closed
opened 2026-11-26 04:38:28 +00:00 by github-bot · 0 comments
Owner

@⁠Vaximous on GitHub · 2026-11-24 19:48 UTC · original

Problem

While a title runs, the busy cursor shows over its window almost all the time, and clicking the window often turns it into a "Not responding" ghost.

Cause: the title creates its window on one of its own threads, and that thread only reads window messages when it reaches its PeekMessage loop. During loads and slow frames that can be seconds apart. Windows treats a window that hasn't read its messages for 5 s as hung: it shows the busy cursor, and a click replaces it with a ghost window. Measured round trips of a WM_NULL sent to the window: 100-690 ms typically, with multi-second stalls during loads.

Fix

In crates/victory-hle/src/modules/lifecycle.rs:

  • A title's top-level window is made message-only (HWND_MESSAGE), so it is never shown.
  • A stand-in window takes the title's window text, style, icon and fitted size. It runs on a dedicated victory-window thread whose only job is pumping its messages.
  • The title's ShowWindow shows the stand-in, and WM_SETTEXT is mirrored onto it.
  • Closing the stand-in suspends and ends the title as before. The keyboard window menu is still refused.
  • The stand-in goes away when the title's window does.
  • Frames are presented to the process's visible window, which is now the stand-in.
  • Input is unaffected, because titles read it through GameInput, not window messages.

Two files: lifecycle.rs (+322/-7) and crates/victory-hle/Cargo.toml (adds the Win32_Graphics_Gdi feature).

Branch

https://github.com/Vaximous/VIctory/compare/main...fix/title-window-standin (commit 7592443, based on ffe310e).

Tested

  • On ffe310e, cargo test -p victory-hle passes (96 tests, 0 failures), and cargo clippy -p victory-hle --all-targets -- -D warnings is clean.
  • Runtime (RTX 4070 Ti, Windows 11) was measured on our local integration build (main plus a set of open PRs), not on plain main.
    • WM_NULL round trip to the visible window: 0 ms in 47 of 50 samples, against 100-690 ms before.
    • No busy cursor or ghost window during loads, and clicking the window is safe.
    • Closing the window still ends the run.
    • Scripted keyboard and pad input work as before.

AI use

Written with Claude Code (Claude Opus 5.5); tested locally.

**@⁠Vaximous** on GitHub · 2026-11-24 19:48 UTC · [original](https://github.com/Marvisak/VIctory/issues/1616) ## Problem While a title runs, the busy cursor shows over its window almost all the time, and clicking the window often turns it into a "Not responding" ghost. Cause: the title creates its window on one of its own threads, and that thread only reads window messages when it reaches its PeekMessage loop. During loads and slow frames that can be seconds apart. Windows treats a window that hasn't read its messages for 5 s as hung: it shows the busy cursor, and a click replaces it with a ghost window. Measured round trips of a `WM_NULL` sent to the window: 100-690 ms typically, with multi-second stalls during loads. ## Fix In `crates/victory-hle/src/modules/lifecycle.rs`: - A title's top-level window is made message-only (`HWND_MESSAGE`), so it is never shown. - A stand-in window takes the title's window text, style, icon and fitted size. It runs on a dedicated `victory-window` thread whose only job is pumping its messages. - The title's `ShowWindow` shows the stand-in, and `WM_SETTEXT` is mirrored onto it. - Closing the stand-in suspends and ends the title as before. The keyboard window menu is still refused. - The stand-in goes away when the title's window does. - Frames are presented to the process's visible window, which is now the stand-in. - Input is unaffected, because titles read it through GameInput, not window messages. Two files: `lifecycle.rs` (+322/-7) and `crates/victory-hle/Cargo.toml` (adds the `Win32_Graphics_Gdi` feature). ## Branch https://github.com/Vaximous/VIctory/compare/main...fix/title-window-standin (commit 7592443, based on ffe310e). ## Tested - On ffe310e, `cargo test -p victory-hle` passes (96 tests, 0 failures), and `cargo clippy -p victory-hle --all-targets -- -D warnings` is clean. - Runtime (RTX 4070 Ti, Windows 11) was measured on our local integration build (main plus a set of open PRs), not on plain main. - `WM_NULL` round trip to the visible window: 0 ms in 47 of 50 samples, against 100-690 ms before. - No busy cursor or ghost window during loads, and clicking the window is safe. - Closing the window still ends the run. - Scripted keyboard and pad input work as before. ## AI use Written with Claude Code (Claude Opus 5.5); tested locally.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:38:28 +00:00
This discussion has been locked. Commenting is limited to contributors.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory#1616
No description provided.