AccessViolationException
I'm having some trouble getting my Managed DirectX game to run on lower quality graphics cards (it's fairly basic 2D using orthographic projection, so it ought to be able to). The problem is that at times when I'm loading and unloading resources, an AccessViolationException is thrown from within Direct3D, usually inside VertexBuffer.Dispose() - the root of the call stack is presumably the garbage collector. It's unpredictable exactly when it will happen, but it's bound to if you play a few levels. Problem is, that's all the info I have, and I don't know how to approach this to get more info to figure out what went wrong. Last time this happened, it turned out after days of searching that I was using 16 bit indices in my index buffers, which a lot of video cards don't support, but I basically found that through guess and check.
If anyone has any leads on this for me - what kind of mistakes commonly cause this type of exception, what it actually means, debugging techniques I might try - I would appreciate it very much.
If you've got the DirectX SDK installed on the machines with the low quality cards, have you tried turning on the Direct3D Debug Runtime and watching the messages that it puts out? There's information on how to do this in the Forum FAQ; there might be something useful in it all, for example using an unsupported index buffer format should have shown up immediately.
Ok, now I feel dumb for not knowing about this :) I always thought you needed to be able to do unmanaged debugging or something that I couldn't because I only have Visual C# to get this working right...I'm pretty sure I can't get all the same debugging info as everyone else, but just switching to debug mode makes DX actually speak up when I'm doing something wrong instead of just letting it slip until memory gets corrupted. Thanks :)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement