Can not create Direct3D device

Started by
20 comments, last by computergeek101234 15 years, 3 months ago
Quote:Original post by computergeek101234
Okay. Here it is.

Direct3D9: (ERROR) :Invalid value for BackBufferFormat. ValidatePresentParameters fails.

I have the back buffer format set to D3DFMT_UNKNOWN. I already tried changing it to D3DFMT_X8R8G8B8. Does that help?
D3DFMT_UNKNOWN is only valid for windowed mode, where it means "Use the desktop format". In fullscreen mode you need to set a valid format. D3DFMT_X8R8G8B8 should be fine if your graphics card can do 32-bit (Which it should). Alternatively, use IDirect3D9::GetAdapterDisplayMode to get the desktop format, and use that.
Advertisement
Sorry it took me so long to see this:

Quote:Original post by Evil SteveCan you run any D3D apps or SDK samples?


The answer is no. I've tried millions of times to run the sdk apps. As far as D3D apps, I don't know.

Also, I don't get the "Direct3D9: (ERROR) :Invalid value for BackBufferFormat. ValidatePresentParameters fails." error anymore. But the program still shutdowns down and tells me "Error creating Direct3D device".
Quote:Original post by computergeek101234
The answer is no. I've tried millions of times to run the sdk apps. As far as D3D apps, I don't know.

Also, I don't get the "Direct3D9: (ERROR) :Invalid value for BackBufferFormat. ValidatePresentParameters fails." error anymore. But the program still shutdowns down and tells me "Error creating Direct3D device".
What's the new debug output?

It still sounds to me like missing drivers, or are running in safe mode / via remote desktop. Have you tried getting the latest drivers for your graphics card?
Okay. Here is the new debug output:

'd3d_windowed.exe': Loaded 'C:\Documents and Settings\Kenneth\My Documents\Visual Studio 2008\Projects\d3d_windowed\Debug\d3d_windowed.exe', Symbols loaded.
'd3d_windowed.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll'
'd3d_windowed.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll'
'd3d_windowed.exe': Loaded 'C:\WINDOWS\system32\d3d9.dll'
'd3d_windowed.exe': Loaded 'C:\WINDOWS\system32\d3d8thk.dll'
'd3d_windowed.exe': Loaded 'C:\WINDOWS\system32\gdi32.dll'
'd3d_windowed.exe': Loaded 'C:\WINDOWS\system32\user32.dll'
'd3d_windowed.exe': Loaded 'C:\WINDOWS\system32\msvcrt.dll'
'd3d_windowed.exe': Loaded 'C:\WINDOWS\system32\advapi32.dll'
'd3d_windowed.exe': Loaded 'C:\WINDOWS\system32\rpcrt4.dll'
'd3d_windowed.exe': Loaded 'C:\WINDOWS\system32\version.dll'
'd3d_windowed.exe': Loaded 'C:\WINDOWS\system32\winmm.dll'
'd3d_windowed.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC90.DebugCRT_1fc8b3b9a1e18e3b_9.0.30729.1_x-ww_f863c71f\msvcr90d.dll'
'd3d_windowed.exe': Loaded 'C:\WINDOWS\system32\imm32.dll'
'd3d_windowed.exe': Loaded 'C:\WINDOWS\system32\lpk.dll'
'd3d_windowed.exe': Loaded 'C:\WINDOWS\system32\usp10.dll'
'd3d_windowed.exe': Loaded 'C:\WINDOWS\system32\uxtheme.dll'
'd3d_windowed.exe': Loaded 'C:\WINDOWS\system32\msctf.dll'
'd3d_windowed.exe': Loaded 'C:\WINDOWS\system32\msctfime.ime'
'd3d_windowed.exe': Loaded 'C:\WINDOWS\system32\ole32.dll'
'd3d_windowed.exe': Loaded 'C:\Program Files\MarkAny\ContentSafer\MaCSProHook.dll', Binary was not built with debug information.
'd3d_windowed.exe': Loaded 'C:\WINDOWS\system32\winspool.drv'
'd3d_windowed.exe': Loaded 'C:\WINDOWS\system32\comctl32.dll'
'd3d_windowed.exe': Loaded 'C:\WINDOWS\system32\shlwapi.dll'
Starting.......'d3d_windowed.exe': Loaded 'C:\WINDOWS\system32\Hook.dll', Binary was not built with debug information.
'd3d_windowed.exe': Loaded 'C:\WINDOWS\system32\mapi32.dll'
'd3d_windowed.exe': Loaded 'C:\WINDOWS\system32\d3d9d.dll'
'd3d_windowed.exe': Loaded 'C:\WINDOWS\system32\d3dx9d_30.dll'
Direct3D9: :====> ENTER: DLLMAIN(00c9d6e0): Process Attach: 0000071c, tid=00000248
Direct3D9: :====> EXIT: DLLMAIN(00c9d6e0): Process Attach: 0000071c
Direct3D9: (INFO) :Direct3D9 Debug Runtime selected.
Direct3D9: (WARN) :driver set D3DDEVCAPS_TEXTURENONLOCALVIDMEM w/o DDCAPS2_NONLOCALVIDMEM:turning off D3DDEVCAPS_TEXTURENONLOCALVIDMEM
D3D9 Helper: Enhanced D3DDebugging disabled; Application was not compiled with D3D_DEBUG_INFO
Direct3D9: (WARN) :driver set D3DDEVCAPS_TEXTURENONLOCALVIDMEM w/o DDCAPS2_NONLOCALVIDMEM:turning off D3DDEVCAPS_TEXTURENONLOCALVIDMEM
Direct3D9: :====> ENTER: DLLMAIN(00c9d6e0): Process Detach 0000071c, tid=00000248
Direct3D9: (INFO) :MemFini!
Direct3D9: (WARN) :Memory still allocated! Alloc count = 3
Direct3D9: (WARN) :Current Process (pid) = 0000071c
Direct3D9: (WARN) :Memory Address: 00536ee0 lAllocID=1 dwSize=000047f8, (pid=0000071c)
Direct3D9: (WARN) : Stack Back Trace
Direct3D9: (ERROR) : [0] : Address 00C9D4CB
Direct3D9: (ERROR) : [1] : Address 00C9D59B
Direct3D9: (ERROR) : [2] : Address 00C9D440
Direct3D9: (ERROR) : [3] : Address 00C91D44
Direct3D9: (ERROR) : [4] : Address 4FDFAF2E
Direct3D9: (ERROR) : [5] : Address 004118D4
Direct3D9: (ERROR) : [6] : Address 00411702
Direct3D9: (ERROR) : [7] : Address 00412C58
Direct3D9: (ERROR) : [8] : Address 004129BF
Direct3D9: (ERROR) : [9] : Address 7C816D4F
Direct3D9: (ERROR) : [10] : Address 00000000
Direct3D9: (ERROR) : [11] : Address 00000000
Direct3D9: (ERROR) : [12] : Address 00000000
Direct3D9: (ERROR) : [13] : Address 00000000
Direct3D9: (ERROR) : [14] : Address 00000000
Direct3D9: (ERROR) : [15] : Address 00000000
Direct3D9: (WARN) :Memory Address: 008429c8 lAllocID=8 dwSize=00000360, (pid=0000071c)
Direct3D9: (WARN) : Stack Back Trace
Direct3D9: (ERROR) : [0] : Address 00C94064
Direct3D9: (ERROR) : [1] : Address 00C94E4F
Direct3D9: (ERROR) : [2] : Address 00C95588
Direct3D9: (ERROR) : [3] : Address 00C91D65
Direct3D9: (ERROR) : [4] : Address 4FDFAF2E
Direct3D9: (ERROR) : [5] : Address 004118D4
Direct3D9: (ERROR) : [6] : Address 00411702
Direct3D9: (ERROR) : [7] : Address 00412C58
Direct3D9: (ERROR) : [8] : Address 004129BF
Direct3D9: (ERROR) : [9] : Address 7C816D4F
Direct3D9: (ERROR) : [10] : Address 00000000
Direct3D9: (ERROR) : [11] : Address 00000000
Direct3D9: (ERROR) : [12] : Address 00000000
Direct3D9: (ERROR) : [13] : Address 00000000
Direct3D9: (ERROR) : [14] : Address 00000000
Direct3D9: (ERROR) : [15] : Address 00000000
Direct3D9: (WARN) :Memory Address: 00842848 lAllocID=9 dwSize=00000120, (pid=0000071c)
Direct3D9: (WARN) : Stack Back Trace
Direct3D9: (ERROR) : [0] : Address 00C9572F
Direct3D9: (ERROR) : [1] : Address 00C91D65
Direct3D9: (ERROR) : [2] : Address 4FDFAF2E
Direct3D9: (ERROR) : [3] : Address 004118D4
Direct3D9: (ERROR) : [4] : Address 00411702
Direct3D9: (ERROR) : [5] : Address 00412C58
Direct3D9: (ERROR) : [6] : Address 004129BF
Direct3D9: (ERROR) : [7] : Address 7C816D4F
Direct3D9: (ERROR) : [8] : Address 00000000
Direct3D9: (ERROR) : [9] : Address 00000000
Direct3D9: (ERROR) : [10] : Address 00000000
Direct3D9: (ERROR) : [11] : Address 00000000
Direct3D9: (ERROR) : [12] : Address 00000000
Direct3D9: (ERROR) : [13] : Address 00000000
Direct3D9: (ERROR) : [14] : Address 00000000
Direct3D9: (ERROR) : [15] : Address 00000000
Direct3D9: (WARN) :Total Memory Unfreed From Current Process = 19576 bytes
Direct3D9: :====> EXIT: DLLMAIN(00c9d6e0): Process Detach 0000071c
The program '[1820] d3d_windowed.exe: Native' has exited with code 0 (0x0).

I hope that isn't a bit too much...

Quote:Original post by Evil Steve
It still sounds to me like missing drivers, or are running in safe mode / via remote desktop. Have you tried getting the latest drivers for your graphics card?


uhh..No, I'm looking for one now. The computer that I am working on is a dinosaur. My newer one is currently down, unfortunately.
Quote:Original post by computergeek101234
Quote:Original post by Evil Steve
It still sounds to me like missing drivers, or are running in safe mode / via remote desktop. Have you tried getting the latest drivers for your graphics card?


uhh..No, I'm looking for one now. The computer that I am working on is a dinosaur. My newer one is currently down, unfortunately.
Ah, that's most likely the problem - it looks like your graphics card can't handle DX9, or can only do 2D. The only time I've ever seen this warning:
Direct3D9: (WARN) :driver set D3DDEVCAPS_TEXTURENONLOCALVIDMEM w/o DDCAPS2_NONLOCALVIDMEM:turning off D3DDEVCAPS_TEXTURENONLOCALVIDMEM
was from my extremely old "Diamond Monster TNT2" graphics card, which was around in ~1998.

What graphics card do you have?
Okay, I think this is the graphics card.

Intel(R) 82810 Graphics Controller
Quote:Original post by computergeek101234
Okay, I think this is the graphics card.

Intel(R) 82810 Graphics Controller
There's a driver download link on Intel's site Here. Although the features list looks pretty bad, and I don't think you'll realistically get anywhere with DX9 and this graphics card (And Intel chipsets are nutoriously bad anyway).
You know what I don't get though? When I run DXDIAG and run tests on direct3d, they all work perfectly fine. Do you by chance know why?
Hmm, looking over the debug output again, there's not actually anything there saying that CreateDevice() failed. Is it actually failing (I.e. is the device pointer NULL after the CreateDevice() call)?

Also, are you running a 24-bit display mode (Control panel -> Display will tell you)? If so, you could try D3DFMT_R8G8B8 as a backbuffer format and see if that works.
Quote:Original post by Evil Steve
Hmm, looking over the debug output again, there's not actually anything there saying that CreateDevice() failed. Is it actually failing (I.e. is the device pointer NULL after the CreateDevice() call)?


Returning null.

Quote:Original post by Evil Steve Also, are you running a 24-bit display mode (Control panel -> Display will tell you)? If so, you could try D3DFMT_R8G8B8 as a backbuffer format and see if that works.


Yes, I'm running a 24-bit, unfortunately.

Okay, tried setting the backbuffer format to D3DFMT_R8G8B8, now i'm getting the "Direct3D9: (ERROR) :Invalid value for BackBufferFormat. ValidatePresentParameters fails." error again.

This topic is closed to new replies.

Advertisement