Jump to content
  • Advertisement
Sign in to follow this  
GuyWithBeard

DX11 Acces violation on IDXGIKeyedMutex::ReleaseSync()

This topic is 2270 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,

I'm trying to do DX11/D2D interop trough DX 10.1 and shared texture resources, as described in the links below:

http://www.gamedev.net/topic/547920-how-to-use-d2d-with-d3d11/
http://will-sherif.appspot.com/html/d3d11+DirectWrite-hlsl.html

So, basically I am doing the following:

- Create the DX11 device with BGRA support
- Create the DX10.1 device with the same adapter as the DX11 one, also with BGRA support
- Create a Texture2D resource in DX11 with render target, shader resource and keyedmutex flags
- Create mutexes for the texture resource for both DX11 and DX10.1
- Create the D2D factory and render target objects, and bind the render target to the texture above

During one frame I want to do this:

- Lock the DX10.1 mutex with AcquireSync with key 0
- Draw the D2D content into the texture
- Unlock the DX10.1 mutex with ReleaseSync with key 1
- Lock the DX11 mutex with AcquireSync with key 1
- Draw the DX11 content to the screen (the shared texture as a 2D overlay)
- Unlock the DX11 mutex with ReleaseSync with key 0

The problem is that unlocking the DX10.1 mutex with ReleaseSync, key 1, causes an access violation. I have tried with different keys, but none have worked. Not locking the mutex before calling ReleaseSync gives me a different error, namely DXGI_ERROR_INVALID_CALL. Not using mutexes at all, gives me a black texture on the screen. Do you see any problems with the system described? Any potential problems that could cause an access violation when releasing a keyed mutex?

Thanks!

Share this post


Link to post
Share on other sites
Advertisement
Also, if it helps, this is what I get in the output:


First-chance exception at 0x5cd009b8 in NF3.exe: 0xC0000005: Access violation reading location 0x00000014.
Unhandled exception at 0x777d15de in NF3.exe: 0xC0000005: Access violation reading location 0x00000014.

Share this post


Link to post
Share on other sites
Some more info, in case it helps. The callstack at the time of the crash, ie. when running ReleaseSync().


ntdll.dll!775315de()
[Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll]
ntdll.dll!775315de()
ntdll.dll!7752014e()
d3d10_1core.dll!5866bef0()
D3D10SDKLayers.DLL!5797bb46()
D3D10SDKLayers.DLL!5797baaa()
D3D10SDKLayers.DLL!5797f82e()
D3D10SDKLayers.DLL!579806e1()
dxgi.dll!586922f9()
dxgi.dll!5869170a()
dxgi.dll!58692ae4()
nvumdshim.dll!57d409ab()
D3D10SDKLayers.DLL!5798051f()
nvumdshim.dll!57d3a503()
dxgi.dll!586c0bf7()
> Basis_d.dll!Basis::D2DRenderTarget::renderD2D() Line 99 + 0x1a bytes C++
Basis_d.dll!Basis::D2DManager::render() Line 136 + 0x8 bytes C++
Basis_d.dll!Basis::GraphicsEngine::render() Line 144 C++
Basis_d.dll!Basis::Client::render() Line 274 C++
NF3.exe!NF3::NF3App::run() Line 99 + 0x1f bytes C++
NF3.exe!WinMain(HINSTANCE__ * hInst, HINSTANCE__ * __formal, char * strCmdLine, int nCmdShow) Line 35 C++
NF3.exe!__tmainCRTStartup() Line 547 + 0x2c bytes C
NF3.exe!WinMainCRTStartup() Line 371 C
kernel32.dll!74d9339a()
ntdll.dll!77549ef2()
ntdll.dll!77549ec5()

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!