Skip to content

build-macos: published b1/b2 corrupt Genshin's asset reads (toolchain); configure against an installed engine - #2

Open
pharmacykitty wants to merge 1 commit into
mainfrom
build/toolchain-asset-corruption
Open

pharmacykitty wants to merge 1 commit into
mainfrom
build/toolchain-asset-corruption

Conversation

@pharmacykitty

Copy link
Copy Markdown
Collaborator

What

  • build-macos/README.md: records that the published b1 and b2 engines corrupt the data Genshin reads during scene loads, the evidence that it is the build and not the source, and how to configure against an installed engine.
  • build-macos/configure-from-engine.sh: configures a tree with Homebrew's headers and an installed engine's own x86_64 dylibs, sonames pinned to what the engine's unix halves dlopen.

Symptom

During a teleport or the login scene: HK4EUpload: error asr_003: BlobSignature not match [...blocks/00/<blk>@<offset>] by the dozen (spanning ~600 KB of one block), or Unity's The file 'CAB-…' is corrupted! / Position out of bounds / Mismatched serialization, then an endless loading screen or c0000005 in GenshinImpact.exe (once Trying to allocate 18446744073676197384B, a negative length from the garbage).

Ruled out, each by test

Game files (every failing .blk matches the server md5), Wine's file I/O (14,700 overlapped + unbuffered + mapped reads per block, byte-compared, clean on b1 and on Yaagl's wine-11.0), AVX advertising, the fps unlocker, the presenter and upscaler, the GPU identity, D3DMetal vs DXMT (both corrupt on b2), the launcher bundle, memory (RSS flat 4–6 GB for hours), msync lost wakes (sweep = 0).

The matrix

engine path result
published b1 Sevoflurane, D3DMetal 4.0b2 corrupt, 2–3 loads
published b1 wine steam.exe GenshinImpact.exe script, DXMT clean 5 h 16, 96 loads
published b2 Sevoflurane, DXMT corrupt, load 1
published b2 script, DXMT corrupt ×2, load 1–2
Yaagl wine-11.0 + DXMT 0.80 Yaagl script clean 1 h 45, 20 loads
same b2 commit, built locally script, DXMT clean 2 h 10, 21 loads

Local build: M4 Max, Xcode 27.0 27A5194q (Apple clang 21.0.0, ld-1328.2), configure-from-engine.sh recipe (x86_64 only, SDL on, no gstreamer), installed over an APFS clone of the published b2 keeping its arm64 wineserver, loader, DXMT/D3DMetal payloads, winegstreamer.so and winemetal.so.

Published x86_64-unix/*.so: LC_BUILD_VERSION sdk 27.0, tool ld 27037.1. Local: sdk 27.0, ld 1328.2. Both chained fixups; neither contains AVX code. So: toolchain, a flag that differs from the README recipe, or the i386+x86_64 build. A rebuild of b2 with Xcode 27.0's linker, or x86_64-only, checked through a few Genshin teleports, would tell which.

Also seen

  • One hang on the local build (not corruption): presents stop, all game threads parked, one GCD worker spinning in Rosetta runtime frames with audio HAL frames nearby. Samples kept.
  • Per-game renderer dxmt through WINEDLLPATH_PREPEND died at startup on the 1.0/1.1-beta app with b1 (c0000005 in kernel32 ~12 s); b2's loader change presumably covers it, untested here.

🤖 Generated with Claude Code

…figure that builds against an installed engine

The b1 and b2 engines corrupt data Genshin reads during a scene load (asr_003
BlobSignature mismatches, Unity "CAB is corrupted" / mismatched serialization,
then a stuck loading screen or c0000005). Files on disk are intact, Wine's
file I/O reads them correctly, and the renderer, presenter, GPU identity, AVX,
launcher and unlocker make no difference. The same b2 commit built locally
with Xcode 27.0 (ld-1328.2) and installed over a copy of the published engine
ran 2 h 10 min and 21 scene loads clean; the published .so files were linked
with ld 27037.1 against the same SDK. The README records the finding and the
evidence so the toolchain can be pinned.

configure-from-engine.sh configures a tree without deps/: Homebrew's headers,
the engine's own x86_64 dylibs for linking and sonames, and the sonames pinned
explicitly, since configure misreads @rpath install names and otherwise writes
a soname with otool's "(compatibility version …)" text into config.h, which
leaves secur32 without schannel.

Co-Authored-By: Claude Fable 5.1 <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.

1 participant