Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

[Crash] Substance Unreal 5.5 Plugin crashes when removing a texture input (fix included in thread)

New Here ,
Jun 24, 2025 Jun 24, 2025

Hello! I've recently come across a crash in the Unreal 5.5 substance plugin, 100% reproducible

 

  1. Create a new Substance Graph Instance WITHOUT creating a material instance
  2. Open the Graph instance and disable any texture output parameter
  3. Unreal editor will crash due to a nullptr reference

 

I was looking through the plugin source code and the fix is very simple 

Inside the file Plugins/External/Marketplace/Substance/Source/SubstanceEditor/Private/SSubstanceEditorPanel.cpp line 786 Graph->ConstantCreatedMaterial is not being checked before being accessed

 

auto mat = Graph->ConstantCreatedMaterial;
for (int i = 0; i < mat->TextureParameterValues.Num(); i++)
{
	if (mat->TextureParameterValues[i].ParameterInfo == OutputData->ParamInfo)
	{
		mat->TextureParameterValues.RemoveAt(i);
		break;
	}
}
mat->PostEditChange();


Should be wrapped in a null check i.e

auto mat = Graph->ConstantCreatedMaterial;
if (mat)
{
	for (int i = 0; i < mat->TextureParameterValues.Num(); i++)
	{
		if (mat->TextureParameterValues[i].ParameterInfo == OutputData->ParamInfo)
		{
			mat->TextureParameterValues.RemoveAt(i);
			break;
		}
	}
	mat->PostEditChange();
}



I've fixed this locally but hope this can be fixed for everybody!

Bug Unresolved
TOPICS
Bugs & Crashes , Discussion , UE4
83
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation