Closed
Conversation
Introduce SAFE_STATIC_DETOUR macro that validates IL2CPP method parameter counts before installing hooks, preventing crashes from game signature changes. Applied to all patch files replacing manual GetMethod/null-check patterns. Key fixes: - object_tracker: null guards for .ctor/OnDestroy resolution, GC finalizer null check, and signature scan size check before .get(0) - sync: update ProcessResultInternal hook from 4 to 2 params (v48084 API change), disable on ARM64 where spud trampoline can't relocate prologue - All patches now log actual parameter types on signature mismatch Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…hods Zoom: Disable SetDepth hook on macOS (ARM64 trampoline hang), expand zoom range per-frame in Update hook instead. Use AnimateToZoomDistance for absolute zoom presets to work with v48084's lerp-based animation system. Simplify all zoom hooks to call original first, then override _maximum. Sync: Rename HandleBinaryObjects to ParseBinaryObjectsHelper (2 params). Comment out SlotDataContainer slot hooks pending rewrite for new API (UpdateSlotData/RemoveSlotData with EntitySlot signature). Safe detour: Add DumpClassMethods/DumpClassFields diagnostics, auto-dump methods when SAFE_STATIC_DETOUR fails to find a method. NavigationZoom.h: Add AnimateToZoomDistance method wrapper. DMG script: Fix universal binary build with proper output directory. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
LDR literal (PC-relative load) instructions in hooked function prologues were copied verbatim to trampolines without relocation, causing crashes on Apple Silicon when the now-incorrect PC-relative offset pointed to garbage memory. This adds detection in needs_relocate() and a new ldr_literal_relocator that uses double-dereference (embed address, load address, then dereference) to correctly handle LDR X, LDR W, and LDRSW literal variants. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
GameServerModelRegistry and PlatformModelRegistry share the same compiled ProcessResultInternal methodPointer on macOS ARM64. The second SPUD_STATIC_DETOUR captured the first hook's absolute jump as the "original prologue", creating a broken trampoline with UDF instructions that crashed with EXC_BAD_INSTRUCTION. Add a double-hook guard to SAFE_STATIC_DETOUR that tracks hooked addresses and skips duplicates. Also add info-level logging of each hook's target address and first instruction for diagnostics. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add hidden MethodInfo* parameter to macOS ProcessResultInternal and ParseBinaryObjectsHelper hooks (fixes EXC_BAD_ACCESS in _gshared methods) - Fix AnimateToZoomDistance to pass full IL2CPP method signature with MethodInfo* (fixes Delegate_Combine crash on zoom presets) - Split sync hook implementations into proper #if _WIN32 / #else blocks - Remove verbose per-hook success log from SAFE_STATIC_DETOUR macro - Remove dead ResolutionListFix code and BattleTargetData hook Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
3 tasks
4 tasks
Owner
|
As there is a new PR, closing this one off. |
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduce SAFE_STATIC_DETOUR macro that validates IL2CPP method parameter counts before installing hooks, preventing crashes from game signature changes. Applied to all patch files replacing manual GetMethod/null-check patterns.
Key fixes: