InvalidCallException from Microsoft.DirectX.Direct3D.Device.Clear

I ran into a puzzling bug and wanted to see if  anyone else has run into a similar problem.

I'm using the October SDK.  On most machines, the exception never gets thrown.  On a few select machines however, I will get an unhandled exception of type "Microsoft.DirectX.Direct3D.InvalidCallException".  Looking this up in the docs, it mentions that if the ZBuffer or stencil buffer flags are passed in and the zbuffer or stencil buffer doesn't exist, you will get this exception.  However, I'm not passing in either of those flags because I didn't create a stencil buffer.

The strange part is that it only happens on a select few machines that have the same setup as the rest of the machines (same video card, same drivers, oct SDK, etc.).  I've also tried allocating a stencil buffer (even though it's not needed in our program), but received the same crash.

 

Has anyone come across something like this or know what the solution is   Thanks.



Answer this question

InvalidCallException from Microsoft.DirectX.Direct3D.Device.Clear

  • The Goat

    How exactly do you specify retail versus debug mode in DirectX SDK

  • prakjal

    Not really a solution, we're still looking for an actual solution if anyone has one.  This only happens if your'e running DirectX in debug mode and not in retail mode, so we're still looking for the solution to this.
  • Swami Pete

    Nevermind!  We figured out it a solution/work around to this.
  • KAK

    go to start --> control panel

    double click the DirectX icon

    One one of the tabs, there should be a radio button to choose between retail and debug.


  • Billie Jo Smith - MSFT

    Might help others if you shared the workaround....

  • InvalidCallException from Microsoft.DirectX.Direct3D.Device.Clear