Leaks only in full screen

Started by
4 comments, last by DividedByZero 7 years, 4 months ago
Hi Guys,

I have a strange issue with my DX11 project.

I am running in debug mode, with the debug libraries all enabled.

In windowed mode I can run my project, have no memory leaks, and all DX11 interfaces are released with no errors.

But if I toggle to full screen with Alt/Enter, when I quit my program I get many references to objects that are not being released.

// Just a small snippet of what is happening (many many more of these being reported.

D3D11 WARNING: Process is terminating. Using simple reporting. Please call ReportLiveObjects() at runtime for standard reporting. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: Live Producer at 0x008063E4, Refcount: 2. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: Live Object at 0x00807EA8, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: Live Object at 0x0321E320, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: Live Object at 0x0320AEA4, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: Live Object at 0x032243FC, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: Live Object at 0x032245A4, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: Live Object at 0x032248CC, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]


This only happens if I Alt/Enter in to full screen. Windowed mode exits with no leaks whatsoever.

Is there something 'special' that I am missing in FS mode that I don't know about?

Any advice would be awesome.

Thanks in advance :)
Advertisement

What happens if you just resize your window without using alt+enter? That output looks like your ResizeBuffers logic in response to window size change (which happens during fullscreen transitions) might have a reference leak. You can also try following the advice in the message and calling ReportLiveObjects yourself to get more information beforehand. If you're on Windows 10, you can use the D3D11_RLDO_IGNORE_INTERNAL flag (ignore the description, it's wrong and I just filed feedback on it) to scope it down to just objects that have external refcounts.

I'll try to check with ReportLiveObjects and see what I get.

I have found also that if I start my program in full screen and lock it to stay in FS (no windowed toggling) I get the same leaks on exit.

Works perfectly in windowed mode all day long. Odd...

I only reference my controlling variable 'bFullscreen' once in the entire project and that is when creating the swapchain description.

Found it minutes after my previous post.

Apparently when you are in 'Full Screen' mode you need to do this before the program quits back to Windows

d3dSwapChain->SetFullscreenState(false, NULL);

100% error free now. Woo hoo! :D

You found your bug, great, and your apparently is documented somewhere but i don't remember where and is the right way to quit. A little advice tho, name all your d3d objects with SetName, it helps tracking what is what when it leaks or a debug layer message.

Nice! Thanks for that tip also :)

This topic is closed to new replies.

Advertisement