I was using MonoGame 3.5.0.1122 and now I have upgraded to the latest official version 3.5.1. Unfortunately in my game project, where I have about 300 FBX models, 15 fails to be compiled now, I am receiving an “Processor ‘TextureProcessor’ had an unexpected failure” error message. With the previous version I had, all was working perfectly fine. Actually in the last 1 year, I always had the 3.5 from the build server and never had this issue. Does anyone have a guess what is the problem here?
C:/Users/zolta/Desktop/AegeusPorts/WindowsUniversal/Aegeus/Aegeus/Content/uni_troop.fbx
C:/Users/zolta/Desktop/AegeusPorts/WindowsUniversal/Aegeus/Aegeus/Content/Nevy_element0_top.jpg
C:/Users/zolta/Desktop/AegeusPorts/WindowsUniversal/Aegeus/Aegeus/Content/Nevy_element1_bottom.jpg
Could not convert texture. System.NullReferenceException: Object reference not set to an instance of an object.
at Nvidia.TextureTools.Compressor.nvttCompress(IntPtr compressor, IntPtr inputOptions, IntPtr compressionOptions, IntPtr outputOptions)
at Microsoft.Xna.Framework.Content.Pipeline.Graphics.DxtBitmapContent.TryCopyFrom(BitmapContent sourceBitmap, Rectangle sourceRegion, Rectangle destinationRegion)
at Microsoft.Xna.Framework.Content.Pipeline.Graphics.BitmapContent.Copy(BitmapContent sourceBitmap, Rectangle sourceRegion, BitmapContent destinationBitmap, Rectangle destinationRegion)
at Microsoft.Xna.Framework.Content.Pipeline.Graphics.BitmapContent.Copy(BitmapContent sourceBitmap, BitmapContent destinationBitmap)
at Microsoft.Xna.Framework.Content.Pipeline.Graphics.GraphicsUtil.Compress(Type targetType, TextureContent content, Boolean generateMipMaps)
at Microsoft.Xna.Framework.Content.Pipeline.Processors.TextureProcessor.Process(TextureContent input, ContentProcessorContext context)
C:/Users/zolta/Desktop/AegeusPorts/WindowsUniversal/Aegeus/Aegeus/Content/uni_troop.fbx: error: Processor ‘TextureProcessor’ had unexpected failure!
System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.Xna.Framework.Content.Pipeline.Processors.TextureProcessor.Process(TextureContent input, ContentProcessorContext context)
at Microsoft.Xna.Framework.Content.Pipeline.ContentProcessor`2.Microsoft.Xna.Framework.Content.Pipeline.IContentProcessor.Process(Object input, ContentProcessorContext context)
at MonoGame.Framework.Content.Pipeline.Builder.PipelineManager.ProcessContent(PipelineBuildEvent pipelineEvent)
@Zoltan_Ferenczfi@Peter_Kaegi
Can you reproduce the errors or it goes away when you rebuild the project?
I have seen the error from time to time, not always for the same texture.
I’m getting this error too, wanted to check if anyone has any fixes or workarounds. I find that on most textures it goes away if I build the project again. If I repeatedly build the project it eventually gets down to just 4 textures (referenced from .fbx model files) but those 4 just keep failing.
Eh, I just tried creating a new mgcb project file as a test, and putting just that fbx and its textures in it. And of course… it’s fine. Seems it only fails when it’s part of my larger project file with all my other assets in it.
Yep. If you’re interested in debugging it and you don’t have any test cases yourself I guess I could try sending you my entire content project? Or maybe a subset of it would be enough (like all the textures).
Right now my workaround is to simply disable Dxt compression, but I can’t ship like that.
I don’t know enough about this stuff to do anything about it, and it seems like a difficult problem. I thought it was an issue with the model processor, but this is way over my head. You can try to build in smaller batches, that seems to do the trick.