Failed to build....Error relating to skeletal mesh or whatever but all looks fine....

So I have been fighting this for several days now just trying to get my game’s patch out and for whatever reason it keeps failing because of this specific error:

“Ensure condition failed: Materials.IsValidIndex(Section.MaterialIndex) [File:D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\SkeletalMeshLODModel.cpp] [Line: 1499]”

I have looked at every single skeletal mesh, all of them have materials and materials on the LODs. All of them are correctly indexed so idk what this is or how to figure out what it actually causing it. I had 2 meshes with screwed up materials and deleted those but that didn’t resolve it either. After looking it up, literally no info on how to resolve it other than “delete the asset causing the problem” which is completely unknown since it doesn’t specify what one is doing it…so that doesn’t help at all.

Can someone please help me resolve this problem by helping me locate it somehow…I can’t find whatever the problem is for the life of me and have been at this for days with no results…Game dev for ya huh lol, get a patch set up to fix things broken only to break unknown things…I recently updated to 5.4 from 5.1 and it caused so many issues I had to go through and fix but it’s worth it in the end because performance is so much better now. I just need this one issue resolved and I can finally publish the patc to steam and be done with this hassle lol.

Hello there @LuminiaVR! Let’s try to figure this one out.

Since you have recently migrated to a new version of UE, rendering settings from the previous build/version could be causing a conflict. In order to reset them, please search for DefaultGame.ini file, open it with a notepad, and delete all settings under the header [/Script/Engine.RendererSettings]

The next step here would be to remove and reinstall any mesh packs that you have recently added to your UE, to ensure all elements are in sync when packing.

Finally, if the issue persists, check for any blueprints related to the affected model, as even a node with a wrong call could be causing the issue. Hope this helps!

So I checked the defaultgame.ini for the project, and there isn’t anything with that name anywhere inside of the file? Where is this supposed to be located if not in the project itself? It shows generalprojectsettings and projectpackagingsettings and nothing else in terms of categories in the file. I don’t think this is the right defaultgame.ini lol. It doesn’t seem to have anything relating to rendering.

As for finding the effected model, that’s the main problem. It doesn’t say what the model is and I’ve checked all of the existing models in the project and none have any errors. That goes for any references to those models on blueprints and stuff too. I found only 2 models that had screwy materials and I deleted both with all references to them so they shouldn’t be a problem and it doesn’t seem like either was the specific one causing the error as it continuesto persist.

Edit: found the file in question, did as you suggested and no change. It just screwed up all the light settings and didn’t resolve the error so I changed it back. Back to square one x.x

Hello again!

Thanks for testing, we can rule out settings migration conflicts. Yet the issue seems locked into a faulty element inside your game.

To ensure no other setting shenanigans are affecting us here, could you setup a build on a fresh project? Just minimal elements, could use tutorial or sample assets. The idea is to ensure that the build problem does not trigger on other projects.