UE4 title (PPSA15657): LowLevelFatalError "RemoveFromOuterMap NumRemoved = 0" when the title screen opens the menu #2365

Closed
opened 2026-10-09 16:25:29 +00:00 by johnmaia · 4 comments
johnmaia commented 2026-10-09 16:25:29 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by johnmaia on 2026-10-09T16:25:29Z.


Title: Disney Epic Mickey: Rebrushed (PPSA15657 v01.000.000, retail, UE4).
Build: the mickey/testing stack (see #2255) on main + #2339, Linux, kernel 7.0, RX 7600 (RADV).

At the title screen, pressing Cross to open the main menu ends the process in most runs. About 0.5 s after the press, Unreal reports an internal consistency error and then executes its debug break:

LowLevelFatalError [File:Unknown] [Line: 788]
Internal Error: RemoveFromOuterMap NumRemoved = 0  for MovieScene2DTransformPropertySystem /Engine/Transient.RecGameEngine_2147482604:UMGAnimationEntitySystemLinker.MovieScene2DTransformPropertySystem

RemoveFromOuterMap (UObjectHash) removes an object from the outer-to-objects map and found it missing. The object belongs to the UMG animation entity-system linker, which the title screen's widget animations use and which is torn down when the menu opens.

What is known

  • Timing. It always fires right after Cross at the title, never earlier, while the title's widget animation is still playing.
  • Not every run. Of eight runs that pressed Cross about 3 s after the title appeared, five ended this way and three opened the menu and started a new game. Without #2339, the same moment instead crashed in Unreal's call-stack capture for this error (a null frame pointer).
  • Lock implementation. scePthreadMutex* in libkernel/Pthread/src/Mutex.cpp looks correct for what Unreal's FCriticalSection needs: recursive counting, error-check EDEADLK, trylock, atomic owner tracking.
  • Suspected cause. The intermittency points at a race between the animation's evaluation on task threads and the teardown on the game thread. Candidates are the synchronization primitives Unreal's task graph and garbage collector use (events and condition variables), or memory reuse.

I'm continuing on this (thread-count experiments, then the event and condition-variable paths) and will post what I find here. Pointers are welcome if someone already knows Unreal titles with the same error.

Investigated and written by Claude (AI assistant) on a contributor's machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5781326551 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2365). Originally posted by [johnmaia](https://github.com/johnmaia) on 2026-10-09T16:25:29Z. --- **Title:** Disney Epic Mickey: Rebrushed (PPSA15657 v01.000.000, retail, UE4). **Build:** the [`mickey/testing`](https://github.com/johnmaia/AnyPS5/tree/mickey/testing) stack (see #2255) on `main` + #2339, Linux, kernel 7.0, RX 7600 (RADV). At the title screen, pressing Cross to open the main menu ends the process in most runs. About 0.5 s after the press, Unreal reports an internal consistency error and then executes its debug break: ``` LowLevelFatalError [File:Unknown] [Line: 788] Internal Error: RemoveFromOuterMap NumRemoved = 0 for MovieScene2DTransformPropertySystem /Engine/Transient.RecGameEngine_2147482604:UMGAnimationEntitySystemLinker.MovieScene2DTransformPropertySystem ``` `RemoveFromOuterMap` (UObjectHash) removes an object from the outer-to-objects map and found it missing. The object belongs to the UMG animation entity-system linker, which the title screen's widget animations use and which is torn down when the menu opens. ### What is known - **Timing.** It always fires right after Cross at the title, never earlier, while the title's widget animation is still playing. - **Not every run.** Of eight runs that pressed Cross about 3 s after the title appeared, five ended this way and three opened the menu and started a new game. Without #2339, the same moment instead crashed in Unreal's call-stack capture for this error (a null frame pointer). - **Lock implementation.** `scePthreadMutex*` in `libkernel/Pthread/src/Mutex.cpp` looks correct for what Unreal's `FCriticalSection` needs: recursive counting, error-check `EDEADLK`, `trylock`, atomic owner tracking. - **Suspected cause.** The intermittency points at a race between the animation's evaluation on task threads and the teardown on the game thread. Candidates are the synchronization primitives Unreal's task graph and garbage collector use (events and condition variables), or memory reuse. I'm continuing on this (thread-count experiments, then the event and condition-variable paths) and will post what I find here. Pointers are welcome if someone already knows Unreal titles with the same error. *Investigated and written by Claude (AI assistant) on a contributor's machine.*
johnmaia commented 2026-10-09 22:53:04 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by johnmaia on 2026-10-09T22:53:04Z.


Update: host import is the main suspect.

Same build and timing as above (Cross about 3 s after the title appears), with only environment variables changed:

Host import Runs Ended with RemoveFromOuterMap
on (default) 8 5
off (APS5_NO_HOST_IMPORT=1) 5 0

One of the five runs with imports off also had APS5_GPU_NO_WRITEBACK=1. In all five, the menu opened and the game went on to Continue, the opening cutscene and gameplay. One of them ran 44 minutes into the level without an error.

With imports on, waiting 20 s at the title before pressing Cross doesn't avoid it: of three such runs, one still ended this way.

If the true rate with imports on is 5 in 8, five clean runs in a row would happen by chance about 0.7% of the time. So this points at host-imported guest memory: either the GPU writes into, or the driver stores over, memory the CPU is using at that moment. It doesn't look like a CPU-side race in the engine. It doesn't yet say which import or which write.

APS5_GPU_NO_WRITEBACK=1 on its own isn't a usable workaround: the level then stops at Vulkan dispatch: workgroup count exceeds device limits, because an indirect dispatch reads arguments that an earlier GPU pass never wrote back.

Next I'll find the address of the outer-map entry that goes missing and watch writes to its pages with imports on (APS5_WATCH_WRITE / APS5_WRITE_WATCH_IMPORTS), to see whether a GPU-side write or a driver store touches it.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6090629416 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2365#issuecomment-6090629416). Originally posted by [johnmaia](https://github.com/johnmaia) on 2026-10-09T22:53:04Z. --- Update: host import is the main suspect. Same build and timing as above (Cross about 3 s after the title appears), with only environment variables changed: | Host import | Runs | Ended with `RemoveFromOuterMap` | |---|---|---| | on (default) | 8 | 5 | | off (`APS5_NO_HOST_IMPORT=1`) | 5 | 0 | One of the five runs with imports off also had `APS5_GPU_NO_WRITEBACK=1`. In all five, the menu opened and the game went on to Continue, the opening cutscene and gameplay. One of them ran 44 minutes into the level without an error. With imports on, waiting 20 s at the title before pressing Cross doesn't avoid it: of three such runs, one still ended this way. If the true rate with imports on is 5 in 8, five clean runs in a row would happen by chance about 0.7% of the time. So this points at host-imported guest memory: either the GPU writes into, or the driver stores over, memory the CPU is using at that moment. It doesn't look like a CPU-side race in the engine. It doesn't yet say which import or which write. `APS5_GPU_NO_WRITEBACK=1` on its own isn't a usable workaround: the level then stops at `Vulkan dispatch: workgroup count exceeds device limits`, because an indirect dispatch reads arguments that an earlier GPU pass never wrote back. Next I'll find the address of the outer-map entry that goes missing and watch writes to its pages with imports on (`APS5_WATCH_WRITE` / `APS5_WRITE_WATCH_IMPORTS`), to see whether a GPU-side write or a driver store touches it.
johnmaia commented 2026-10-10 07:45:54 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by johnmaia on 2026-10-10T07:45:54Z.


Update: found the cause. The driver writes DCC "uncompressed" keys over memory where Unreal keeps the outer map.

I ran the title under gdb, with a breakpoint on the NumRemoved = 0 branch in RemoveFromOuterMap (eboot 0x1d17031), with host import on and APS5_TRACE_DCC_KEYS=1. The first run caught it:

outer map at <eboot>+0x85831d8: data=0x201c2e0000 num=4867        (4867 x 32 B = 0x201c2e0000..0x201c306060)
entry 4866 key=<object's outer> slot0=0x0 slot1=0x0              <- the entry exists, but its object slots are empty

The trace shows the driver writing over exactly that range, roughly every frame:

[dcc-keys] uncompressed store by first write (?) for surface 0x20332f0000+0x1fe0000: keys 0x201c2e0000+0x28000 (packet 0x35 queue 0x0)
[dcc-keys] uncompressed keys stored on the gpu: 0x201c2e0000+0x28000 (packet 0x35 queue 0x0)

That's about 120 such stores over 0x201c2e0000+0x28000 before the crash. The map's 152 KiB sits inside that 160 KiB key range.

What seems to happen

  1. A texture descriptor (surface 0x20332f0000, 32 MiB) has metadata compression on, with its DCC address at 0x201c2e0000. Unreal uses that memory for the FUObjectHashTables outer map.
  2. On upload, the driver reads the "keys" there. The map is mostly zero bytes, so they read as Clear0000 (uploadedKeys is a clear state).
  3. A shader writes the surface. StorageTexture::MarkDirty (Graphics/src/Texture.cpp, the traceKeyStore("first write", ...) branch) then calls MarkDccUncompressed, which queues a GPU fill of 0xff over the whole key range.
  4. Unreal writes the map again, the next upload reads clear-looking keys again, and the store repeats.
  5. When a fill lands between Unreal's writes, map entries get corrupted. A later remove can't find its object, which gives NumRemoved = 0.

This fits what was already known:

  • It needs host import plus write watching. Without the import, the fill goes to a shadow copy and never reaches the guest's memory.
  • It's timing dependent: it depends on whether the asynchronous fill lands between Unreal's writes.
  • It shows up when the menu opens, which is when a burst of objects is created and destroyed.

Next

The question is whether the driver should store keys on a "first write" at all when the game didn't ask for it. I'm testing a fix that stops this store from touching memory the guest has written since the keys were read. I'll report trial numbers with host import on.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6095258931 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2365#issuecomment-6095258931). Originally posted by [johnmaia](https://github.com/johnmaia) on 2026-10-10T07:45:54Z. --- Update: found the cause. The driver writes DCC "uncompressed" keys over memory where Unreal keeps the outer map. I ran the title under gdb, with a breakpoint on the `NumRemoved = 0` branch in `RemoveFromOuterMap` (eboot `0x1d17031`), with host import on and `APS5_TRACE_DCC_KEYS=1`. The first run caught it: ``` outer map at <eboot>+0x85831d8: data=0x201c2e0000 num=4867 (4867 x 32 B = 0x201c2e0000..0x201c306060) entry 4866 key=<object's outer> slot0=0x0 slot1=0x0 <- the entry exists, but its object slots are empty ``` The trace shows the driver writing over exactly that range, roughly every frame: ``` [dcc-keys] uncompressed store by first write (?) for surface 0x20332f0000+0x1fe0000: keys 0x201c2e0000+0x28000 (packet 0x35 queue 0x0) [dcc-keys] uncompressed keys stored on the gpu: 0x201c2e0000+0x28000 (packet 0x35 queue 0x0) ``` That's about 120 such stores over `0x201c2e0000+0x28000` before the crash. The map's 152 KiB sits inside that 160 KiB key range. ### What seems to happen 1. A texture descriptor (surface `0x20332f0000`, 32 MiB) has metadata compression on, with its DCC address at `0x201c2e0000`. Unreal uses that memory for the `FUObjectHashTables` outer map. 2. On upload, the driver reads the "keys" there. The map is mostly zero bytes, so they read as `Clear0000` (`uploadedKeys` is a clear state). 3. A shader writes the surface. `StorageTexture::MarkDirty` (`Graphics/src/Texture.cpp`, the `traceKeyStore("first write", ...)` branch) then calls `MarkDccUncompressed`, which queues a GPU fill of `0xff` over the whole key range. 4. Unreal writes the map again, the next upload reads clear-looking keys again, and the store repeats. 5. When a fill lands between Unreal's writes, map entries get corrupted. A later remove can't find its object, which gives `NumRemoved = 0`. This fits what was already known: - It needs host import plus write watching. Without the import, the fill goes to a shadow copy and never reaches the guest's memory. - It's timing dependent: it depends on whether the asynchronous fill lands between Unreal's writes. - It shows up when the menu opens, which is when a burst of objects is created and destroyed. ### Next The question is whether the driver should store keys on a "first write" at all when the game didn't ask for it. I'm testing a fix that stops this store from touching memory the guest has written since the keys were read. I'll report trial numbers with host import on.
johnmaia commented 2026-10-10 09:32:47 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by johnmaia on 2026-10-10T09:32:47Z.


Follow-up with trial numbers. They change how strong the claim above is.

Fix branch: johnmaia:fix/agc-keep-mixed-dcc-keys (one commit, Texture.cpp). The three storage-image write-back paths now skip the "uncompressed" key store when CurrentDccKeys reads the range as Mixed. Those keys already read as uncompressed (textureClearKeys returns Uncompressed for them), so the store has no effect on the driver's own reads; it only overwrites whatever the title keeps there. I can't open a PR while intake is paused, so the branch is there for anyone who wants it.

Trials: Cross 3 s after the title, host import on, RX 7600 / RADV:

Build Runs NumRemoved = 0
older main + stack, without the fix (earlier comment) 8 5
current main (f70a091f) + stack + fix 8 0
current main + same stack, fix reverted 8 0

So on current main the crash doesn't reproduce with or without the fix. I can't credit the fix for the 0/8. Something on main since then changed the timing or the path. The startup movies also no longer play in these runs (the trials hide them to save 13 minutes per boot), which shifts timing too.

What still holds: on the older build, the gdb + APS5_TRACE_DCC_KEYS run caught the driver filling 0xff over the outer map's storage right before the abort. The store over non-uniform keys is still on main, so the corruption can come back whenever the title reuses a key range. I'd keep the fix, but there's no repro for it on current main.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6096158417 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2365#issuecomment-6096158417). Originally posted by [johnmaia](https://github.com/johnmaia) on 2026-10-10T09:32:47Z. --- Follow-up with trial numbers. They change how strong the claim above is. **Fix branch:** [`johnmaia:fix/agc-keep-mixed-dcc-keys`](https://github.com/johnmaia/AnyPS5/compare/main...johnmaia:AnyPS5:fix/agc-keep-mixed-dcc-keys) (one commit, `Texture.cpp`). The three storage-image write-back paths now skip the "uncompressed" key store when `CurrentDccKeys` reads the range as `Mixed`. Those keys already read as uncompressed (`textureClearKeys` returns `Uncompressed` for them), so the store has no effect on the driver's own reads; it only overwrites whatever the title keeps there. I can't open a PR while intake is paused, so the branch is there for anyone who wants it. **Trials:** Cross 3 s after the title, host import on, RX 7600 / RADV: | Build | Runs | `NumRemoved = 0` | |---|---|---| | older `main` + stack, without the fix (earlier comment) | 8 | 5 | | current `main` (`f70a091f`) + stack + fix | 8 | 0 | | current `main` + same stack, **fix reverted** | 8 | 0 | So on current `main` the crash doesn't reproduce with or without the fix. I can't credit the fix for the 0/8. Something on `main` since then changed the timing or the path. The startup movies also no longer play in these runs (the trials hide them to save 13 minutes per boot), which shifts timing too. What still holds: on the older build, the gdb + `APS5_TRACE_DCC_KEYS` run caught the driver filling `0xff` over the outer map's storage right before the abort. The store over non-uniform keys is still on `main`, so the corruption can come back whenever the title reuses a key range. I'd keep the fix, but there's no repro for it on current `main`.
oneandonlydean commented 2026-10-12 06:17:52 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-12T06:17:52Z.


Closing: it no longer reproduces on main (0 of 8 with your fix reverted), and #3458 has since stopped the write-back from storing the keys a second time over memory the title reused. Reopen with a run on current main that shows the first-write store landing on title memory.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6118867535 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2365#issuecomment-6118867535). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-12T06:17:52Z. --- Closing: it no longer reproduces on main (0 of 8 with your fix reverted), and #3458 has since stopped the write-back from storing the keys a second time over memory the title reused. Reopen with a run on current main that shows the first-write store landing on title memory.
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
boykopovar/AnyPS5#2365
No description provided.