Fix memory leak: Memory leak and shader reload after taking screenshot with Windows Snipping Tool

There is no memory leak in ba sing se!

  • Yes
  • No
0 voters
  • Immediately after the screenshot, shaders begin reloading mid-game
  • Game starts stuttering and rubber banding
  • Audio glitches — repeating/looping sounds, stuttering
  • Constant micro-freezes that get progressively worse
  • Memory usage climbs rapidly and does not stop (observed ~12 GB rising to ~17
    GB within minutes, with handle count rising from ~12,000 to ~16,000)
  • System eventually runs critically low on RAM

This appears to be a resource leak in the rendering pipeline — possibly the Dagor engine’s DirectX/Vulkan swap chain not recovering correctly after an external process captures the framebuffer. The handle count climbing after each screenshot suggests resources (textures, buffers, or shader objects) are being re-allocated but never freed. The only fix is restarting the game.

I will note the game has to be chugging in order to be caught in the loop otherwise it’ll just have a lot of ram for a bit than be able to recover.

I haven’t noticed any memory problems on my end, but DX12 seems to have been disabled. Game will only launch in DX11 currently

Did u try screenshotting? Only seems to cause it whenever already low performance

yep, aside from the usual brief stutter nothing seems to be wrong

game ran fine for me from update through last night. Today it was a disaster. Client side and server side.

2 Likes