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

Unreal crashes when loading another level if a factory is referenced in a blueprint

New Here ,
Dec 22, 2021 Dec 22, 2021

Copy link to clipboard

Copied

Hey guys,
I'm working on a project where I create dynamic materials from a Substance Factory and make the exposed parameters accessible via Blueprint variables. For this I have built a function that I can use either in the construction script or the event graph to set the materials.

 

DynamicSubstanceMaterial_1.png

 

 

 

 

 

 

 

DynamicSubstanceMaterial_2.png

 

The problem is that as soon as I reference the factory in the blueprint and load another level, Unreal crashes. Depending on how complex the material is, Unreal already crashes when compiling the blueprint.

I have built an extra scene to replicate this problem and can provide it if needed.

 

The log indicates that the garbage collection cannot clean everything when loading the new level, because the blueprint holds a reference to the factory. Is this a known problem and if so, are there best practices for creating dynamic materials and referencing substance files?

 

UE4 4.27.2

Substance Plugin 4.27.0.1

 

Excerpt from the log:

[2021.12.22-10.28.40:673][361]LightingResults: New page: Lighting Build
[2021.12.22-10.28.40:677][361]LogUObjectHash: Compacting FUObjectHashTables data took 0.72ms
[2021.12.22-10.28.40:713][361]LogReferenceChain: (standalone) SubstanceInstanceFactory /Game/Materials/Plastic_ClearAndNoise/Plastic_ClearAndNoise.Plastic_ClearAndNoise->mGraphInstances
[2021.12.22-10.28.40:713][361]LogReferenceChain: SubstanceGraphInstance /Game/Maps/DynamicMats_Main.DynamicMats_Main:PersistentLevel.BP_Cube2.Plastic_Graph_INST->Outer
[2021.12.22-10.28.40:713][361]LogReferenceChain: BP_Cube_C /Game/Maps/DynamicMats_Main.DynamicMats_Main:PersistentLevel.BP_Cube2->Outer
[2021.12.22-10.28.40:713][361]LogReferenceChain: Level /Game/Maps/DynamicMats_Main.DynamicMats_Main:PersistentLevel->Outer
[2021.12.22-10.28.40:713][361]LogReferenceChain: World /Game/Maps/DynamicMats_Main.DynamicMats_Main
[2021.12.22-10.28.40:713][361]LogReferenceChain:
[2021.12.22-10.28.40:713][361]LogEditorServer: Error: Old world /Game/Maps/DynamicMats_Main.DynamicMats_Main not cleaned up by garbage collection while loading new map! Referenced by:
(standalone) SubstanceInstanceFactory /Game/Materials/Plastic_ClearAndNoise/Plastic_ClearAndNoise.Plastic_ClearAndNoise->mGraphInstances
SubstanceGraphInstance /Game/Maps/DynamicMats_Main.DynamicMats_Main:PersistentLevel.BP_Cube2.Plastic_Graph_INST->Outer
BP_Cube_C /Game/Maps/DynamicMats_Main.DynamicMats_Main:PersistentLevel.BP_Cube2->Outer
Level /Game/Maps/DynamicMats_Main.DynamicMats_Main:PersistentLevel->Outer
World /Game/Maps/DynamicMats_Main.DynamicMats_Main
[2021.12.22-10.28.40:749][361]LogReferenceChain: (standalone) SubstanceInstanceFactory /Game/Materials/Plastic_ClearAndNoise/Plastic_ClearAndNoise.Plastic_ClearAndNoise->mGraphInstances
[2021.12.22-10.28.40:749][361]LogReferenceChain: SubstanceGraphInstance /Game/Maps/DynamicMats_Main.DynamicMats_Main:PersistentLevel.BP_Cube2.Plastic_Graph_INST->Outer
[2021.12.22-10.28.40:749][361]LogReferenceChain: BP_Cube_C /Game/Maps/DynamicMats_Main.DynamicMats_Main:PersistentLevel.BP_Cube2->Outer
[2021.12.22-10.28.40:749][361]LogReferenceChain: Level /Game/Maps/DynamicMats_Main.DynamicMats_Main:PersistentLevel->Outer
[2021.12.22-10.28.40:749][361]LogReferenceChain: World /Game/Maps/DynamicMats_Main.DynamicMats_Main->Outer
[2021.12.22-10.28.40:749][361]LogReferenceChain: Package /Game/Maps/DynamicMats_Main
[2021.12.22-10.28.40:749][361]LogReferenceChain:
[2021.12.22-10.28.40:749][361]LogEditorServer: Error: Old level package /Game/Maps/DynamicMats_Main not cleaned up by garbage collection while loading new map! Referenced by:
(standalone) SubstanceInstanceFactory /Game/Materials/Plastic_ClearAndNoise/Plastic_ClearAndNoise.Plastic_ClearAndNoise->mGraphInstances
SubstanceGraphInstance /Game/Maps/DynamicMats_Main.DynamicMats_Main:PersistentLevel.BP_Cube2.Plastic_Graph_INST->Outer
BP_Cube_C /Game/Maps/DynamicMats_Main.DynamicMats_Main:PersistentLevel.BP_Cube2->Outer
Level /Game/Maps/DynamicMats_Main.DynamicMats_Main:PersistentLevel->Outer
World /Game/Maps/DynamicMats_Main.DynamicMats_Main->Outer
Package /Game/Maps/DynamicMats_Main

TOPICS
Bugs & Crashes , UE4

Views

131

Translate

Translate

Report

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
Resources
Documentation
Download Latest Versions