Georgy
Georgy

Reputation: 1

Why does Direct3DCreate9 only work under the MVS debugger (or without a debugger)?

Code:

#include <d3d9.h>
int main(int argc, char *argv[])
{
    Direct3DCreate9(D3D_SDK_VERSION);
}

It works fine without debugging. Compiled by msvc. It also works when debugging in Visual Studio. But when debugging, there is a memory read error in any other debugger:

WinDbg: Error under WinDbg

CDB: Error under CDB

I encountered this issue when debugging the first application using Qt. The Direct3DCreate9 function was called in the library, and an error occurred, causing the IDE to freeze. I suspected that it might be a problem with the Creator, so I changed the debugger settings from GDB to LLDB. This resolved the freezing issue, but the error still occurred. Pay attention to the call stack - the error originated from the graphics card driver (my graphics card is an RX6600, and the driver is up-to-date). I made sure that Qt Creator wasn't the cause when I got the same memory error in IDA Pro under the "local Windows debugger" and under WinDbg.

I would like to compile using msvc in Qt Creator and debug with available debuggers there. As far as I know, the MVS debugger is only available from Visual Studio. How to deal with this memory error without changing the compiler (I don't know if changing it will help. By the way, I have DirectX bundled with the Windows SDK)? This problem stopped my introduction to Qt at the very beginning. It would also be very interesting to know why this error occurs; how is it possible that it only works under one specific debugger (or without debugging)?

Upvotes: -1

Views: 40

Answers (0)

Related Questions