picture

DriverInvalidCallException.

DriverInvalidCallException is one of those Microsoft splendid documented classes, that drive a developer mad. How do you like this msdn explanation: “The driver reports that the current method call is invalid.”?! Oh yeah, this is really useful.

I’ve got this exception using DirectX on a PDA, trying to load a texture by TextureLoader.FromStream(dev,…) The same affect was achieved using TextureLoader.FromFile(dev, “fileName.png”). The exception came not every time during the execution, but rather sporadically. The device was absolutely ok all the time.

The real reason for DriverInvalidCallException in my case was the lack of memory. Notwithsdanging there was still enough programm memory (more than 10mb), data memory was almost full (only 1mb free). After cleaning the data space, the exception dissapeared. Hope this posting could help you.

Leave a Reply

You must be logged in to post a comment.