Vista ATI/AMD crash with CD3D9Driver::reset()

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
devonsoft
Posts: 8
Joined: Thu Oct 04, 2012 2:01 am

Vista ATI/AMD crash with CD3D9Driver::reset()

Post by devonsoft »

So this is a rare bug, probably an ATI driver bug, but we were having a lot of vista testers and gog.com report that our game didn't run on vista. Virtual Box and Nvidia cards/drivers don't seem to reproduce this issue from our tests but ATI cards on vista using the windows update driver do (testing non windows update ati drivers shortly).

The issue is when antialiasing is enabled AND the resolution is set to non desktop resolution AND you have created a fullscreen dx9 device CD3D9Driver::reset(), HRESULT hr = pID3DDevice->Reset(&present); returns E_FAIL (the least helpful of errors). this causes Irrlicht to crash a few lines down at DepthBuffers[0]->Surface->GetDesc(&desc); or if I return on failure right away, the next time you try and draw or use the driver. Starting the device at the desktop resolution or setting anti aliasing to 0 before creating the dx9 device on vista will work fine. OpenGL also works fine. This doesn't seem to happen on Windows 7 real ati drivers (need to test windows update drivers), but may also affect Windows XP.

For now in CIrrDeviceWin32 constructor I have just disabled the resize if we are creating a fullscreen device:

// make sure everything gets updated to the real sizes
if (!CreationParams.Fullscreen)
Resized = true;

which fixes the problem, but I'm not entirely sure what the initial resize is for, although I haven't noticed any side effects (although we are not allowing window resizing unless you restart the device currently). What am I potentially causing by not making sure everything gets updated to the real sizes? Is there a better solution? I am not a Windows API or DirectX expert by any means.

BTW Octodad: Dadliest Catch releases on Steam thursday! luthyr and I are excited to have our Irrlicht game up on Steam.
Nadro
Posts: 1648
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Re: Vista ATI/AMD crash with CD3D9Driver::reset()

Post by Nadro »

As I know drivers from Windows Update are really bad, no OpenGL, bad performance etc. It'll be good too check if standard Catalyst drivers works properly.

BTW. Congratulations for release your game on Steam! :)
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
Post Reply