FBX build problem

I’m trying to build a .FBX file with MGCB and I’m getting this error:

D:/_YAZD2_Copy/TheGame/Content/Player/Guy/Death.fbx: error: Importer ‘FbxImporter’ had unexpected failure!
Assimp.AssimpException: Error importing file: FBX-Parser (TOK_DATA, offset 0x213a54) failed to parse ID, unexpected data type, expected L(ong) (binary)
at Assimp.AssimpContext.ImportFile(String file, PostProcessSteps postProcessFlags)
at Microsoft.Xna.Framework.Content.Pipeline.OpenAssetImporter.Import(String filename, ContentImporterContext context)
at Microsoft.Xna.Framework.Content.Pipeline.ContentImporter`1.Microsoft.Xna.Framework.Content.Pipeline.IContentImporter.Import(String filename, ContentImporterContext context)
at MonoGame.Framework.Content.Pipeline.Builder.PipelineManager.ProcessContent(PipelineBuildEvent pipelineEvent)

The file format is FBX 2013 with skeletal animation and I’ve tried convering with FBX Converter to 2012 and 2011 as well as text/binary and none seem to help (in text format the build process appears to hang instead of giving the error). I’m using MonoGame 3.5.

Any ideas what else can I try? I’ve uploaded the file here in case someone wants to give it a shot.

Have you checked the export settings on your modeling software? I seem to remember there being some settings I had to apply, besides just exporting with a certain file extension. You would have to search info for the specific program you’re using…

Unfortunately this is not an option as those animations were created few years by someone else with software I don’t own (Autodesk Maya) and I also don’t have source files. However they import correctly with XNA and Unity so I think the FBX file should be okay.

Yes, it’s a bug with assimp. Retry a few more times and it get’s build.

ok, that’s probably another bug. Can you give the Text version?
Have you tried the FBX converter by autodesk?

I’ve tried rebuilding multiple times and it didn’t help. Also tried FBX Converter as I mentioned in my first post.

Maybe you should do a forum post asking if you “definately” can use any XNA compatible FXB files with monogame, under all circumstances… I’m really fairly sure I had to some thing on the 3d editor side, specifically for monogame… Though I have to admit I cant remember 100%…

If nothing else, maybe you could re-import in an editor ( I would assume there is some way to do this?), and make the necessary corrections to the export settings.
And then re-export it…

I don’t know, if it works if the fbx contans the mentioned skeletal animation, but you could try importing in blender and exporting as fbx. For me it worked better, than the Autodesk FBX converter, however I didn’t had to export any skeletal animations.

Hi, I would like to know the status of the issue related to FBX parsing errors.

I am using the latest Monogame 3.6 pipeline builder, I’m in the process of porting an old XNA project to monogame, and when compiling several FBX, it fails with “TOK_***” errors, if I build again several times, they disappear, which means, as stated by @nkast , that it’s a random error issue on Assimp.

Given it’s a problem on Assimp and not Monogame, I understand there’s little that can be done; I’ve checked the assimp project and, although it’s getting regular daily updates, the last official stable release is already very old, not mentioning the Assimp.Net wrapper…

My problem is that I am expected to add my project to a continuous integration pipeline, which means the assets will be rebuilt, with high chances of crashing.

My question is… how is people deailing with this problem? is there a hot fix? or just keep rebuilding until all the assets compile?

Sometimes, using fbx converter from autodesk works/fixes the problem, but you need to convert them to ascii format in order to fix paths to textures, then re convert to binary to reduce the size.

Same problem here, i need to use continuous integration as well, i am just going to try building 10 times in a row, if failed then i will consider the build failed. However, this is not a great solution and its a real pain so i hope a solution comes soon!

Extra info: i build >400 assets with different formats (i tried lots of different fbx version/exports with no difference) so 10 builds might not even be enough and it takes a lot of time, building more means more load on the build server and delays in overall build time wich is something i would like to prevent

So if someone knows a better solution, please do tell!!

You can help in fixing this issue by building the latest stable version of assimp and sending a pull request that updates the dll’s to the MonoGame dependencies repo.

I thought assimp didn’t have a stable version in ages?

It did, but they didn’t include binaries.