Story mode load: crashes during prologue prestream (was: deadlock after setup) #15

Closed
opened 2026-11-26 09:20:48 +00:00 by LakshanSivakumar · 24 comments
LakshanSivakumar commented 2026-11-26 09:20:48 +00:00 (Migrated from github.com)
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-26T09:20:48Z.


After the setup screens (or straight away once setup is saved) the game starts loading story mode and never finishes. Frames keep presenting. Reported in #13; reproduces headless.

What is known so far:

  • DirectStorage is not the cause: one burst of about 5,200 requests completes, nothing stays pending, and after that there are no reads at all. Under Wine the same load keeps reading.
  • Three title threads end up waiting on each other:
    1. A loader thread spins in Sleep(1) waiting for one streaming request to finish. This is CPU-side state only.
    2. The streaming thread waits on its wake event. Only a per-frame update job kicks that event.
    3. The main thread blocks on a semaphore for the whole load. The semaphore is never released, so the per-frame update never runs.
  • Next step: find which host behaviour differs from Windows, so that the kick never arrives or the streaming thread goes idle with a request still open. The event, semaphore and critical-section code looks right so far.

Being investigated now.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:issue:6623464615 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/15). Originally posted by [LakshanSivakumar](https://github.com/LakshanSivakumar) on 2026-11-26T09:20:48Z. --- After the setup screens (or straight away once setup is saved) the game starts loading story mode and never finishes. Frames keep presenting. Reported in #13; reproduces headless. What is known so far: - DirectStorage is not the cause: one burst of about 5,200 requests completes, nothing stays pending, and after that there are no reads at all. Under Wine the same load keeps reading. - Three title threads end up waiting on each other: 1. A loader thread spins in Sleep(1) waiting for one streaming request to finish. This is CPU-side state only. 2. The streaming thread waits on its wake event. Only a per-frame update job kicks that event. 3. The main thread blocks on a semaphore for the whole load. The semaphore is never released, so the per-frame update never runs. - Next step: find which host behaviour differs from Windows, so that the kick never arrives or the streaming thread goes idle with a request still open. The event, semaphore and critical-section code looks right so far. Being investigated now.
LakshanSivakumar commented 2026-11-26 11:01:04 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-26T11:01:04Z.


Marked urgent and pinned — this is currently the top blocker preventing progression past setup into story mode. Any help investigating the Windows-vs-macOS synchronization / thread-wakeup divergence here is especially welcome!

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7190148333 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/15#issuecomment-7190148333). Originally posted by [LakshanSivakumar](https://github.com/LakshanSivakumar) on 2026-11-26T11:01:04Z. --- Marked **urgent** and pinned — this is currently the top blocker preventing progression past setup into story mode. Any help investigating the Windows-vs-macOS synchronization / thread-wakeup divergence here is especially welcome!
LakshanSivakumar commented 2026-11-26 11:08:39 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-26T11:08:39Z.


Update: progress on the story-mode load (26 Nov)

1. The original deadlock is fixed on main. The title's audio init asks CoCreateInstance(CLSID_MMDeviceEnumerator) for an endpoint. When that failed, its device-lost retry loop leaked the audio manager's lock, and the device frame counter froze at 1. Main's WASAPI and Spatial Audio host (host_posix/wasapi.rs) answers that request, and runs no longer stall there.

2. Next blocker: the title's own 30 s hang watchdog. About 4 minutes into a windowed Series S run (frame ~2700, SRL fbk_stry000_FBK_STRY000_INTRO_min, "Prestream Metadata"), the process crashed with a write to address 0 at image+0x23cf683. A contributor's run crashed the same way at image+0x2215c35.

  • Both writes are deliberate. The watchdog thread (image+0x2215a60) samples a heartbeat once a second. After 30 unchanged samples it calls its crash callback, then writes to 0 itself.
  • Cause: the title passes slot u32::MAX (its "no such parameter" lookup result) to root-parameter setters for pipelines whose shaders we refuse to translate. NativeList::set then grew its root table toward 4 billion entries while holding the device lock, so every title thread stalled.
  • Fix: slots of 64 or more (more than a root signature can hold) are ignored, with a unit test. Branch fix/prologue-crash, landing shortly.

3. Now: a crash about 7 s later. With the fix, headless Series S runs get past the stall. Then, around frame 815 (SRL in "Prestream"), several title threads fault within milliseconds on garbage pointers such as 0x7f8000007f800000 and 0xffffffffffffffff, and the run ends with an unhandled fault at image+0x8f92a. One possibility we're checking: the title reads data our refused shaders never wrote. Under investigation.

To reproduce headless, press Enter every 2 s through the title screens:

VICTORY_KEYS="$(seq 4 2 80 | sed 's/$/:Enter/' | paste -sd, -)" tools/macos/run-native.sh --headless --seconds 320 --console series-s <game folder>
<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7190329096 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/15#issuecomment-7190329096). Originally posted by [LakshanSivakumar](https://github.com/LakshanSivakumar) on 2026-11-26T11:08:39Z. --- ## Update: progress on the story-mode load (26 Nov) **1. The original deadlock is fixed on main.** The title's audio init asks `CoCreateInstance(CLSID_MMDeviceEnumerator)` for an endpoint. When that failed, its device-lost retry loop leaked the audio manager's lock, and the device frame counter froze at 1. Main's WASAPI and Spatial Audio host (`host_posix/wasapi.rs`) answers that request, and runs no longer stall there. **2. Next blocker: the title's own 30 s hang watchdog.** About 4 minutes into a windowed Series S run (frame ~2700, SRL `fbk_stry000_FBK_STRY000_INTRO_min`, "Prestream Metadata"), the process crashed with a write to address 0 at `image+0x23cf683`. A contributor's run crashed the same way at `image+0x2215c35`. - Both writes are deliberate. The watchdog thread (`image+0x2215a60`) samples a heartbeat once a second. After 30 unchanged samples it calls its crash callback, then writes to 0 itself. - **Cause:** the title passes slot `u32::MAX` (its "no such parameter" lookup result) to root-parameter setters for pipelines whose shaders we refuse to translate. `NativeList::set` then grew its root table toward 4 billion entries while holding the device lock, so every title thread stalled. - **Fix:** slots of 64 or more (more than a root signature can hold) are ignored, with a unit test. Branch `fix/prologue-crash`, landing shortly. **3. Now: a crash about 7 s later.** With the fix, headless Series S runs get past the stall. Then, around frame 815 (SRL in "Prestream"), several title threads fault within milliseconds on garbage pointers such as `0x7f8000007f800000` and `0xffffffffffffffff`, and the run ends with an unhandled fault at `image+0x8f92a`. One possibility we're checking: the title reads data our refused shaders never wrote. Under investigation. To reproduce headless, press Enter every 2 s through the title screens: ``` VICTORY_KEYS="$(seq 4 2 80 | sed 's/$/:Enter/' | paste -sd, -)" tools/macos/run-native.sh --headless --seconds 320 --console series-s <game folder> ```
Olima34 commented 2026-11-26 14:31:26 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by Olima34 on 2026-11-26T14:31:26Z.


Code-level confirmation of the t0 clue (from reading main, no game run):

  • List method 0x4a0, allocate_upload (crates/victory-gpu/src/list.rs), is where its own doc comment says the BVH builder puts its instance descriptions. It returns Upload::new(len).
  • On Windows that block is VirtualAlloc2'd in [4 GiB, 2^40) and shadow::registered, so translated shaders find it by address.
  • On every other platform it is Upload { block: vec![0; len] }: a malloc address such as 0x60000022eb80, above 2^40, registered nowhere.
  • The Metal host only finds memory through PoolTable::resolve (native/host.rs resolve, which fails with "title address … is not in a mapped pool"), and the shaders' page table is built from the same mappings. So neither a root view nor a computed load at that address sees the descriptions: Box32Rehydration would read zeros for its instance data, which fits the overrun.

Suggested fix: on macOS, give each upload block title-visible memory below 2^40 and register it as its own pool and mapping in glue::pools() (pool_created + mapped when allocated, unmapped + pool_released when the list is reset). NativeHost::pool_buffer then wraps it like any other pool. I can send this as a PR with a unit test (an allocate_upload address resolves through the pool table and is released on reset), unless you already have it in progress. Tell me and I'll stay off it.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7194942854 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/15#issuecomment-7194942854). Originally posted by [Olima34](https://github.com/Olima34) on 2026-11-26T14:31:26Z. --- Code-level confirmation of the `t0` clue (from reading `main`, no game run): - List method 0x4a0, `allocate_upload` (`crates/victory-gpu/src/list.rs`), is where its own doc comment says the BVH builder puts its instance descriptions. It returns `Upload::new(len)`. - On Windows that block is `VirtualAlloc2`'d in [4 GiB, 2^40) and `shadow::register`ed, so translated shaders find it by address. - On every other platform it is `Upload { block: vec![0; len] }`: a malloc address such as `0x60000022eb80`, above 2^40, registered nowhere. - The Metal host only finds memory through `PoolTable::resolve` (`native/host.rs` `resolve`, which fails with "title address … is not in a mapped pool"), and the shaders' page table is built from the same mappings. So neither a root view nor a computed load at that address sees the descriptions: `Box32Rehydration` would read zeros for its instance data, which fits the overrun. Suggested fix: on macOS, give each upload block title-visible memory below 2^40 and register it as its own pool and mapping in `glue::pools()` (`pool_created` + `mapped` when allocated, `unmapped` + `pool_released` when the list is reset). `NativeHost::pool_buffer` then wraps it like any other pool. I can send this as a PR with a unit test (an `allocate_upload` address resolves through the pool table and is released on reset), unless you already have it in progress. Tell me and I'll stay off it.
Olima34 commented 2026-11-26 14:42:43 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by Olima34 on 2026-11-26T14:42:43Z.


Sent as #100: each upload block is now reserved below 2^40 and registered as its own pool (id with bit 63 set, apart from xmem_physical's), and retired behind a per-queue fence before it is unmapped. Tests pass on Metal (arm64), x86_64 and the Windows clippy gate. It covers the t0 side only; whether the [49, 1, 1] overrun disappears with real instance data needs a game run on your side. If you already have your own fix, feel free to close it.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7195211249 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/15#issuecomment-7195211249). Originally posted by [Olima34](https://github.com/Olima34) on 2026-11-26T14:42:43Z. --- Sent as #100: each upload block is now reserved below 2^40 and registered as its own pool (id with bit 63 set, apart from xmem_physical's), and retired behind a per-queue fence before it is unmapped. Tests pass on Metal (arm64), x86_64 and the Windows clippy gate. It covers the `t0` side only; whether the `[49, 1, 1]` overrun disappears with real instance data needs a game run on your side. If you already have your own fix, feel free to close it.
Olima34 commented 2026-11-26 15:48:34 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by Olima34 on 2026-11-26T15:48:34Z.


Two more ways a GPU write can land at the wrong title address, from reading main. Both are silent, which fits a crash site that moves between runs.

1. Root views assume a resource lies in one mapping. addr::root_view looks up the mapping that holds the root view's address and returns the pair view of that pool's chunk, plus the offset in it. The shader then reaches offset + i linearly in the pool. It doesn't look each access up in the page table, as computed addresses do. That's right while the resource lies inside that one mapping. If it runs past the mapping's end, and the next title page is mapped from another pool or another pool offset (for example a GPU alias built page by page), the accesses beyond the end hit the next bytes of this pool. Those bytes belong to some other title address.

It's quick to check against your trace: does the mapping that holds u1 = 0x831be0100 end at 0x831c00000 (the end of the BVH destination you measured), and is 0x831c00000 mapped from a different pool or offset? If yes, the 392 KiB of writes may not have gone where the title addresses say. Root views have no size in D3D12, so the host can't clamp them. The real fix would be for root view accesses to go through the page table, a translator change I'd rather discuss with you than send unasked.

2. A reused descriptor keeps its old buffer. NativeHost::mirror returns before write_buffer when a buffer view's address resolves to no pool ("stale or unsupported views leave the entry as it was"). If the title reuses a descriptor slot for such a buffer, the Metal entry still names the previous buffer, and shaders read and write that memory. I'm preparing a PR that writes the null view (size 0, the same one write_pairs uses) in that case, buffer views only, with a Metal test.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7196780481 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/15#issuecomment-7196780481). Originally posted by [Olima34](https://github.com/Olima34) on 2026-11-26T15:48:34Z. --- Two more ways a GPU write can land at the wrong title address, from reading `main`. Both are silent, which fits a crash site that moves between runs. **1. Root views assume a resource lies in one mapping.** `addr::root_view` looks up the mapping that holds the root view's address and returns the pair view of that pool's chunk, plus the offset in it. The shader then reaches `offset + i` linearly in the pool. It doesn't look each access up in the page table, as computed addresses do. That's right while the resource lies inside that one mapping. If it runs past the mapping's end, and the next title page is mapped from another pool or another pool offset (for example a GPU alias built page by page), the accesses beyond the end hit the next bytes of *this* pool. Those bytes belong to some other title address. It's quick to check against your trace: does the mapping that holds `u1 = 0x831be0100` end at `0x831c00000` (the end of the BVH destination you measured), and is `0x831c00000` mapped from a different pool or offset? If yes, the 392 KiB of writes may not have gone where the title addresses say. Root views have no size in D3D12, so the host can't clamp them. The real fix would be for root view accesses to go through the page table, a translator change I'd rather discuss with you than send unasked. **2. A reused descriptor keeps its old buffer.** `NativeHost::mirror` returns before `write_buffer` when a buffer view's address resolves to no pool ("stale or unsupported views leave the entry as it was"). If the title reuses a descriptor slot for such a buffer, the Metal entry still names the previous buffer, and shaders read and write that memory. I'm preparing a PR that writes the null view (size 0, the same one `write_pairs` uses) in that case, buffer views only, with a Metal test.
LakshanSivakumar commented 2026-11-26 15:56:47 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-26T15:56:47Z.


Status: the story load still crashes ~100 s into the prologue intro (image+0x55e56f8), preceded by a hang on a job semaphore. GPU compute writes are ruled out. Current lead: physical pages owned twice in xmem_posix. #102 (drop one unmapped command, not the whole piece) is approved; #105 (null view for a buffer view outside every pool) is waiting for CI. #100 (t0 upload memory) is on hold until the double-ownership is understood. Needed: finding which allocations in xmem_posix share pages.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7196965943 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/15#issuecomment-7196965943). Originally posted by [LakshanSivakumar](https://github.com/LakshanSivakumar) on 2026-11-26T15:56:47Z. --- Status: the story load still crashes ~100 s into the prologue intro (image+0x55e56f8), preceded by a hang on a job semaphore. GPU compute writes are ruled out. Current lead: physical pages owned twice in xmem_posix. #102 (drop one unmapped command, not the whole piece) is approved; #105 (null view for a buffer view outside every pool) is waiting for CI. #100 (t0 upload memory) is on hold until the double-ownership is understood. Needed: finding which allocations in xmem_posix share pages.
Olima34 commented 2026-11-26 16:25:59 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by Olima34 on 2026-11-26T16:25:59Z.


On "physical pages owned twice in xmem_posix", from reading main:

  1. Sure, sent as #108. VirtualFree(MEM_RELEASE) of XMemVirtualAlloc memory never gave the pool views back. Only XMemFreeDefault's release_reservation did. The freed pool stayed in the pool table and in Physical.views at an address reserve_in (first fit) soon hands to the next allocation, so one title address had two memories.
  2. Sure in code; whether it applies depends on volume. Physical page numbers are never reused. next_page only grows, and XMemFreePhysicalPages returns no numbers, while the title keeps number >> 4 in 21 bits (xmem_physical.rs notes). Past about 124 GiB allocated in total since start-up (cumulative, not live), truncated numbers fall below 0x10_0000 ("XMemMapPhysicalPages: unknown page"). Further on, they land on the first, still-live allocations, and the title maps or frees other allocations' pages. A quick check in your log: the sum of XMemAllocatePhysicalPages counts up to the crash, or any "unknown page".
  3. Sure in code; does GTA decommit? VirtualFree(MEM_DECOMMIT) on pool-backed memory replaces the view with anonymous memory (mem::decommit overwrites), but views, shown and the pool table still say pool. After a recommit, the CPU writes the anonymous pages while the GPU and the aliases read the pool.

I can send fixes for 2 (a free list of page numbers) and 3 (zero through the view and protect, instead of decommitting), and a VICTORY_TRACE_OWNERS diagnostic. The diagnostic would log both owners whenever a view overlaps another, a freed range still holds views, or page numbers pass 21 bits. Tell me which helps most.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7197637969 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/15#issuecomment-7197637969). Originally posted by [Olima34](https://github.com/Olima34) on 2026-11-26T16:25:59Z. --- On "physical pages owned twice in xmem_posix", from reading `main`: 1. **Sure, sent as #108.** `VirtualFree(MEM_RELEASE)` of `XMemVirtualAlloc` memory never gave the pool views back. Only `XMemFreeDefault`'s `release_reservation` did. The freed pool stayed in the pool table and in `Physical.views` at an address `reserve_in` (first fit) soon hands to the next allocation, so one title address had two memories. 2. **Sure in code; whether it applies depends on volume.** Physical page numbers are never reused. `next_page` only grows, and `XMemFreePhysicalPages` returns no numbers, while the title keeps `number >> 4` in 21 bits (`xmem_physical.rs` notes). Past about 124 GiB allocated in total since start-up (cumulative, not live), truncated numbers fall below `0x10_0000` ("XMemMapPhysicalPages: unknown page"). Further on, they land on the first, still-live allocations, and the title maps or frees other allocations' pages. A quick check in your log: the sum of `XMemAllocatePhysicalPages` counts up to the crash, or any "unknown page". 3. **Sure in code; does GTA decommit?** `VirtualFree(MEM_DECOMMIT)` on pool-backed memory replaces the view with anonymous memory (`mem::decommit` overwrites), but `views`, `shown` and the pool table still say pool. After a recommit, the CPU writes the anonymous pages while the GPU and the aliases read the pool. I can send fixes for 2 (a free list of page numbers) and 3 (zero through the view and protect, instead of decommitting), and a `VICTORY_TRACE_OWNERS` diagnostic. The diagnostic would log both owners whenever a view overlaps another, a freed range still holds views, or page numbers pass 21 bits. Tell me which helps most.
LakshanSivakumar commented 2026-11-26 17:13:41 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-26T17:13:41Z.


Status: #108 is merged, and the garbage pointers it explained are gone in our runs. A pool audit now shows 0 differing pages over 96k mappings. Thanks @Olima34.

What stops the prologue now:

  1. A barrier that is never signalled after a failed command buffer (#80). Fixed in c3de092e, landing soon.
  2. The first world frame stalls about 26 s on first-time pipeline builds, until the title watchdog fires (~141 s). We're testing whether the disk cache on main removes it.
  3. A null+0x10 read at image+0x5592694, seen once we kept the watchdog from firing (frame 3365, ~200 s).

On your points 2 and 3: the free list of page numbers and zeroing instead of decommitting are both welcome as PRs. Small and tested, like #108. #111 (VICTORY_TRACE_OWNERS) is in review.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7198681586 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/15#issuecomment-7198681586). Originally posted by [LakshanSivakumar](https://github.com/LakshanSivakumar) on 2026-11-26T17:13:41Z. --- Status: #108 is merged, and the garbage pointers it explained are gone in our runs. A pool audit now shows 0 differing pages over 96k mappings. Thanks @Olima34. What stops the prologue now: 1. **A barrier that is never signalled** after a failed command buffer (#80). Fixed in c3de092e, landing soon. 2. **The first world frame stalls about 26 s** on first-time pipeline builds, until the title watchdog fires (~141 s). We're testing whether the disk cache on main removes it. 3. **A null+0x10 read at image+0x5592694**, seen once we kept the watchdog from firing (frame 3365, ~200 s). On your points 2 and 3: the free list of page numbers and zeroing instead of decommitting are both welcome as PRs. Small and tested, like #108. #111 (`VICTORY_TRACE_OWNERS`) is in review.
LakshanSivakumar commented 2026-11-26 18:10:24 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-26T18:10:24Z.


Update: #124 (page numbers given back) and #126 (decommit keeps views, zeroes lone pool pages) are merged. Thanks @Olima34.

On the list above:

  1. The #80 fix is on main.
  2. Shaders are now translated ahead on 6 worker threads (146f7e9d, fix/prologue-crash), so the first world frame no longer trips the watchdog.
  3. The crash we're chasing reads arrays of empty half-float AABBs as pointers. It correlates with a Metal "bytes_per_row >= used_bytes_per_row" assertion that follows a refused cross-lane compute shader. A row-pitch guard is being tested, but it's not confirmed as the fix.

Also being looked at: since merging today's main, the world frame arrives later in some runs, and fps in the world falls over time.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7200138001 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/15#issuecomment-7200138001). Originally posted by [LakshanSivakumar](https://github.com/LakshanSivakumar) on 2026-11-26T18:10:24Z. --- Update: #124 (page numbers given back) and #126 (decommit keeps views, zeroes lone pool pages) are merged. Thanks @Olima34. On the list above: 1. The #80 fix is on main. 2. Shaders are now translated ahead on 6 worker threads (146f7e9d, `fix/prologue-crash`), so the first world frame no longer trips the watchdog. 3. The crash we're chasing reads arrays of empty half-float AABBs as pointers. It correlates with a Metal "bytes_per_row >= used_bytes_per_row" assertion that follows a refused cross-lane compute shader. A row-pitch guard is being tested, but it's not confirmed as the fix. Also being looked at: since merging today's main, the world frame arrives later in some runs, and fps in the world falls over time.
LakshanSivakumar commented 2026-11-26 18:46:39 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-26T18:46:39Z.


Call for testers: main is now 49e7c648. It gets past the first-world-frame watchdog stall:

  • shaders are translated ahead on worker threads;
  • Metal heap residency is named once per encoder instead of at every draw.

The next crash comes one frame after the world frame starts. The data it reads as a pointer is empty ray-tracing (BVH) nodes written over a resource the game loaded from disk, and we're tracing which GPU dispatch writes them. Runs on current main from as many Macs as possible would help, especially logs that reach the world frame.

Steps: git pull && tools/macos/native-setup.sh, then tools/macos/run-native.sh <game folder>. Please attach runs/<date>/victory.log, include the commit (git rev-parse --short HEAD), and add a line on what you saw on screen.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7200839536 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/15#issuecomment-7200839536). Originally posted by [LakshanSivakumar](https://github.com/LakshanSivakumar) on 2026-11-26T18:46:39Z. --- **Call for testers:** main is now 49e7c648. It gets past the first-world-frame watchdog stall: - shaders are translated ahead on worker threads; - Metal heap residency is named once per encoder instead of at every draw. The next crash comes one frame after the world frame starts. The data it reads as a pointer is empty ray-tracing (BVH) nodes written over a resource the game loaded from disk, and we're tracing which GPU dispatch writes them. Runs on current main from as many Macs as possible would help, especially logs that reach the world frame. Steps: `git pull && tools/macos/native-setup.sh`, then `tools/macos/run-native.sh <game folder>`. Please attach `runs/<date>/victory.log`, include the commit (`git rev-parse --short HEAD`), and add a line on what you saw on screen.
FastFatMetal commented 2026-11-26 20:54:32 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by FastFatMetal on 2026-11-26T20:54:32Z.


Runs on current main from as many Macs as possible would help, especially logs that reach the world frame.

Posted a full report in #147. Quick summary from an Apple M5 Ultra, 256 GB, macOS 27.2.1, commit 57b7ebd: no watchdog line at all — the first world frame binds 1 802 pipelines and the game presents to frame 2 384, then the next-frame crash 0xc0000005 at image+0x55e56f8. 639 world shaders refused this run (a menus-only run refused 0). Peak memory ~14 GB on a 256 GB box, so the crash is not memory pressure. Full scrubbed log (gzip + sha256) linked in the issue.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7203193890 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/15#issuecomment-7203193890). Originally posted by [FastFatMetal](https://github.com/FastFatMetal) on 2026-11-26T20:54:32Z. --- > Runs on current main from as many Macs as possible would help, especially logs that reach the world frame. Posted a full report in #147. Quick summary from an Apple M5 Ultra, 256 GB, macOS 27.2.1, commit 57b7ebd: **no watchdog line at all** — the first world frame binds 1 802 pipelines and the game presents to frame 2 384, then the next-frame crash `0xc0000005 at image+0x55e56f8`. 639 world shaders refused this run (a menus-only run refused 0). Peak memory ~14 GB on a 256 GB box, so the crash is not memory pressure. Full scrubbed log (gzip + sha256) linked in the issue.
LightningBoltsNFTs commented 2026-11-26 21:23:14 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LightningBoltsNFTs on 2026-11-26T21:23:14Z.


victory-series-s-d41052c.log
victory-series-x-d41052c.log

Tester run on current main: commit d41052c (includes 49e7c64 and 0ae6cfc, DispatchX thread counts). Apple M5, 24 GB, macOS 27.2.1, windowed, tools/macos/run-native.sh, setup already saved (goes straight to the story load).

Series S (--console series-s, 300 s): reaches the world frame, no crash.

  • Story load at a steady 28–30 fps up to frame ~1800, then 20 fps, then 10.
  • First world frame at frame 2377 (~117 s): 1,820 first binds in that frame, 246 in the next. No watchdog line, and no fault at image+0x55e56f8 / image+0x5592694. On the previous main (0b76c0b) the same Mac crashed at image+0x55e56f8, frame ~2362, +125.8 s.
  • After that the game keeps going but very slowly: about one frame every 5–10 s (2377 → 2391 in 180 s) until the timer stops it. It is not a deadlock: every 5 s work held for a wait that does not hold lists fences 2–13 values behind, and the queue waits' now value goes up by one each time (Some(2380) … Some(2391)). One queue has 100–300 entries held, with its head held for up to 21.8 s.
  • 0 GPU errors. 845 refusal lines; the largest groups are "descriptor changed after loading: masked or merged" (247), "cross-lane operation outside compute" (127), "descriptor outside the heaps" (106), "lane mask read as data" (80), "hardware SGPR input" (50).
  • One Metal upload skipped at the switch into the world (this looks like the bytes_per_row assertion from the roadmap, now just a skip): upload_texture skipped: D32FloatS8 … region 1024x1024x1 row_pitch 4096 … needs row 8192. The title's row pitch is 4 bytes a texel (depth plane only?), and Metal's D32FloatS8 wants 8.
  • Also seen once: a command names title memory outside every mapped pool … 0x7f8f20090000+0x8 (a host-side address?), and 1,579 a descriptor was not mirrored.
  • On screen: the loading screen, then the window is almost frozen (one new frame every few seconds) from about two minutes in.

Series X (default on 24 GB, 240 s): no crash, but runs out of GPU memory at the world load.

  • 20 kIOGPUCommandBufferCallbackErrorOutOfMemory + 5 Other command-buffer errors from frame ~2368 (+154 s); reached frame 2462, 1.9 fps at the end. Same as #8/#79/#110: on 24 GB, Series X does not fit at the world load.

Logs follow in a reply (only my home folder path replaced with ~):

  • victory-series-s-d41052c.log
  • victory-series-x-d41052c.log
<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7203676032 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/15#issuecomment-7203676032). Originally posted by [LightningBoltsNFTs](https://github.com/LightningBoltsNFTs) on 2026-11-26T21:23:14Z. --- [victory-series-s-d41052c.log](https://github.com/user-attachments/files/35484485/victory-series-s-d41052c.log) [victory-series-x-d41052c.log](https://github.com/user-attachments/files/35484486/victory-series-x-d41052c.log) Tester run on current main: **commit `d41052c`** (includes 49e7c64 and 0ae6cfc, `DispatchX` thread counts). Apple M5, 24 GB, macOS 27.2.1, windowed, `tools/macos/run-native.sh`, setup already saved (goes straight to the story load). **Series S (`--console series-s`, 300 s): reaches the world frame, no crash.** - Story load at a steady 28–30 fps up to frame ~1800, then 20 fps, then 10. - First world frame at frame 2377 (~117 s): 1,820 first binds in that frame, 246 in the next. No watchdog line, and no fault at `image+0x55e56f8` / `image+0x5592694`. On the previous main (`0b76c0b`) the same Mac crashed at `image+0x55e56f8`, frame ~2362, +125.8 s. - After that the game keeps going but very slowly: about one frame every 5–10 s (2377 → 2391 in 180 s) until the timer stops it. It is not a deadlock: every 5 s `work held for a wait that does not hold` lists fences 2–13 values behind, and the queue waits' `now` value goes up by one each time (Some(2380) … Some(2391)). One queue has 100–300 entries held, with its head held for up to 21.8 s. - 0 GPU errors. 845 refusal lines; the largest groups are "descriptor changed after loading: masked or merged" (247), "cross-lane operation outside compute" (127), "descriptor outside the heaps" (106), "lane mask read as data" (80), "hardware SGPR input" (50). - One Metal upload skipped at the switch into the world (this looks like the `bytes_per_row` assertion from the roadmap, now just a skip): `upload_texture skipped: D32FloatS8 … region 1024x1024x1 row_pitch 4096 … needs row 8192`. The title's row pitch is 4 bytes a texel (depth plane only?), and Metal's D32FloatS8 wants 8. - Also seen once: `a command names title memory outside every mapped pool … 0x7f8f20090000+0x8` (a host-side address?), and 1,579 `a descriptor was not mirrored`. - On screen: the loading screen, then the window is almost frozen (one new frame every few seconds) from about two minutes in. **Series X (default on 24 GB, 240 s): no crash, but runs out of GPU memory at the world load.** - 20 `kIOGPUCommandBufferCallbackErrorOutOfMemory` + 5 `Other` command-buffer errors from frame ~2368 (+154 s); reached frame 2462, 1.9 fps at the end. Same as #8/#79/#110: on 24 GB, Series X does not fit at the world load. Logs follow in a reply (only my home folder path replaced with `~`): - `victory-series-s-d41052c.log` - `victory-series-x-d41052c.log`
Olima34 commented 2026-11-26 21:48:07 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by Olima34 on 2026-11-26T21:48:07Z.


Tester run, as asked above: Apple M5 Pro, 48 GB, macOS 27.0, commit d41052c, --console series-s, windowed, setup already saved.

  • The story load runs at 25–30 fps, then drops to 8 fps around frame 4096.
  • The first world frame is frame 4140 (+155 s), with 1,101 first binds in that frame.
  • It crashes at +194 s in the same frame: a first-chance 0xc0000005 at image+0x23cf683, then the unhandled one at image+0x55e56f8. That is the same pair as the other reports.
  • 0 GPU errors. 164 "descriptor was not mirrored … not in a mapped pool".
  • DirectStorage peaks at 151 MB/s just before the world frame.
  • 366 refusal lines. The largest groups:
count reason
86 a descriptor changed after loading: dword N masked or merged (s_and, s_or, s_bfi…)
64 a lane mask read as data
59 a descriptor outside the heaps
42 a lane-mask join of an untracked mask: data, on the host's lanes
37 a hardware SGPR input
22 a cross-lane operation between host waves in divergent code
8 LDS shared in a wave the host splits, in divergent code
6 a descriptor neither loaded nor built
6 whole-wave section: a value that is no reduction or prefix

The masked-or-merged dword in "descriptor changed after loading" (86) is the new split from #131, so that form is now known and I'll take it next, unless you already are. I can reproduce this crash in about 3 minutes here. If there is a trace you want run while you look for the dispatch that writes the empty BVH nodes, name the variables and I'll post the output.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7204072648 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/15#issuecomment-7204072648). Originally posted by [Olima34](https://github.com/Olima34) on 2026-11-26T21:48:07Z. --- Tester run, as asked above: Apple **M5 Pro, 48 GB**, macOS 27.0, commit `d41052c`, `--console series-s`, windowed, setup already saved. - The story load runs at 25–30 fps, then drops to 8 fps around frame 4096. - The **first world frame is frame 4140 (+155 s)**, with **1,101 first binds** in that frame. - It **crashes at +194 s in the same frame**: a first-chance `0xc0000005` at `image+0x23cf683`, then the unhandled one at `image+0x55e56f8`. That is the same pair as the other reports. - 0 GPU errors. 164 "descriptor was not mirrored … not in a mapped pool". - DirectStorage peaks at 151 MB/s just before the world frame. - 366 refusal lines. The largest groups: | count | reason | |---|---| | 86 | a descriptor changed after loading: **dword N masked or merged** (s_and, s_or, s_bfi…) | | 64 | a lane mask read as data | | 59 | a descriptor outside the heaps | | 42 | a lane-mask join of an untracked mask: **data, on the host's lanes** | | 37 | a hardware SGPR input | | 22 | a cross-lane operation between host waves in divergent code | | 8 | LDS shared in a wave the host splits, in divergent code | | 6 | a descriptor neither loaded nor built | | 6 | whole-wave section: a value that is no reduction or prefix | The masked-or-merged dword in "descriptor changed after loading" (86) is the new split from #131, so that form is now known and I'll take it next, unless you already are. I can reproduce this crash in about 3 minutes here. If there is a trace you want run while you look for the dispatch that writes the empty BVH nodes, name the variables and I'll post the output.
Olima34 commented 2026-11-26 22:24:33 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by Olima34 on 2026-11-26T22:24:33Z.


On this Mac (M5 Pro, 48 GB, Series S, windowed, current main), the crash at the first world frame is the title's own hang watchdog, not a pointer read from overwritten memory.

  • The first-chance at image+0x23cf683 is a deliberate mov dword [0], 0x4d8bd421 at the end of a hook (image+0x23cf620) installed in [image+0x71b6348].
  • Only the title's watchdog thread calls that hook (loop at image+0x2215a..):
    • it sleeps 1000 ms per round;
    • it fires once the heartbeat qword [image+0x71b6338] hasn't moved for 30 rounds, or an entry of its 64-entry table goes stale.
  • The unhandled image+0x55e56f8 comes after that, inside the crash reporter (Breakpad/WER): cmp [r10], rax with r10 = [rcx+0x38] = 0, a stream object with no buffer. It is secondary.

Evidence, two runs of the same build:

  • Cold shader cache (a new translator hash): frame 2682 starts, 1,398 native shader translations run in it (all misses, about 108 s of CPU) with 751 first binds, and no frame follows for 31 s. Then the crash.
  • Warm cache: no crash in 240 s. The first world frame (2289, 1,720 first binds) passes. Then the world crawls at one frame every 2–10 s (2292 → 2346 in about 130 s). That matches @LightningBoltsNFTs's report above.

So the +140–195 s crashes we and others see at the world frame are probably a first frame stalled past 30 s by translation work, and the reporter tripping afterwards. The "BVH nodes read as a pointer" reading of image+0x55e56f8 may be the reporter's state, not the title's. Worth checking against your runs before chasing the dispatch.

Next on our side: why the world runs at 0.1–0.5 fps once the cache is warm, starting from the held-work and fence waits LightningBolts logged. I'll post what we find.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7204650842 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/15#issuecomment-7204650842). Originally posted by [Olima34](https://github.com/Olima34) on 2026-11-26T22:24:33Z. --- On this Mac (M5 Pro, 48 GB, Series S, windowed, current main), the crash at the first world frame is **the title's own hang watchdog**, not a pointer read from overwritten memory. - The first-chance at `image+0x23cf683` is a deliberate `mov dword [0], 0x4d8bd421` at the end of a hook (`image+0x23cf620`) installed in `[image+0x71b6348]`. - Only the title's watchdog thread calls that hook (loop at `image+0x2215a..`): - it sleeps 1000 ms per round; - it fires once the heartbeat qword `[image+0x71b6338]` hasn't moved for **30 rounds**, or an entry of its 64-entry table goes stale. - The unhandled `image+0x55e56f8` comes after that, inside the crash reporter (Breakpad/WER): `cmp [r10], rax` with `r10 = [rcx+0x38] = 0`, a stream object with no buffer. It is secondary. **Evidence, two runs of the same build:** - **Cold shader cache** (a new translator hash): frame 2682 starts, 1,398 native shader translations run in it (all misses, about 108 s of CPU) with 751 first binds, and no frame follows for **31 s**. Then the crash. - **Warm cache: no crash in 240 s.** The first world frame (2289, 1,720 first binds) passes. Then the world **crawls** at one frame every 2–10 s (2292 → 2346 in about 130 s). That matches @LightningBoltsNFTs's report above. So the +140–195 s crashes we and others see at the world frame are probably a first frame stalled past 30 s by translation work, and the reporter tripping afterwards. The "BVH nodes read as a pointer" reading of `image+0x55e56f8` may be the reporter's state, not the title's. Worth checking against your runs before chasing the dispatch. Next on our side: why the world runs at 0.1–0.5 fps once the cache is warm, starting from the held-work and fence waits LightningBolts logged. I'll post what we find.
alicans commented 2026-11-26 22:29:04 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by alicans on 2026-11-26T22:29:04Z.


Tester run on macOS 15.8.2 (24H219), Apple M4 Pro, 24 GB, --console series-s, windowed, commits 561e783 and 0133b82. Metal Shader Converter 4.0.3 (Apple's package, /usr/local/lib).

On macOS 15 the first world frame is held by Metal's own compiler crashing.

  • At the first world frame (render frame ~1933-1956, 115-136 first binds) a few graphics pipelines fail with title shader refused ... reason=conversion: Compiler encountered an internal error, about 30 s each, one after another (4 per run, ~2 minutes), and the frame does not finish within 300 s.
  • Each one matches a crash report of MTLCompilerService in ~/Library/Logs/DiagnosticReports/: EXC_BAD_ACCESS (SIGSEGV), KERN_INVALID_ADDRESS at 0x0, in libLLVM.dylib under llvm::RegAllocBase::allocatePhysRegs() → MachineFunctionPass::runOnFunction → FPPassManager::runOnFunction → legacy::PassManagerImpl::run. So it is the OS's Metal backend compiler (register allocation), not the converter: the same pipelines fail with D3DMetal's copy of the converter and with Apple's 4.0.3.
  • Pipelines seen failing (vertex / pixel hashes):
    • 6eedbc0771df10ab / 615820c53854c962 (both runs)
    • 76d4606196dfd196 / 5a1c651829a060de (both runs)
    • 08ebaafa2f409986 / 59c5abdcb23974a7
    • 26e9f04a4c9c8146 / 725962e1f1be4855
    • 9cb2687cedff2979 / 5d85e2176433f3af
    • a1785729710c22b3 / 80b896aafd2ec5f4
  • The testers above are on macOS 27, which would explain why they do not see it.
  • On screen: the loading screen ends, a black screen, 1-2 s of sound, then silence on the black screen.

To get this far on 24 GB I ran two local experiments, both off by default and only for these runs:

  • Sampled textures without their two most detailed levels: memory stayed at about 80 % free, with no swings at the world load. Without this, the macOS memory level drops to 9-14 % at ~110 s.
  • The title watchdog disarmed (the byte-checked patch at image+0x2215c27 / image+0x23cf683 from other forks). Without it the title ends itself at image+0x23cf683 after ~30 s on the stalled frame.

Also seen intermittently before the world (3 of 6 runs with the texture experiment, once on an older main without it): a first-chance 0xc0000005 at image+0x4dac5bf, then image+0x55e56f8, around render frame 1800 / game frame ~750.

A possible way round on macOS 15 would be a native-host switch to skip given pipelines (like VICTORY_SKIP_PIPELINES on Windows), or a retry with different compile options for a pipeline whose compile fails. I can run a build with either and report.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7204718785 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/15#issuecomment-7204718785). Originally posted by [alicans](https://github.com/alicans) on 2026-11-26T22:29:04Z. --- Tester run on **macOS 15.8.2 (24H219)**, Apple M4 Pro, 24 GB, `--console series-s`, windowed, commits `561e783` and `0133b82`. Metal Shader Converter 4.0.3 (Apple's package, `/usr/local/lib`). **On macOS 15 the first world frame is held by Metal's own compiler crashing.** - At the first world frame (render frame ~1933-1956, 115-136 first binds) a few graphics pipelines fail with `title shader refused ... reason=conversion: Compiler encountered an internal error`, about **30 s each, one after another** (4 per run, ~2 minutes), and the frame does not finish within 300 s. - Each one matches a crash report of `MTLCompilerService` in `~/Library/Logs/DiagnosticReports/`: `EXC_BAD_ACCESS (SIGSEGV)`, `KERN_INVALID_ADDRESS at 0x0`, in `libLLVM.dylib` under `llvm::RegAllocBase::allocatePhysRegs()` → `MachineFunctionPass::runOnFunction` → `FPPassManager::runOnFunction` → `legacy::PassManagerImpl::run`. So it is the OS's Metal backend compiler (register allocation), not the converter: the same pipelines fail with D3DMetal's copy of the converter and with Apple's 4.0.3. - Pipelines seen failing (vertex / pixel hashes): - `6eedbc0771df10ab` / `615820c53854c962` (both runs) - `76d4606196dfd196` / `5a1c651829a060de` (both runs) - `08ebaafa2f409986` / `59c5abdcb23974a7` - `26e9f04a4c9c8146` / `725962e1f1be4855` - `9cb2687cedff2979` / `5d85e2176433f3af` - `a1785729710c22b3` / `80b896aafd2ec5f4` - The testers above are on macOS 27, which would explain why they do not see it. - On screen: the loading screen ends, a black screen, 1-2 s of sound, then silence on the black screen. To get this far on 24 GB I ran two local experiments, both off by default and only for these runs: - Sampled textures without their two most detailed levels: memory stayed at about 80 % free, with no swings at the world load. Without this, the macOS memory level drops to 9-14 % at ~110 s. - The title watchdog disarmed (the byte-checked patch at `image+0x2215c27` / `image+0x23cf683` from other forks). Without it the title ends itself at `image+0x23cf683` after ~30 s on the stalled frame. Also seen intermittently before the world (3 of 6 runs with the texture experiment, once on an older main without it): a first-chance `0xc0000005` at `image+0x4dac5bf`, then `image+0x55e56f8`, around render frame 1800 / game frame ~750. A possible way round on macOS 15 would be a native-host switch to skip given pipelines (like `VICTORY_SKIP_PIPELINES` on Windows), or a retry with different compile options for a pipeline whose compile fails. I can run a build with either and report.
evan-kolberg commented 2026-11-26 22:29:38 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by evan-kolberg on 2026-11-26T22:29:38Z.


Thanks to LightningBoltsNFTs for capturing the skipped upload at d41052c, including the 4,096-byte source row and 8,192-byte guard. What was the texture’s declared DXGI format before pc_format mapping, and which subresource or plane was being uploaded? The same pitch can describe Float32 depth (DXGI 19/20) or packed D24 (DXGI 45).

On an M4 Pro with Metal API Validation, a generated 8×4 Depth32Float_Stencil8 texture matched all 32 expected Float32 depth values and preserved all 32 stencil values using Metal’s depth-only blit selector. Both packed and padded input rows passed. Native queue ordering and the effect on prologue prestream remain unverified. Codex assisted with the source review and fixture verification.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7204727325 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/15#issuecomment-7204727325). Originally posted by [evan-kolberg](https://github.com/evan-kolberg) on 2026-11-26T22:29:38Z. --- Thanks to [LightningBoltsNFTs for capturing the skipped upload at `d41052c`](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/15#issuecomment-7203676032), including the 4,096-byte source row and 8,192-byte guard. What was the texture’s declared DXGI format before `pc_format` mapping, and which subresource or plane was being uploaded? The same pitch can describe Float32 depth (DXGI 19/20) or packed D24 (DXGI 45). On an M4 Pro with Metal API Validation, a generated 8×4 `Depth32Float_Stencil8` texture matched all 32 expected Float32 depth values and preserved all 32 stencil values using [Metal’s depth-only blit selector](https://developer.apple.com/documentation/metal/mtlblitoption/depthfromdepthstencil). Both packed and padded input rows passed. Native queue ordering and the effect on prologue prestream remain unverified. Codex assisted with the source review and fixture verification.
LakshanSivakumar commented 2026-11-26 22:52:52 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-26T22:52:52Z.


Thanks @Olima34, that matches our runs: +0x23cf683 is the title's watchdog and +0x55e56f8 is the crash reporter faulting afterwards, so that address alone doesn't name a cause. Two causes reached it: the BVH builders writing past their range (fixed in 0ae6cfcd, DispatchX thread counts), and a first world frame stalled past 30 s by shader translation on a cold cache.

Current main (49b5521b) also has mesh pipelines, the G-buffer, compute shaders that index the descriptor heap, and heap residency sets. Residency sets are on by default on 32 GB and up; on 16–24 GB please try VICTORY_METAL_RESIDENCY_SETS=heap and tell us if it holds. Together these took the world from 0.07 to about 0.5 fps here. The world crawl is what we're on now: most of a world frame goes to texture syncing on the submit thread.

@alicans, thank you, the macOS 15 MTLCompilerService crash is new to us. We'll make a pipeline whose Metal compile fails stop holding the frame. @evan-kolberg, we'll check the format and plane of that D32FloatS8 upload.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7205064411 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/15#issuecomment-7205064411). Originally posted by [LakshanSivakumar](https://github.com/LakshanSivakumar) on 2026-11-26T22:52:52Z. --- Thanks @Olima34, that matches our runs: `+0x23cf683` is the title's watchdog and `+0x55e56f8` is the crash reporter faulting afterwards, so that address alone doesn't name a cause. Two causes reached it: the BVH builders writing past their range (fixed in 0ae6cfcd, DispatchX thread counts), and a first world frame stalled past 30 s by shader translation on a cold cache. Current main (49b5521b) also has mesh pipelines, the G-buffer, compute shaders that index the descriptor heap, and heap residency sets. Residency sets are on by default on 32 GB and up; on 16–24 GB please try `VICTORY_METAL_RESIDENCY_SETS=heap` and tell us if it holds. Together these took the world from 0.07 to about 0.5 fps here. The world crawl is what we're on now: most of a world frame goes to texture syncing on the submit thread. @alicans, thank you, the macOS 15 `MTLCompilerService` crash is new to us. We'll make a pipeline whose Metal compile fails stop holding the frame. @evan-kolberg, we'll check the format and plane of that D32FloatS8 upload.
Olima34 commented 2026-11-26 22:54:52 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by Olima34 on 2026-11-26T22:54:52Z.


Thanks @LakshanSivakumar, and good to know about the BVH range fix (0ae6cfcd).

We landed on the same thing for the crawl. With a warm cache, a stack sample on this Mac (M5 Pro, Series S, windowed) puts most of a world frame in sync_keys: each new or changed texture is read from title memory, hashed, detiled and uploaded, all under the title lock on the submit thread, and world streaming makes that hundreds of MB per submission.

We're testing a local change on exactly that path right now: the title-memory reads (native/memory.rs), detiling (victory-formats), and the sync loop. I'll post the before/after fps from the next runs here within the hour, not a PR yet. To avoid two people rewriting the same code: which part are you changing? If you already have a branch, I'll measure it here instead, or keep our change to whatever you're not touching.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7205093424 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/15#issuecomment-7205093424). Originally posted by [Olima34](https://github.com/Olima34) on 2026-11-26T22:54:52Z. --- Thanks @LakshanSivakumar, and good to know about the BVH range fix (0ae6cfcd). We landed on the same thing for the crawl. With a warm cache, a stack sample on this Mac (M5 Pro, Series S, windowed) puts most of a world frame in `sync_keys`: each new or changed texture is read from title memory, hashed, detiled and uploaded, all under the title lock on the submit thread, and world streaming makes that hundreds of MB per submission. We're testing a local change on exactly that path right now: the title-memory reads (`native/memory.rs`), detiling (`victory-formats`), and the sync loop. I'll post the before/after fps from the next runs here within the hour, not a PR yet. To avoid two people rewriting the same code: which part are you changing? If you already have a branch, I'll measure it here instead, or keep our change to whatever you're not touching.
LightningBoltsNFTs commented 2026-11-26 22:56:35 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LightningBoltsNFTs on 2026-11-26T22:56:35Z.


victory-series-s-5b7563e.log

@evan-kolberg: I added a local, temporary trace in native::textures::upload (not committed) and reran d41052c (Series S, same Mac, 300 s). Every skipped upload follows one of these lines. All of them are plane 0 (the depth plane), mip 0, one layer, one mip, called from sync_dirty → upload, i.e. a CPU-dirtied title texture being uploaded again:

console DXGI (before pc_format) host sizes plane 0 bytes/texel flags
19 (D32_FLOAT_S8X24_UINT) 19 → D32FloatS8 3840x2160, 2048x2048, 1280x720, 1280x736, 1024x1024, 994x624, 640x360, 512x512 4 0x1800002, 0x1000002, 0x80300002, 0x1800006, 0x80300006
118 (console 16-bit depth + stencil) 20 → D32FloatS8 1280x720, 1024x1024 2 0x80300006, 0x1800002

No DXGI 45 in that run. So the 4,096-byte rows are Float32 depth (DXGI 19). The 2,560-byte rows for 1280 wide (and 2,048 for 1024) come from DXGI 118, whose depth plane is 16-bit. A depth-only blit would fit the DXGI 19 case. The DXGI 118 case would also need the 16-bit depth converted to float, because the host stands it in with 32-bit float depth.

@Olima34: checked against my runs, and it fits your reading. On the new main 5b7563e (Series S, M5 24 GB, macOS 27.2.1, cold shader cache: new cache folder, 96 conversions, 0 from disk), the run crashed at +238.9 s:

  • frame 3232 starts at 22:48:19.97 (284 first binds);
  • two graphics pipelines fail with conversion: Compilation failed due to an interrupted connection: XPC_ERROR_CONNECTION_INTERRUPTED … after multiple retries (22:48:33 and 22:48:37);
  • the first-chance at image+0x23cf683 comes at 22:48:50.17, 30.2 s after the frame started, then image+0x55e56f8 23 ms later.

My two d41052c runs with a warm cache (300 s each) did not crash: the world frame (2377 / 2291, ~1,700–1,800 first binds) passed and then crawled with "work held for a wait that does not hold", as in my first report.

@alicans: the Metal compiler crash happens on macOS 27 too. On macOS 27.2.1 (26B131), M5, the two pipelines above are a1785729710c22b3 / 80b896aafd2ec5f4 (in your list) and f88583f4d9c5f9bb / d4ad36beb4d0ead9. Six MTLCompilerService reports were written at the same moment, all with EXC_BAD_ACCESS (SIGSEGV), KERN_INVALID_ADDRESS at 0x0, in libLLVM.dylib under llvm::RegAllocBase::allocatePhysRegs(), the same stack as yours. On macOS 27 the XPC call is retried, so it shows as "interrupted connection" rather than "internal error", and it still costs a few seconds per pipeline inside the stalled frame. At d41052c my runs never bound those pipelines (the world frame came earlier, at 2291–2377, and the load took another path), which may be why other macOS 27 runs have not shown it.

Log of the 5b7563e crash run follows (home folder path replaced with ~): victory-series-s-5b7563e.log.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7205118339 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/15#issuecomment-7205118339). Originally posted by [LightningBoltsNFTs](https://github.com/LightningBoltsNFTs) on 2026-11-26T22:56:35Z. --- [victory-series-s-5b7563e.log](https://github.com/user-attachments/files/35487126/victory-series-s-5b7563e.log) @evan-kolberg: I added a local, temporary trace in `native::textures::upload` (not committed) and reran `d41052c` (Series S, same Mac, 300 s). Every skipped upload follows one of these lines. All of them are **plane 0 (the depth plane), mip 0, one layer, one mip**, called from `sync_dirty → upload`, i.e. a CPU-dirtied title texture being uploaded again: | console DXGI (before `pc_format`) | host | sizes | plane 0 bytes/texel | flags | |---|---|---|---|---| | **19** (`D32_FLOAT_S8X24_UINT`) | 19 → `D32FloatS8` | 3840x2160, 2048x2048, 1280x720, 1280x736, 1024x1024, 994x624, 640x360, 512x512 | 4 | 0x1800002, 0x1000002, 0x80300002, 0x1800006, 0x80300006 | | **118** (console 16-bit depth + stencil) | 20 → `D32FloatS8` | 1280x720, 1024x1024 | **2** | 0x80300006, 0x1800002 | No DXGI 45 in that run. So the 4,096-byte rows are Float32 depth (DXGI 19). The 2,560-byte rows for 1280 wide (and 2,048 for 1024) come from DXGI 118, whose depth plane is 16-bit. A depth-only blit would fit the DXGI 19 case. The DXGI 118 case would also need the 16-bit depth converted to float, because the host stands it in with 32-bit float depth. @Olima34: checked against my runs, and it fits your reading. On the new main **`5b7563e`** (Series S, M5 24 GB, macOS 27.2.1, **cold** shader cache: new cache folder, 96 conversions, 0 from disk), the run crashed at +238.9 s: - frame 3232 starts at 22:48:19.97 (284 first binds); - two graphics pipelines fail with `conversion: Compilation failed due to an interrupted connection: XPC_ERROR_CONNECTION_INTERRUPTED … after multiple retries` (22:48:33 and 22:48:37); - the first-chance at `image+0x23cf683` comes at 22:48:50.17, **30.2 s after the frame started**, then `image+0x55e56f8` 23 ms later. My two `d41052c` runs with a warm cache (300 s each) did not crash: the world frame (2377 / 2291, ~1,700–1,800 first binds) passed and then crawled with "work held for a wait that does not hold", as in my first report. @alicans: **the Metal compiler crash happens on macOS 27 too.** On macOS 27.2.1 (26B131), M5, the two pipelines above are `a1785729710c22b3` / `80b896aafd2ec5f4` (in your list) and `f88583f4d9c5f9bb` / `d4ad36beb4d0ead9`. Six `MTLCompilerService` reports were written at the same moment, all with `EXC_BAD_ACCESS (SIGSEGV)`, `KERN_INVALID_ADDRESS at 0x0`, in `libLLVM.dylib` under `llvm::RegAllocBase::allocatePhysRegs()`, the same stack as yours. On macOS 27 the XPC call is retried, so it shows as "interrupted connection" rather than "internal error", and it still costs a few seconds per pipeline inside the stalled frame. At `d41052c` my runs never bound those pipelines (the world frame came earlier, at 2291–2377, and the load took another path), which may be why other macOS 27 runs have not shown it. Log of the `5b7563e` crash run follows (home folder path replaced with `~`): `victory-series-s-5b7563e.log`.
Olima34 commented 2026-11-26 22:58:42 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by Olima34 on 2026-11-26T22:58:42Z.


Thanks @LightningBoltsNFTs, that's a clean confirmation: 30.2 s from the frame start to the watchdog matches what we saw.

The Metal compiler crash reproduces here too, on the same two pipelines. Apple M5 Pro, 48 GB, macOS 27.0, Series S:

  • vertex a1785729710c22b3 pixel 80b896aafd2ec5f4 and vertex f88583f4d9c5f9bb pixel d4ad36beb4d0ead9 fail with conversion: Compilation failed due to an interrupted connection: XPC_ERROR_CONNECTION_INTERRUPTED … after multiple retries;
  • matching MTLCompilerService-*.ips reports: EXC_BAD_ACCESS (SIGSEGV), KERN_INVALID_ADDRESS at 0x0, with llvm::RegAllocBase::allocatePhysRegs() in the stack;
  • as on your side, my d41052c runs never show them. They appear only on builds with newer translator commits, which reach those pipelines.

One more conversion class in the same runs, in case it's related: 4 pipelines fail with Fragment input(s) user(texcoord6) / user(texcoord8) mismatching vertex shader output type(s) or not written by vertex shader. For example vertex 15bc03b9755a325c pixel aeca2e13b91d102e and vertex 384deafe056de58e pixel 7460a6fa81385cb4.

So on a cold cache there are three costs inside the world frame: translation, these compiler crashes with their retries, and then the watchdog. Making a failed Metal compile stop holding the frame, as the maintainer plans, should take the second off.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7205148173 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/15#issuecomment-7205148173). Originally posted by [Olima34](https://github.com/Olima34) on 2026-11-26T22:58:42Z. --- Thanks @LightningBoltsNFTs, that's a clean confirmation: 30.2 s from the frame start to the watchdog matches what we saw. The Metal compiler crash reproduces here too, on the **same two pipelines**. Apple M5 Pro, 48 GB, macOS 27.0, Series S: - `vertex a1785729710c22b3 pixel 80b896aafd2ec5f4` and `vertex f88583f4d9c5f9bb pixel d4ad36beb4d0ead9` fail with `conversion: Compilation failed due to an interrupted connection: XPC_ERROR_CONNECTION_INTERRUPTED … after multiple retries`; - matching `MTLCompilerService-*.ips` reports: `EXC_BAD_ACCESS (SIGSEGV)`, `KERN_INVALID_ADDRESS at 0x0`, with `llvm::RegAllocBase::allocatePhysRegs()` in the stack; - as on your side, my `d41052c` runs never show them. They appear only on builds with newer translator commits, which reach those pipelines. One more conversion class in the same runs, in case it's related: 4 pipelines fail with `Fragment input(s) user(texcoord6)` / `user(texcoord8)` `mismatching vertex shader output type(s) or not written by vertex shader`. For example `vertex 15bc03b9755a325c pixel aeca2e13b91d102e` and `vertex 384deafe056de58e pixel 7460a6fa81385cb4`. So on a cold cache there are three costs inside the world frame: translation, these compiler crashes with their retries, and then the watchdog. Making a failed Metal compile stop holding the frame, as the maintainer plans, should take the second off.
Olima34 commented 2026-11-26 23:00:40 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by Olima34 on 2026-11-26T23:00:40Z.


Measurements of the world crawl, as promised. M5 Pro, 48 GB, Series S, windowed, 0133b82e, warm cache, frames ~2300–2700. These are data, not a fix.

Where the time goes:

  • A local lock trace (by call site) shows that from frame ~2300 on, glue::submit (ExecuteCommandLists) holds the title lock 4.0–4.5 s of every 5 s: about 60 submissions of ~75 ms each, with a max of 0.3–1.3 s. Every other title thread waits behind it.
  • GPU utilisation is 4–87%, no command buffer took more than 1 s, and no work was held. So the frames are CPU-bound on that lock, not on the GPU.
  • Stack samples of the submit thread, which is 100% busy:
    • about ⅓ in mapping_list: the whole ~96k-entry list is rebuilt for each root view, because streaming bumps the pool table's generation between draws;
    • about ⅔ in sync_keys: read_memory through mach_vm_read_overwrite (68%), blake3 (22%), detile (10%).

What we tried locally, and the result:

  1. root_view through an O(log n) PoolTable::mapping_at lookup of the one mapping, instead of rebuilding mapping_list. This takes that third out of the lock's time.
  2. read_memory copying from the pool's own mapping under the PoolTable lock instead of mach_vm_read_overwrite. In game it only moved the cost into memcpy and page faults.
  3. XOR detile with the column and row parts hoisted and fixed-length copies. Under Rosetta, a 2048² texture went from 24.3 → 8.7 ms at 16 B/element and 20.6 → 4.4 ms at 4 B. The existing round-trip test covers every XOR mode.

Together they shift the profile (read_memory 45%, blake3 24%, upload/detile 30%), but frames 2300→2700 still take 23–33 s, before and after. That's within noise: no measurable fps gain as long as sync_keys runs on the submit thread under the title lock.

What looks like the actual fix: take sync_keys off that lock. Read, hash and detile new or dirty textures on the scanner thread or a worker, and have submit only upload them; or at least hash and detile straight from the pool mapping with no copy. You said texture syncing is what you're on, so I'm not touching it. If (1) or (3) is useful to you as a piece, say so and I'll open it as a small PR with its unit test. Otherwise I'll drop them.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7205176015 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/15#issuecomment-7205176015). Originally posted by [Olima34](https://github.com/Olima34) on 2026-11-26T23:00:40Z. --- Measurements of the world crawl, as promised. M5 Pro, 48 GB, Series S, windowed, `0133b82e`, warm cache, frames ~2300–2700. These are data, not a fix. **Where the time goes:** - A local lock trace (by call site) shows that from frame ~2300 on, `glue::submit` (`ExecuteCommandLists`) holds the **title lock 4.0–4.5 s of every 5 s**: about 60 submissions of ~75 ms each, with a max of 0.3–1.3 s. Every other title thread waits behind it. - GPU utilisation is 4–87%, no command buffer took more than 1 s, and no work was held. So the frames are **CPU-bound on that lock**, not on the GPU. - Stack samples of the submit thread, which is 100% busy: - about ⅓ in `mapping_list`: the whole ~96k-entry list is rebuilt for each root view, because streaming bumps the pool table's generation between draws; - about ⅔ in `sync_keys`: `read_memory` through `mach_vm_read_overwrite` (68%), blake3 (22%), detile (10%). **What we tried locally, and the result:** 1. `root_view` through an O(log n) `PoolTable::mapping_at` lookup of the one mapping, instead of rebuilding `mapping_list`. This takes that third out of the lock's time. 2. `read_memory` copying from the pool's own mapping under the PoolTable lock instead of `mach_vm_read_overwrite`. In game it only moved the cost into memcpy and page faults. 3. XOR detile with the column and row parts hoisted and fixed-length copies. Under Rosetta, a 2048² texture went from 24.3 → 8.7 ms at 16 B/element and 20.6 → 4.4 ms at 4 B. The existing round-trip test covers every XOR mode. Together they shift the profile (`read_memory` 45%, blake3 24%, upload/detile 30%), but frames 2300→2700 still take 23–33 s, before and after. That's within noise: **no measurable fps gain** as long as `sync_keys` runs on the submit thread under the title lock. What looks like the actual fix: take `sync_keys` off that lock. Read, hash and detile new or dirty textures on the scanner thread or a worker, and have submit only upload them; or at least hash and detile straight from the pool mapping with no copy. You said texture syncing is what you're on, so I'm not touching it. If (1) or (3) is useful to you as a piece, say so and I'll open it as a small PR with its unit test. Otherwise I'll drop them.
alicans commented 2026-11-26 23:01:36 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by alicans on 2026-11-26T23:01:36Z.


Tried VICTORY_METAL_RESIDENCY_SETS=heap on 49b5521 as asked: M4 Pro, 24 GB, macOS 15.8.2, --console series-s, windowed. It does not hold on 24 GB.

  • The run reached render frame 2368, just before the first world frame (earlier runs had it at ~1930-1975), with 0 GPU errors and no OutOfMemory.

  • heap_set_mb stays at ~9.2-9.4 GB through the story load, then climbs at the world load:

    frame heap_set_mb
    1792 9400
    1984 9838
    2176 10931
    2304 13240
    2368 13241
  • At the same time the macOS memory level (kern.memorystatus_level) falls from 35-40 % to 14 %, and the process RSS reaches 8 GB. I stop runs at 15 % so that the Mac does not freeze, so it was stopped at 99 s, still alive.

  • For comparison, without the switch on the same build family the level also drops to 12-14 % at about 110 s. When the sampled textures lose their two most detailed levels (a local experiment), it stays at about 80 %.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7205189565 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/15#issuecomment-7205189565). Originally posted by [alicans](https://github.com/alicans) on 2026-11-26T23:01:36Z. --- Tried `VICTORY_METAL_RESIDENCY_SETS=heap` on `49b5521` as asked: M4 Pro, **24 GB**, macOS 15.8.2, `--console series-s`, windowed. It does **not** hold on 24 GB. - The run reached render frame 2368, just before the first world frame (earlier runs had it at ~1930-1975), with 0 GPU errors and no `OutOfMemory`. - `heap_set_mb` stays at ~9.2-9.4 GB through the story load, then climbs at the world load: | frame | heap_set_mb | |---|---| | 1792 | 9400 | | 1984 | 9838 | | 2176 | 10931 | | 2304 | 13240 | | 2368 | 13241 | - At the same time the macOS memory level (`kern.memorystatus_level`) falls from 35-40 % to 14 %, and the process RSS reaches 8 GB. I stop runs at 15 % so that the Mac does not freeze, so it was stopped at 99 s, still alive. - For comparison, without the switch on the same build family the level also drops to 12-14 % at about 110 s. When the sampled textures lose their two most detailed levels (a local experiment), it stays at about 80 %.
LakshanSivakumar commented 2026-11-26 23:15:28 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-26T23:15:28Z.


Where the prologue stands on main (78d35589), and what is being fixed now

The prologue crash is fixed: the game runs into the world, and the dialogue plays. What's left is a picture and speed. Each piece is now tracked on its own:

Problem Issue Status
The world renders black: the lighting compute and the upscale are refused, and the G-buffer is mostly empty #182 being fixed (four parts, see the issue)
The native host drops texture copies #178 being fixed
About 1.6 s of CPU per world frame in the texture sync (about 0.5 fps) #179 being fixed
The shader disk cache never hits, so every run is cold and can trip the watchdog #180 being fixed
macOS 15: Metal's compiler crashes on some world pipelines #181 open
GPU memory on 16–24 GB #8, #79 try VICTORY_METAL_RESIDENCY_SETS=heap and report

Shader refusals stay in #4. I'll keep this issue for runs that reach the world. Thanks to everyone who posted logs and analysis here: @Olima34, @LightningBoltsNFTs, @alicans, @FastFatMetal, @ItsMariusBC, @evan-kolberg.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7205388027 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/15#issuecomment-7205388027). Originally posted by [LakshanSivakumar](https://github.com/LakshanSivakumar) on 2026-11-26T23:15:28Z. --- **Where the prologue stands on main (78d35589), and what is being fixed now** The prologue crash is fixed: the game runs into the world, and the dialogue plays. What's left is a picture and speed. Each piece is now tracked on its own: | Problem | Issue | Status | |---|---|---| | The world renders black: the lighting compute and the upscale are refused, and the G-buffer is mostly empty | #182 | being fixed (four parts, see the issue) | | The native host drops texture copies | #178 | being fixed | | About 1.6 s of CPU per world frame in the texture sync (about 0.5 fps) | #179 | being fixed | | The shader disk cache never hits, so every run is cold and can trip the watchdog | #180 | being fixed | | macOS 15: Metal's compiler crashes on some world pipelines | #181 | open | | GPU memory on 16–24 GB | #8, #79 | try `VICTORY_METAL_RESIDENCY_SETS=heap` and report | Shader refusals stay in #4. I'll keep this issue for runs that reach the world. Thanks to everyone who posted logs and analysis here: @Olima34, @LightningBoltsNFTs, @alicans, @FastFatMetal, @ItsMariusBC, @evan-kolberg.
LakshanSivakumar commented 2026-11-27 05:38:47 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-27T05:38:47Z.


Closing this one. The prologue crash and the first-world-frame watchdog death are fixed on main (38786fd2), and the game now runs into the world. What is left is tracked separately: the black world in #258, world speed in #179, the Metal compiler crashes in #181, and memory on 16-24 GB Macs in #8 and #79. Thank you to everyone who posted logs here.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7210814181 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/15#issuecomment-7210814181). Originally posted by [LakshanSivakumar](https://github.com/LakshanSivakumar) on 2026-11-27T05:38:47Z. --- Closing this one. The prologue crash and the first-world-frame watchdog death are fixed on main (38786fd2), and the game now runs into the world. What is left is tracked separately: the black world in #258, world speed in #179, the Metal compiler crashes in #181, and memory on 16-24 GB Macs in #8 and #79. Thank you to everyone who posted logs here.
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
LakshanSivakumar/Native-Victory-macOS#15
No description provided.