Sign in to follow this  
Hassanbasil

PIX and VS11 beta breaks on IDXGISwapChain::Present

Recommended Posts

Hassanbasil    195
Hello everyone,

I'm running into trouble debugging my application, when i run it, it's fine, but when i use the visual studio graphics debugger or PIX, it breaks on swap chain's present call, with the following error in VS:
"Unhandled exception at 0x6249D61F (d2d1.dll) in HasX11 Engine.exe: 0xC0000005: Access violation reading location 0x00000000."
and PIX gives the following:
"Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention."

I'm not sure what is the problem, i'm not using d2d at all, not even included, yet the error is in d2d1.dll, also - when i attach VS11 debugger for PIX it breaks on present too.

I am running windows 8 consumer preview, with visual studio 11 beta, i had directX SDK june 2010 installed, is it causing conflicts? i tried to rename the install directory of the sdk to make sure it's not linking with it (since i realized windows 8 has the libs and headers built in) but with the same result, i dont really feel like uninstalling the dxsdk just to make sure since i lost its installer, could there be something else causing this?
also note that it happens with both dirext3D 11 and 11.1.

Thank you for your time,
Hasan

Share this post


Link to post
Share on other sites
Radikalizm    4807
I don't know whether this will fix your problem or not, but I believe you'll need the Windows SDK installed to develop DX11 applications in windows 8. They don't release the DirectX SDK separately anymore.

Share this post


Link to post
Share on other sites
mhagain    13430
The value of ESP not saved normally means that you're using a function that should be declared as CALLBACK or WINAPI but is not. Standard culprits might be your WndProc or any ThreadProc functions you might be using, other possibilities include doing a GetProcAddress where your function pointer prototype is not declared properly (again, using CALLBACK or WINAPI). Less likely is adding CALLBACK or WINAPI to a function prototype that shouldn't have it, and also check any casts-to-function-pointer you might be doing - basically if you failed to compile something that takes a function pointer but you stuck a cast in instead of fixing it properly, this can happen.

Running in the debugger will perform some extra checks that not doing so won't, so that can explain why you're not seeing it outside of a debugger. I wouldn't worry too much about the D2D part - it's possible that the architecture has changed for the new versions (e.g. the swap chain might now call into D2D for Present ops owing to a consolidation of code) - this is just speculation on my part though, but I wouldn't consider it too far-fetched.

Finally, you're using pre-release software so it's equally possible that you've just encountered a bug, which should be normal and expected behaviour with pre-release software. Edited by mhagain

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this