A minimised or covered window stalls presents, then the title stops #333
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by derz92 on 2026-11-27T12:23:21Z.
Summary
If the game window is minimised (or the run starts minimised), the title stalls within seconds and then dies. While the window is in the Dock,
nextDrawablehands out few or no drawables. A present then stays at the head of the present FIFO waiting for one, the title's presents back up behind it, and the title stops.How it looked
Apple M5 Max, macOS 26.5. The window was miniaturised just after it opened (
VICTORY_COUNT_GREEN=1pacing):Illegal instruction: 4, at frame 32. Caveat: that Mac was also short of memory at the time (a GPU reset earlier had left ~20 GB held by the driver), so the exit itself may have had more than one cause. The stop in presents while minimised did not.With the change below, the same minimised start keeps ~30 presents a second and runs normally (
present: the window's visibility changed hidden=trueis logged).Proposed change
While the window is minimised or wholly covered (
isMiniaturized, orocclusionStatewithoutNSWindowOcclusionStateVisible, read in the window's event loop),try_presentcounts the frame as presented and draws nothing, as a headless run does. A drawable acquisition already in flight is left to finish. When the window can be seen again, presents go back to the layer.I'd like to take this one and will send a PR.
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by derz92 on 2026-11-27T12:23:24Z.
/claim
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-28T00:35:46Z.
Thank you for the report and the fix. While the window is minimised or fully covered, presents now count as shown and draw nothing, so the present queue does not back up (#341, on main). I am not sure it is fixed for your whole case: the original run also ended with "Illegal instruction" on a Mac short of memory, and I have not minimised the window myself. Could you retest a minimised start on
a6a58361and tell me if the title keeps running? I will close it when you say yes.