XNA and 3D Model Exporting

Here's an important safety tip that I wish I knew before the 4 hours I wasted on figuring it out.

When building a model in 3D Studio Max (or likely every other modeling package in the universe), and then exporting it to a DirectX .X file via the Pandasoft X file exporter or kilowatt X file exporter plugins, ensure that the model has no meshes named with a space or period (or likely other characters).  This will cause the XNA importer and DirectX Viewer (or likely every other .X file importer in the universe) to fail with a very informative error like "Parser error" with no further information.

We had a model that was working great.  My artist decided to tweak some things and add some new meshes, at which point the new version of the model stopped working.  At first we blamed it on the new parts that were added, then textures, then the exporter, then....who knows.

Finally, after exporting the original model as a .X and the new model as a .X and comparing, I found that the mesh names that had spaces in them were not being exported correctly.  One area would reference the name with an underscore, and another would have the actual space character.  Fixing the names in 3D Studio Max and then exporting again fixed everything.