Teardown-Issue-Tracker-Maintainers / Teardown-Issue-Tracker

A public repo for the community to track issues/bugs/feature requests in Teardown.
12 stars 5 forks source link

[Bug] Game crashes if not enough GPU memory available #567

Open FlorentP42 opened 6 months ago

FlorentP42 commented 6 months ago

Describe the bug

If the game tries to allocate more memory than what is available it will log the following error and then crash:

2592 00:03:12.692108 ERROR edd5 [] TBufferD3D12::TBufferD3D12:46 gpuMemAllocator->CreateResource( &allocationDesc, &bufferDesc, translateResourceState(heapTypeToResourceType[params.heapType].value), nullptr, mAllocation.GetAddressOf(), IID_ID3D12Resource, nullptr) return HRESULT=8007000e
2592 00:03:12.706314 ERROR edd5 [] {
  "General": {
    "API": "Direct3D 12", 
    "GPU": "AMD Radeon(TM) Graphics", 
    "DedicatedVideoMemory": 519634944, 
    "DedicatedSystemMemory": 0, 
    "SharedSystemMemory": 3933186048, 
    "ResourceHeapTier": 2, 
    "ResourceBindingTier": 3, 
    "TiledResourcesTier": 3, 
    "TileBasedRenderer": false, 
    "UMA": true, 
    "CacheCoherentUMA": false
  }, 
  "Total": {
    "BlockCount": 697, 
    "BlockBytes": 3934060544, 
    "AllocationCount": 3251, 
    "AllocationBytes": 3882266624, 
    "UnusedRangeCount": 2, 
    "AllocationSizeMin": 4096, 
    "AllocationSizeMax": 201326592, 
    "UnusedRangeSizeMin": 20480, 
    "UnusedRangeSizeMax": 51773440
  }, 
  "MemoryInfo": {
    "L0": {
      "Budget": {
        "BudgetBytes": 3540794471, 
        "UsageBytes": 4229804032
      }, 
      "Stats": {
        "BlockCount": 697, 
        "BlockBytes": 3934060544, 
        "AllocationCount": 3251, 
        "AllocationBytes": 3882266624, 
        "UnusedRangeCount": 2, 
        "AllocationSizeMin": 4096, 
        "AllocationSizeMax": 201326592, 
        "UnusedRangeSizeMin": 20480, 
        "UnusedRangeSizeMax": 51773440
      }, 
      "MemoryPools": {
        "DEFAULT": {
          "Stats": {
            "BlockCount": 29, 
            "BlockBytes": 3143892992, 
            "AllocationCount": 2583, 
            "AllocationBytes": 3092099072, 
            "UnusedRangeCount": 2, 
            "AllocationSizeMin": 4096, 
            "AllocationSizeMax": 201326592, 
            "UnusedRangeSizeMin": 20480, 
            "UnusedRangeSizeMax": 51773440
          }
        }, 
        "UPLOAD": {
          "Stats": {
            "BlockCount": 667, 
            "BlockBytes": 790102016, 
            "AllocationCount": 667, 
            "AllocationBytes": 790102016, 
            "UnusedRangeCount": 0, 
            "AllocationSizeMin": 1048576, 
            "AllocationSizeMax": 33554432
          }
        }, 
        "READBACK": {
          "Stats": {
            "BlockCount": 1, 
            "BlockBytes": 65536, 
            "AllocationCount": 1, 
            "AllocationBytes": 65536, 
            "UnusedRangeCount": 0
          }
        }, 
        "CUSTOM": {
          "Stats": {
            "BlockCount": 0, 
            "BlockBytes": 0, 
            "AllocationCount": 0, 
            "AllocationBytes": 0, 
            "UnusedRangeCount": 0
          }
        }
      }
    }
  }, 
  "DefaultPools": {
    "DEFAULT": {
      "Flags": [], 
      "PreferredBlockSize": 67108864, 
      "Blocks": {
        "1": {
          "TotalBytes": 67108864, 
          "UnusedBytes": 0, 
          "Allocations": 31, 
          "UnusedRanges": 0, 
          "Suballocations": [
            {"Offset": 0, "Type": "TEXTURE2D", "Size": 8388608, "Usage": 0}, 
            {"Offset": 8388608, "Type": "TEXTURE2D", "Size": 4194304, "Usage": 0}, 
            {"Offset": 12582912, "Type": "TEXTURE2D", "Size": 8847360, "Usage": 0}, 
            {"Offset": 21430272, "Type": "TEXTURE2D", "Size": 6422528, "Usage": 1}, 
            {"Offset": 27852800, "Type": "TEXTURE2D", "Size": 4849664, "Usage": 1}, 
            {"Offset": 32702464, "Type": "TEXTURE2D", "Size": 4849664, "Usage": 1}, 
            {"Offset": 37552128, "Type": "TEXTURE2D", "Size": 1441792, "Usage": 1}, 
            {"Offset": 38993920, "Type": "TEXTURE2D", "Size": 1441792, "Usage": 1}, 
            {"Offset": 40435712, "Type": "TEXTURE2D", "Size": 2621440, "Usage": 4}, 
            {"Offset": 43057152, "Type": "TEXTURE2D", "Size": 1310720, "Usage": 4}, 
            {"Offset": 44367872, "Type": "TEXTURE2D", "Size": 2621440, "Usage": 4}, 
            {"Offset": 46989312, "Type": "TEXTURE2D", "Size": 1310720, "Usage": 4}, 
            {"Offset": 48300032, "Type": "TEXTURE2D", "Size": 2621440, "Usage": 4}, 
            {"Offset": 50921472, "Type": "TEXTURE2D", "Size": 917504, "Usage": 1}, 
            {"Offset": 51838976, "Type": "TEXTURE2D", "Size": 917504, "Usage": 1}, 
            {"Offset": 52756480, "Type": "TEXTURE2D", "Size": 917504, "Usage": 1}, 
            {"Offset": 53673984, "Type":
2592 00:03:12.707657 ERROR edd5 [] C:\BuildAgent\work\fd76be73d7b9a640\src\tlib\gfx\d3d12\commond3d12.h(81): in "d3dCallImpl()": D3D is of memory, see the log for details

Steps to reproduce the behavior

  1. Have a PC with spec similar to the one described here.
  2. Play a map with this mod enabled.

Expected behavior

Game throw some sort of error but does not crash.

Environment

0000 00:00:00.455083 INFO edd5 [Init] Starting up in resolution: 1920x1080 0000 00:00:00.555611 INFO edd5 [Init|Render] Graphics API: D3D12 0000 00:00:01.250448 INFO edd5 [Init|Render] Vendor: Amd Renderer: AMD Radeon(TM) Graphics Total VRAM: 495 Mb Available VRAM: 3821 Mb

0000 00:00:01.251956 INFO edd5 [Init|Render] GPU vendor: Amd Indirect arguments supported: Draw Draw indexed Vertex buffer view Index buffer view Push CBV Bindless support: true Conservative depth support: true Compute shader support: true Constant buffer alignment: 256 Frame memory alloc max size: 1048576 Wave lane count num: 64 Wave operations support: true Max 1D texture size: 16384 Max 2D texture size: 16384 Max 3D texture size: 2048 Max cubemap texture size: 16384 Max array texture layers: 2048



### Additional context

This was not produced on my PC but on the one of a mod subscriber, if you need more info regarding the machine than what is in the logs I will try to ask that person.
Gregory-Gregory commented 5 months ago

@FlorentP42 hi!

If possible, can you please also ask the player for:

  1. A local crash dump, which may be in some of the following paths:
    • \AppData\Local\CrashDumps
    • \AppData\Local\Teardown\crash
    • \Documents\Teardown\crash
  2. A DxDiag file. To get it:
    • In Windows, select Start and enter dxdiag into the search box on the taskbar. Select dxdiag from the results.
    • In the tool, select Save All Information for an easily shared format.

It will help the team a lot with the investigation. If it is not possible, please let me know so I can forward the information we have right away.

Thank you for your cooperation!

FlorentP42 commented 5 months ago

@Gregory-Gregory Well I will ask but not sure if (or when) I will get an answer, so if anything can be done out of the current data maybe it is worth forwarding the issue already?

Gregory-Gregory commented 5 months ago

@FlorentP42 hi again!

I have reported the issue to the team for the investigation. If you manage to get any additional files, please feel free to share them. Also I will let you know if the team has any information.

Thank you!

FlorentP42 commented 5 months ago

@Gregory-Gregory I got some feedback from the player experiencing the crash, here are the info : 2024-05-23-04-13-24_Steam_492.zip

Note that I manually moved the Teardown.exe file included in the first crash folder to the parent directory and deleted it inside each directory to reduce the total archive size (as it should be the same exe in all cases anyway).