Skip to content

fix(linux): exit after unexpected display startup failure - #1128

Merged
NotRexed merged 4 commits into
NotRexed:mainfrom
monsterlag:fix/linux-display-startup-errors
Nov 10, 2026
Merged

NotRexed merged 4 commits into
NotRexed:mainfrom
monsterlag:fix/linux-display-startup-errors

Conversation

@monsterlag

@monsterlag monsterlag commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Refs #1116, reported by @AL-33.

When SDL cannot load, initialize, or create a window, Hookshot can continue invisibly with audio. A failed window creation starts an offscreen renderer and sleeps indefinitely. Return a distinct initialization error and exit with status 1 after logging and flushing the diagnostic. All three failures also print their reason to stderr. Explicit HOS_HEADLESS and successful visible startup retain their behavior.

Shader preparation remains usable without SDL or a display: the POSIX entry point recognizes --prepare-shaders before display initialization, then lets the preparation worker finish or report its existing no-Vulkan exit 3. Values supplied to --romfs and --user are skipped when identifying that flag.

The report identifies a missing libvulkan.so.1. Supplying that dependency and NixOS packaging remain separate work.

Validation on 8a72a7d, merged with upstream 7dbdcdc:

  • All 11 fixture cases pass with Windows LLVM-MinGW and Linux GCC under -Wall -Wextra -Werror. The focused strict runner passes with zero failures or skips.
  • Before the review correction, the three stderr checks and both preparation checks fail; the four original controls pass. The final cases also cover both path values equal to --prepare-shaders.
  • The original three failure paths were separately demonstrated failing against original main 8b2e1d3.
  • The PR diff passes whitespace checks. All eight hosted validation checks pass for this head; release publishing is skipped for the PR.

The fixture extracts the production initialization/start functions and POSIX entry point, plus the display loop's window-startup prefix. SDL, threading, renderer and termination are authored stubs; preparation worker success and exit 3 are authored outcomes. Real SDL/NixOS execution, Vulkan shader preparation, event/render processing and actual thread concurrency remain untested by this fixture. No game data is included.

monsterlag and others added 2 commits November 9, 2026 08:33
Return a distinct initialization error and stop before game startup when SDL cannot load or initialize. Flush the window creation error and exit instead of continuing invisibly offscreen. Preserve explicit headless startup.

Add seven production-extraction regressions covering the three failures and four existing-behavior controls.

Assisted-by: OpenAI Codex

Co-Authored-By: OpenAI Codex <noreply@openai.com>
@NotRexed

Copy link
Copy Markdown
Owner

This landed in the v2.0.12 branch (merged there for testing; it reaches main with that release), so closing. Thanks!

@NotRexed NotRexed closed this Nov 10, 2026
@NotRexed

Copy link
Copy Markdown
Owner

Reopened: closing this was a mistake on my side. It was tested in the v2.0.12 branch, and it will be merged into main here, so it shows as merged. Sorry for the noise.

@NotRexed NotRexed reopened this Nov 10, 2026
@NotRexed
NotRexed merged commit 84ff883 into NotRexed:main Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants