Crash (0xc0000005) in victory-image after repeated GPU buffer allocation failures (E_OUTOFMEMORY) #297
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/readmet3xt-lab--foxhound#297
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@richky0 on GitHub · 2026-12-01 11:00 UTC · original
Title: Crash (0xc0000005) in victory-image after repeated GPU buffer allocation failures (E_OUTOFMEMORY 0x8007000E)
Summary
GPU buffer allocations in
victory_gpu::hostfail repeatedly with0x8007000E(E_OUTOFMEMORY). The allocation failures appear to be inadequately handled, potentially allowing subsequent code invictory-imageto use an invalid or null pointer, resulting in a0xc0000005access violation.The crash occurs immediately after hundreds of repeated GPU buffer allocation failures within approximately four seconds.
The most likely issue is an allocation failure handling problem, potentially combined with excessive buffer allocation, insufficient available GPU/system memory, or unreleased buffers.
The exact underlying memory exhaustion source (dedicated VRAM, shared GPU memory, or system commit memory) has not yet been confirmed.
Environment
winver):nvidia-smi):Game / Graphics Settings
Steps to Reproduce
Frequency: <always / sometimes (x out of y attempts) / once>
First seen on: <game version / Foxhound version / driver version>
Worked correctly on a previous version: <yes (which) / no / unknown>
Observed Behavior
Multiple WARN messages from
victory_gpu::hostreport GPU buffer allocation failures with the following error:Not enough memory resources are available to complete this operation. (0x8007000E)
The failed allocations include:
The failed allocation sizes range from 32 KB to 8 MB. This suggests that the problem may involve insufficient available memory or allocation fragmentation rather than a single unusually large allocation request.
Hundreds of allocation failures occur within approximately four seconds, with repeated failures roughly 0.3 ms apart.
Immediately after the final read-back buffer allocation failures at approximately 10:48:07.897-10:48:07.899, the process crashes.
Crash report:
Memory Usage at Time of Crash
Please fill in if known (Task Manager > Performance, or HWiNFO / GPU-Z log):
Analysis
The exception code 0xc0000005 indicates an access violation.
The crash report identifies a write operation targeting address 0x0, which is consistent with an attempt to write through a null or invalid pointer.
The crash immediately follows repeated read-back buffer allocation failures. This suggests that a failed allocation result may not be properly checked before the allocated resource is used.
The failure pattern may indicate that the application continues submitting buffer allocation requests despite repeated E_OUTOFMEMORY errors, without sufficient backoff, resource reclamation, or request limiting.
The laptop has 8 GB of dedicated VRAM and 16 GB of system RAM. Both are potential memory constraints when running this workload.
However, E_OUTOFMEMORY alone does not establish that dedicated VRAM is completely exhausted. The failure could also involve shared GPU memory, system memory, system commit limits, driver allocation constraints, or resource fragmentation.
The available log does not conclusively establish a memory leak. Buffer lifetime management and deferred resource release should be investigated.
The crash occurs in a worker thread inside victory-image, suggesting that asynchronous image or buffer processing may be involved.
Suspected Root Cause
The leading hypothesis is insufficient available memory during repeated GPU buffer allocation, followed by inadequate error handling in the image-processing pipeline.
A possible failure sequence is:
This sequence is consistent with the observed logs but requires source-level debugging or additional instrumentation to confirm.
Suggested Fixes
[Critical] victory-image: Check the result of every GPU buffer allocation before accessing or writing to the buffer. Abort the operation safely if allocation fails.
[Critical] victory_gpu::host: Return Result or Option from buffer allocation functions instead of exposing potentially null pointers without explicit error handling.
[Critical] victory-image: Ensure that allocation failures are propagated through the entire image-processing pipeline and cannot result in invalid memory access.
[High] victory_gpu::host: Implement a reusable buffer pool for upload, write-back upload, shared, and read-back buffers. Reuse existing allocations when possible instead of repeatedly allocating new buffers.
[High] Scheduler/worker: Limit the number of in-flight GPU operations and outstanding buffer allocations to prevent excessive concurrent memory consumption.
[High] Scheduler/worker: Implement exponential backoff and a retry limit when buffer allocation fails. Avoid continuously retrying failed allocations at sub-millisecond intervals.
[High] Resource management: Verify that GPU buffers are released after their associated GPU fences have completed and that no unnecessary references keep resources alive.
[High] Resource management: Investigate possible buffer leaks, especially in asynchronous image-processing and read-back operations.
[Medium] Memory monitoring: Monitor dedicated GPU memory and shared GPU memory using IDXGIAdapter3::QueryVideoMemoryInfo.
[Medium] System memory monitoring: Monitor physical RAM usage, system commit usage, and available pagefile capacity to distinguish VRAM exhaustion from system memory exhaustion.
[Medium] Allocation recovery: When E_OUTOFMEMORY occurs, attempt to release completed deferred resources and retry a limited number of times. If allocation still fails, return a recoverable error.
[Medium] Fallback handling: Where technically feasible, abort the current image-processing operation or use a CPU fallback rather than allowing an invalid GPU buffer to be accessed.
[Low] Logging: Rate-limit repeated allocation warning messages and provide summarized failure counts grouped by buffer type and allocation size.
Example Implementation (Rust)
Example usage:
Note: The example is illustrative. Actual implementation must follow the project's buffer ownership, synchronization, GPU fence, and resource lifetime requirements. CPU fallback should only be used where the operation supports an equivalent CPU implementation.
Verification and Testing
Reproduce the issue under controlled memory pressure and record the GPU and system memory usage immediately before and during allocation failures.
Record dedicated VRAM usage, shared GPU memory usage, physical RAM usage, system commit usage, and pagefile usage at the time of failure.
Confirm whether buffer allocation failures are propagated correctly and whether the image-processing operation terminates safely without accessing invalid pointers.
Run a long-duration workload test and monitor whether dedicated VRAM, shared GPU memory, and system commit usage remain stable.
Confirm that completed GPU resources are released after their fences signal completion.
Confirm that repeated E_OUTOFMEMORY warnings no longer trigger an uncontrolled allocation retry loop.
Verify that the application reports a recoverable error or uses a supported CPU fallback instead of crashing.
If a PDB file is available, map the faulting instruction at victory-image-b99f876b74d4a77f.dll+0x23cf683 to its corresponding source code line.
Compare the behavior with Frame Generation disabled and enabled to determine whether the additional GPU memory requirements contribute to the failure.
Repeat the test with different texture-loading settings and VRAM limits to determine whether memory pressure correlates with the failure.
Workarounds Tried
Additional Information Requested from Developers
Expected Behavior
When a GPU buffer allocation fails, the application should handle the error safely.
The operation should be aborted, retried within a controlled limit after resource reclamation, or redirected to a supported CPU fallback.
A failed GPU allocation must never result in an invalid pointer being dereferenced or written to.
The application should remain stable and report a meaningful memory allocation error rather than crashing with an access violation.
Actual Behavior
The process crashes with an unhandled access violation (0xc0000005) after hundreds of E_OUTOFMEMORY allocation warnings.
Attachments
Conclusion
The logs show a strong temporal relationship between repeated GPU buffer allocation failures (E_OUTOFMEMORY) and the subsequent access violation (0xc0000005) in victory-image.
The leading concern is inadequate handling of GPU buffer allocation failures, potentially aggravated by memory pressure on a system with 8 GB of dedicated VRAM and 16 GB of system RAM.
The issue should be investigated at both the GPU resource allocation layer (victory_gpu::host) and the image-processing layer (victory-image).
The priority should be to prevent invalid memory access after allocation failures, control repeated allocation attempts, and improve buffer reuse and resource lifetime management.