D3D12.X: failed replacement allocation falls back to resetting a busy allocator #983

Open
opened 2026-11-24 10:01:31 +00:00 by nova-aryan · 0 comments
nova-aryan commented 2026-11-24 10:01:31 +00:00 (Migrated from github.com)
Contributor

Imported from ivall/xcl. Originally posted by nova-aryan on 2026-11-24T10:01:31Z.


Source inspection on main 9aec53d: alloc_pool::title_reset returns None when GetDevice or CreateCommandAllocator fails while replacing a busy backing. real::alloc_reset treats None as permission to reset the original allocator. That is the allocator whose recordings the pool was keeping alive.

I will preserve the failure HRESULT as Some(hr), leave the current backing/recording associations unchanged, and add a synthetic COM regression covering both failure paths. This does not change the successful allocation path.

Microsoft documents allocation failure and the lifetime restriction on Reset. No claim that this explains the reported retail watchdog/null-write crash. Local build/test/game execution is disabled at the user's request; the patch will remain a draft pending validation.

<!-- greyfinch-sync:ivall/xcl:issue:6579270669 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/issues/989). Originally posted by [nova-aryan](https://github.com/nova-aryan) on 2026-11-24T10:01:31Z. --- Source inspection on main `9aec53d`: `alloc_pool::title_reset` returns `None` when `GetDevice` or `CreateCommandAllocator` fails while replacing a busy backing. `real::alloc_reset` treats `None` as permission to reset the original allocator. That is the allocator whose recordings the pool was keeping alive. I will preserve the failure HRESULT as `Some(hr)`, leave the current backing/recording associations unchanged, and add a synthetic COM regression covering both failure paths. This does not change the successful allocation path. Microsoft documents [allocation failure](https://learn.microsoft.com/en-us/windows/win32/api/d3d12/nf-d3d12-id3d12device-createcommandallocator) and [the lifetime restriction on Reset](https://learn.microsoft.com/en-us/windows/win32/api/d3d12/nf-d3d12-id3d12commandallocator-reset). No claim that this explains the reported retail watchdog/null-write crash. Local build/test/game execution is disabled at the user's request; the patch will remain a draft pending validation.
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
xcl-dev/xcl#983
No description provided.