Skip to content

Crash when clicking Load Game/Replay in main menu #52

Description

@fbraz3

Description

On macOS, clicking "Load Game" or "Load Replay" in the main menu crashes the app.

This does not reproduce on Linux with equivalent game data and flow.

Steps to Reproduce

  1. Launch GeneralsXZH on macOS
  2. Go to main menu
  3. Click "Load Game" or "Load Replay"
  4. App exits/crashes

Expected Behavior

The save/load UI should open and allow selecting a save file or replay.

Actual Behavior

The app exits with status 1 right after entering the SaveLoad flow.

Environment

  • Platform: macOS (arm64)
  • Target: GeneralsXZH
  • Build stack: SDL3 + DXVK (macos-vulkan preset)
  • Repro: consistent on macOS
  • Linux status: same flow works correctly

Evidence Collected

  • The click path reaches main-menu callback and pushes Menus/SaveLoad.wnd.
  • winCreateLayout("Menus/SaveLoad.wnd") returns a valid pointer.
  • Process exits immediately after that point.

From logs/osx-manual-exec-lldb.log:

  • DEBUG: Shell::push() called with filename='Menus/SaveLoad.wnd'
  • DEBUG: About to call TheWindowManager->winCreateLayout('Menus/SaveLoad.wnd')
  • DEBUG: winCreateLayout returned: 0x8520f9940
  • Process ... exited with status = 1

Important Context

  • Session 94 fixed Fontconfig packaging/runtime config for macOS.
  • Fontconfig errors were removed, but this crash remained.
  • This suggests a separate issue from the earlier font config failure.

Suspected Area (for future investigation)

Likely post-layout init path on macOS (not .wnd file loading itself):

  • GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/MainMenu.cpp
  • GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/PopupSaveLoad.cpp (SaveLoadMenuFullScreenInit)
  • GeneralsMD/Code/GameEngine/Source/Common/System/SaveGame/GameState.cpp (populateSaveGameListbox, save file iteration)

Rationale:

  • Linux works.
  • Layout creation succeeds.
  • Failure likely occurs during SaveLoad init callbacks / widget lookup / save-list population in macOS runtime context.

Acceptance Criteria

When investigation resumes:

  • Capture exact failing frame (lldb backtrace at crash point)
  • Identify whether failure is in SaveLoad init callback vs save-list population
  • Confirm if any window/widget lookup returns null in macOS path
  • Confirm save directory/path handling is valid in macOS app/bundle runtime
  • Fix remains macOS-scoped or backend-scoped and does not regress Linux

Notes

Investigation intentionally deferred for now; issue tracks known macOS-only crash with current evidence.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions