intermittent E_FAIL upon Present()

Started by
0 comments, last by Squallc 13 years, 10 months ago
My game is experiencing an intermittent E_FAIL upon executing
Present() function call.

Here is the C++/DirectX 9 code.
I am using Visual C++ 2008 Express IDE.
I am using a NVIDIA GeForce9800GT graphics card and Vista OS.

ddrval = m_pd3dDevice->Present(NULL, NULL, NULL, NULL);if (ddrval == D3DERR_DEVICELOST) {	// IDirect3DDevice9::Present will return        // D3DERR_DEVICELOST if the device is either "lost" or "not reset".	m_bDeviceLost = true;}else if (FAILED(ddrval)) {	SetErrorEncountered(true);	continue;}


This only fails about 10% of the time on the first attempt
to execute the Present() call. Failure is marked by a return
value of E_FAIL by Present().
It works correctly the remaining 90% of the time on the first attempt.
It never fails upon second or later Present() calls.
If I run in debug mode, break at the failure and set the current
execution line back to the Present() call, the Present() call will work
correctly when execution resumes.

I am not sure what other info to include here but here are a few settings:
HAL (pure hw vp): NVIDIA GeForce 9800 GT
Windowed_PresentInterval = D3DPRESENT_INTERVAL_IMMEDIATE
DisplayMode.Format = D3DFMT_X8R8G8B8
DisplayMode.Height = DisplayMode().Height1
DisplayMode.Width = DisplayMode().Width1
DisplayMode.RefreshRate = = 60
DepthStencilBufferFormat = = D3DFMT_UNKNOWN
MultisampleType = D3DMULTISAMPLE_NONE
MultisampleQuality = 0
VertexProcessingType = PURE_HARDWARE_VP
AdapterOrdinal = 0
DepthStencilBufferFormat = D3DFMT_UNKNOWN
MultisampleType = D3DMULTISAMPLE_NONE
MultisampleQuality = 0
VertexProcessingType = PURE_HARDWARE_VP
DevType = D3DDEVTYPE_HAL
BackBufferFormat = D3DFMT_X8R8G8B8

Does anybody have any idea what can be happpening?
Or how to proceed in debugging?
Is this a software or hardware issue?

thanks
Advertisement
Try to put DirectX Runtime in debug and watch output for error/warning message from DirectX.

Thanks to Evil Steve for this post on his blog ;)

This topic is closed to new replies.

Advertisement