Jump to content
  • Advertisement
Sign in to follow this  
DarkRonin

DX11 Leaks only in full screen

This topic is 673 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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 :)

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!