Editor Crashed with "Assertion failed: VTStacks.Num()..."

Summary

So, I recently added an asset pack from FAB into my project and I’ve been moving things around to fit my folder structure and organizational preferences. While do this, I’ve run into an issue where a group of materials has begun to crash my editor anytime I open them or any mesh they’re assigned to. They aren’t used in any levels at the moment. But I can’t even open them to edit them. I’ve tried everything I can think of to try to fix it. This is the exact error it’s giving me:

Assertion failed: VTStacks.Num() == MaterialCompilationOutput.UniformExpressionSet.VTStacks.Num() [File:D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\Materials\HLSLMaterialTranslator.cpp] [Line: 6898]

If I’m reading this right, the file it appears to be referencing seems to be in my D drive for some reason? Which is odd because I don’t have a D drive. I did however copy the entire project over to a flash drive at one point that shows up as D drive when I have it plugged into the computer. But, the project I’m working on isn’t the one that’s located on that flash drive. And that drive isn’t even plugged in while I’m in the project (Although I did try plugging it back in to see if that helped which it didn’t).

I don’t know if any of that has anything to do with the error, I’m just at such a loss on how to fix this error that I figured I’d add that here in case it was relevant. Any help on how I might fix this issue would be greatly appreciated. If worst comes to worst, I will probably have to just reimport the asset pack again, but I don’t want the same thing to happen again if I do.

Please select what you are reporting on:

Creative

What Type of Bug are you experiencing?

Assets

Steps to Reproduce

Unknown steps to reproduce.

Expected Result

Material crashes the editor when anything referencing it is opened in editor.

Observed Result

Material crashes the editor when anything referencing it is opened in editor.

Platform(s)

Windows PC

I’m having the same issue, also from assets imported from FAB. I can’t even open them. It seems to be an issue with virtual textures, but only on some assets. It’s a strange one, and I have not found a solution.
EDIT:
@Meganaught, did you use the engine converter for virtual textures? seems that is causing the issue, I have made my own material and deleted/replaced the original one, and it seems to be working now.

I am also experimenting the exact same bug. I still dont know how to fix it.

I can reproduce this semi-reliably in multiple projects on different version (5.4 and 5.6).

It appears if the editor crashes (in my case during heavy asset migrations) it corrupts assets or materials related to virtual textures. Downgrading to Directx11 makes loading levels and materials that are corrupt work again. Same with disabling Virtual Textures.

But I haven’t found any way to get it working with Directx 12 and Virtual Textures enabled after the corruption has happened.

This has happened on some small one-off tests I did with City Sample demo project and it’s related plugins (City Sample: Crowds and Buildings) so I haven’t had source control enabled but I will test with source control enabled to check if I can identify the corrupted assets and just revert them in git.

I ran into this today with the Stack O Bot sample, and fixed it.

I installed the project from Fab and migrated all the assets to my own project. Then I moved all of the assets into another folder. After that, opening any of the levels crashed the editor with VTStacks.Num() == MaterialCompilationOutput.UniformExpressionSet.VTStacks.Num() [File:D:\build\++UE5\Sync\Engine\Source\Runtime\Engine\Private\Materials\HLSLMaterialTranslator.cpp] [Line: 7184].

This post led me to look at materials. I found that M_BotBase crashed the editor. I then migrated all the assets from the original project again, and then I was able to open the M_BotBase that I had moved. It was referencing some textures and a data table but all the references showed with the correct new path. But I hit Apply and saved it, closed the editor, removed the original assets, launched the editor, and I was still able to open M_BotBase.

There were two other materials that had the same problem. After fixing those the same way, I was able to open all the levels.

Encountered this bug too.

Simplest solution is to clear the cache in Zen Server via the dashboard.

You’ll have to recompile all your shaders, not just the corrupted ones, but well…

1 Like

This topic was automatically closed after 180 days. New replies are no longer allowed.