It's been bugging me for the last couple of weeks. On my computer the game runs fine, on some other computers it crashes in some seemingly unimportant code. After scratching my head for way too long (I hope I'm not going bald because of this!), I got to the root of the error (Thanks for the help Gareth!).
Firstly it was crashing in some DirectX matrix code, namely the D3DX helper library. Why would it crash on every other computer, and work on every other - even with the same input? Because I have an AMD and the crashing computers had Intel. Internally the D3DX library does things differently depending on the platform it runs on. Apparently the Intel version did something different with floating points, and crashed nicely whereas the AMD version didn't mind.
Quite possibly it's my fault, some bug in my code most likely. It's nearly impossible to test it though, I don't have any Intels at home to debug with. Oh well, doing simple matrix mathematics in a completely separate DLL is a bad idea anyway. Even Microsoft admits this, since they're encouraging users to switch over to their new XNAMath library which uses inline code instead of DLL calls. Moving over to XNAMath should fix the problem, since it doesn't have separate code paths for different processors. But honestly, Microsoft could have told me about XNAMath in March, and saved me a couple of weeks.
Update: The problem has been solved, and now the game will happily work on Intel platforms as well.blog comments powered by Disqus