Skip to content

fix: startup crash with split screen saved on; Game Pass install notes - #42

Open
adrianpabon wants to merge 1 commit into
megabitt01:master-chieffrom
adrianpabon:fix/gamepass-startup-crash
Open

adrianpabon wants to merge 1 commit into
megabitt01:master-chieffrom
adrianpabon:fix/gamepass-startup-crash

Conversation

@adrianpabon

Copy link
Copy Markdown

What happened

With split screen saved on (alpha_ring_menu.bin with override on), MCC crashed at startup right after MCC: initialized GameEngine:

[info] [MatchStart] ApplySplitscreen(atGameStart=true): override=true player_count=4 ...
[debug] MCC: initialized GameEngine
[critical] Unhandled exception 0xC0000005 (ACCESS_VIOLATION) at address 0x0000000000000000 (unknown module), executing 0x0

The same build started fine when split screen was saved off.

Cause

CGameManager::Initialize hooks eight table functions through Hook::Detour, which created and enabled each hook before creating the next. get_player_profile is hooked first, and with override on it calls get_xuid(0) → ppOriginal.get_xbox_user_id, which is only filled when the third hook is created. If MCC asks for a profile during that window, it calls through null.

Fix

  • Hook::Detour(Detour_t) creates every hook first (so every ppOriginal is set) and only then enables them.
  • CGameManager::get_xuid returns 0 instead of calling an unset original (the callers already handle 0).

Also

  • Removes the == This version only supports the steam version of the game == warning: on the Game Pass build (MCCWinStore-Win64-Shipping.exe 1.3528.0.0) pattern mode finds all 11 MCC offsets, and the values match the ones verified by hand in Windows Store / Game Pass: version check reads the on-disk exe, which has no version resource — assert then aborts the game #19 (0x1DF35C, 0x1DF6C0, 0x5852BC, 0x376558, 0x373764, 0x3E4EFF8, 0x3E4EFF7, 0x3DC9800, 0x3E4FFC0, 0x3E4F018).
  • Adds a short Game Pass line to the README (install path and the "Halo: MCC Anti-Cheat Disabled (Mods and Limited Services)" Start menu entry). Nothing else in the README changed.

Tested

Game Pass, MCC 1.3528.0.0, Windows 11, Release build from this branch:

  • Before (CI build of 3c5520b): crash above on startup with split screen saved on.
  • After: same saved settings (override on, 4 players), MCC reaches AlphaRing initialization complete and the main menu.
  • Halo 3 split screen match: player 1 on a DualSense (through DS4Windows) and on keyboard/mouse both drive player 1. A second controller wasn't connected in this test, so players 2-4 controller input on Game Pass is not verified yet.
  • tools/offsets/check_gates.py passes.

Relates to #19.

CGameManager::Initialize hooked its eight table functions one at a time,
creating and enabling each before the next. The get_player_profile detour
(enabled first) reaches ppOriginal.get_xbox_user_id through get_xuid(0),
which is only filled when the third hook is created. With split screen
saved on, MCC asks for a profile during that window and calls through
null (ACCESS_VIOLATION executing 0x0 right after "initialized GameEngine").

Hook::Detour now creates every hook before enabling any, so all originals
are set first, and get_xuid returns 0 instead of calling an unset original.

Also drops the "only supports the steam version" warning (the Game Pass
1.3528 executable is handled through pattern mode) and adds the Game Pass
install path and no-EAC Start menu entry to the README.
JCorcho pushed a commit to JCorcho/AlphaRing that referenced this pull request Nov 3, 2026
…eam PR megabitt01#42)

Cherry-picked from megabitt01/AlphaRing pull request megabitt01#42 (9ac3d87, by
Adrián Pabón Mendoza): Hook::Detour creates every hook before enabling
any, and get_xuid returns 0 while the originals aren't set yet, so MCC
asking for a profile during CGameManager::Initialize no longer calls
through null. Drops the Steam-only warning; Game Pass notes in the README.

(cherry picked from commit 9ac3d87)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gt378zyZWqKFkyBtAuBoBn
@kirklandsig

Copy link
Copy Markdown

Thanks for this. The cause is right and so is the fix. Notes from reading it against current master-chief (32c1594, which has moved a lot since 3c5520b):

  • Merges cleanly with current master-chief, and the merge builds (WTSAPI32; check_gates.py passes). CI hasn't run here, since workflows on a first PR wait for a maintainer to approve them.
  • Hook::Detour(Detour_t), creating every hook before enabling any: that closes the window. MinHook enables a hook while MCC's other threads run, and with the old loop get_player_profile could go live before ppOriginal.get_xbox_user_id was filled. Now every ppOriginal is set before anything is enabled. If a create fails partway, the earlier hooks are left created but not enabled, which is safer than before (enabled, with later originals unset).
  • get_xuid's null check can't trigger on that path any more, since ppOriginal is set before any hook goes live. It's still a cheap guard, and the callers handle 0, so fine to keep.
  • The "Steam only" warning: agreed it can go. The offsets match a module by its PE timestamp and image size, not the version number. So the Game Pass exe (also 1.3528.0.0) goes to pattern mode, and Hook.cpp already logs "isn't the build AlphaRing's offsets are for ... pattern mode" for it. The game DLLs get the same check: identical files use the known offsets, and different ones are searched.
  • Optional, not needed for this fix: the other two overloads, Detour(DetourOffset) and Detour(module, DetourFunction), still create and enable one hook at a time. Nothing I found in their lists calls a sibling's original, so they're fine as they are. Giving them the same two loops would keep the three consistent.

Looks good to merge from my side.

kirklandsig added a commit to kirklandsig/AlphaRing that referenced this pull request Nov 20, 2026
…klist megabitt01#49, megabitt01#42 review)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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