Author Topic: Substance Plugin Crashes Fresh Unity URP Project Copy  (Read 406 times)

Hi!

Substance Plugin is causing Unity to crash when opening project copies freshly downloaded from VCS.
The problem only happens during the first import of the project and as a workaround we are removing Allegorithmic's plugin folder from project during the first import and adding it again after unity successfully starts for the first time.

The problem can be reproduced on Unity 2020.1 beta and Unity 2019.4 LTS (we did not test older versions) under windows 10 (happened consistently on different machines).

I've noticed that the problem only happens when certain .sbsar materials are added to the project but couldn't pin point which exactly materials were causing the problem.

How to reproduce:

  • Create a new project with the URP template.
  • Add add substance plugin from the asset store.
  • Add several .sbsar files to the project (below is the list of materials used on our project).
  • Close Unity and delete the Library folder (that is tipically ignored by version control systems).
  • Open the project again.

List of materials used:

Quote
plaster_float.sbsar
cast_concrete_blocks_line.sbsar
cast_concrete_wall_blocks.sbsar
concrete_plain_brushed.sbsar
concrete_raw_panels.sbsar
concrete_slats.sbsar
concrete_spotted.sbsar
umbrella_concrete_tiles.sbsar
carpet_curly_leaks_pattern.sbsar
carpet_curly_maze_pattern.sbsar
carpet_curly_vertical_lines.sbsar
carpet_dense_gradient_pattern.sbsar
carpet_short_cut_chainmail_pattern.sbsar
carpet_short_cut_diamond_pattern.sbsar
stylized_cotton_skirt.sbsar
weave_in_striped_knit.sbsar
grass_countryside.sbsar
loose_dirt.sbsar
thick_waterlogged_mud.sbsar
etowah_marble.sbsar
granite_white_princess.sbsar
kashmir_white_granite.sbsar
marble_light_green.sbsar
,546 marble_new_emperador_dark.sbsar
nero_marquina_marble.sbsar
pavonazzo_marble.sbsar
st_cecilia_granite.sbsar
yule_marble.sbsar
aluminium_patinated.sbsar
aluminium_perforated_hexagon.sbsar
aluminium_perforated_swiss_mesh.sbsar
aluminium_perforated_triangle.sbsar
aluminium_scratched.sbsar
curtain_wall_trifractal_panels.sbsar
rectangle_curtain_wall_panel.sbsar
steel_galvanized.sbsar
,016 plate_hatch_inner_side.sbsar
sci_fi_storage_unit_wall.sbsar
space_station_outer_panel.sbsar
bricks_enamel_combined.sbsar
carrara_grid_tiles.sbsar
ceramic_mozaic_tiles.sbsar
ceramic_tiles_green.sbsar
macael_marble_grid_tiles.sbsar
natural_terrazzo_flagstone_tiles.sbsar
random_terrazzo_inserts.sbsar
slate_floor_tile.sbsar
small_terrazzo_grid_tiles.sbsar
wall_tile_unstuck.sbsar
yule_marble_grid_tiles.sbsar
window_plastic_border.sbsar
black_koto_quarter_cut.sbsar
cork_natural.sbsar
parquet_echelle.sbsar
parquet_wood_mahogany.sbsar
tulipwood_quarter_cut.sbsar
wood_beech_honey.sbsar
wood_paldao.sbsar

Expected behavior:

Unity should recreate the Library folder and successfully reimport all assets from the project.

What happens:

Unity crashes with the following log (full log attached to the thread):

Code: [Select]
(Filename: C:\buildslave\unity\build\Modules/AssetPipelineEditor/Public/ScriptedImporter.cpp Line: 219)

AssetImporter is referencing an asset from the previous import. This should not happen.
(Filename: C:\buildslave\unity\build\Modules/AssetDatabase/Editor/V2/ImportAsset.cpp Line: 1005)

AssetImporter is referencing an asset from the previous import. This should not happen.
(Filename: C:\buildslave\unity\build\Modules/AssetDatabase/Editor/V2/ImportAsset.cpp Line: 1005)

AssetImporter is referencing an asset from the previous import. This should not happen.
(Filename: C:\buildslave\unity\build\Modules/AssetDatabase/Editor/V2/ImportAsset.cpp Line: 1005)

AssetImporter is referencing an asset from the previous import. This should not happen.
(Filename: C:\buildslave\unity\build\Modules/AssetDatabase/Editor/V2/ImportAsset.cpp Line: 1005)

Done importing asset: 'Assets/Materials/Substance Source/Wood/black_koto_quarter_cut.sbsar' (target hash: 'a6a8d21c814a1abb48d756e09b6986df') in 0.435649 seconds
Start importing Assets/Materials/Substance Source/Concrete/cast_concrete_blocks_line.sbsar using Guid(104611e02f9fa954ca91e07e50116c54) Importer(-1,00000000000000000000000000000000)
Crash!!!
SymInit: Symbol-SearchPath: 'D:/Software/Unity/2019.4.1f1/Editor/Data/Mono;.;D:\Workspace\TestProjects\SubstanceURPTest;D:\Software\Unity\2019.4.1f1\Editor;C:\WINDOWS;C:\WINDOWS\system32;SRV*C:\websymbols*http://msdl.microsoft.com/download/symbols;', symOptions: 534, UserName: 'Garrafote'

[[ dll dump cropped out unclutter this thread post ]]

========== OUTPUTTING STACK TRACE ==================
0x00007FFC6EB3A799 (KERNELBASE) RaiseException
0x00007FFC60076210 (VCRUNTIME140) CxxThrowException
0x00007FFC5FFE398E (MSVCP140) std::_Throw_Cpp_error
0x00007FFC5FFE3929 (MSVCP140) std::_Throw_C_error
0x00007FFC08D8006B (Substance.Engine) cppShutdownSubstance
0x00000186C7E95C0E (Mono JIT Code) (wrapper managed-to-native) object:wrapper_native_00007FFC08D75310 ()
0x00000186C7E95A88 (Mono JIT Code) [D:\Workspace\TestProjects\SubstanceURPTest\Assets\Allegorithmic\Plugins\Substance.Platform\NativeFunctions.cs:864] Substance.Platform.NativeFunctions:cppProcessQueuedOutputs ()
0x00000186C7E9566B (Mono JIT Code) Substance.Game.NativeCallbacks/Renderer:ProcessJobs ()
0x00000186C7E78F63 (Mono JIT Code) Substance.Game.NativeCallbacks/Renderer:Flush ()
0x00000186C7E741EB (Mono JIT Code) Substance.Editor.SubstanceImporter:OnImportAsset (UnityEditor.Experimental.AssetImporters.AssetImportContext)
0x00000186C7E73F15 (Mono JIT Code) UnityEditor.Experimental.AssetImporters.ScriptedImporter:GenerateAssetData (UnityEditor.Experimental.AssetImporters.AssetImportContext)
0x00000186BF7DA3D6 (Mono JIT Code) (wrapper runtime-invoke) <Module>:runtime_invoke_void__this___object (object,intptr,intptr,intptr)
0x00007FFBEE29D660 (mono-2.0-bdwgc) [c:\build\output\unity-technologies\mono\mono\mini\mini-runtime.c:2809] mono_jit_runtime_invoke
0x00007FFBEE2228E2 (mono-2.0-bdwgc) [c:\build\output\unity-technologies\mono\mono\metadata\object.c:2921] do_runtime_invoke
0x00007FFBEE22B93F (mono-2.0-bdwgc) [c:\build\output\unity-technologies\mono\mono\metadata\object.c:2968] mono_runtime_invoke
0x00007FF6486F2E5E (Unity) scripting_method_invoke
0x00007FF6486ECBCD (Unity) ScriptingInvocation::Invoke
0x00007FF6470D2320 (Unity) ScriptedImporter::GenerateAssetData
0x00007FF647077CD1 (Unity) ImportToObjects
0x00007FF64707741E (Unity) ImportAsset
0x00007FF6470770BB (Unity) AssetImportWorker::Import
0x00007FF64705CFC7 (Unity) AssetImportManager::ImportInProcess
0x00007FF64705C1DD (Unity) AssetImportManager::Import
0x00007FF646FF7243 (Unity) ImportAndPostprocessOutOfDateAssets
0x00007FF646FFEB7B (Unity) RefreshInternalV2
0x00007FF6470017F6 (Unity) StopAssetImportingV2
0x00007FF646FFF3A6 (Unity) RefreshV2
0x00007FF646F21D81 (Unity) AssetDatabase::Refresh
0x00007FF6465321F1 (Unity) Application::InitializeProject
0x00007FF646EB09A4 (Unity) WinMain
0x00007FF649E9A162 (Unity) __scrt_common_main_seh
0x00007FFC70EA7BD4 (KERNEL32) BaseThreadInitThunk
0x00007FFC7100CE51 (ntdll) RtlUserThreadStart

========== END OF STACKTRACE ===========

A crash has been intercepted by the crash handler. For call stack and other details, see the latest crash report generated in:
 * C:/Users/GARRAF~1/AppData/Local/Temp/Unity/Editor/Crashes

Workaround

  • Navigate to the project's Asset folder and rename the 'Allegorithmic' folder to 'Allegorithmic~'
  • Open Unity
  • Rename the 'Allegorithmic~' folder back to 'Allegorithmic'

Unity will reimport all substance materials.

Hi!

Substance Plugin is causing Unity to crash when opening project copies freshly downloaded from VCS.
The problem only happens during the first import of the project and as a workaround we are removing Allegorithmic's plugin folder from project during the first import and adding it again after unity successfully starts for the first time.

The problem can be reproduced on Unity 2020.1 beta and Unity 2019.4 LTS (we did not test older versions) under windows 10 (happened consistently on different machines).

I've noticed that the problem only happens when certain .sbsar materials are added to the project but couldn't pin point which exactly materials were causing the problem.

How to reproduce:

  • Create a new project with the URP template.
  • Add add substance plugin from the asset store.
  • Add several .sbsar files to the project (below is the list of materials used on our project).
  • Close Unity and delete the Library folder (that is tipically ignored by version control systems).
  • Open the project again.

List of materials used:

Quote
plaster_float.sbsar
cast_concrete_blocks_line.sbsar
cast_concrete_wall_blocks.sbsar
concrete_plain_brushed.sbsar
concrete_raw_panels.sbsar
concrete_slats.sbsar
concrete_spotted.sbsar
umbrella_concrete_tiles.sbsar
carpet_curly_leaks_pattern.sbsar
carpet_curly_maze_pattern.sbsar
carpet_curly_vertical_lines.sbsar
carpet_dense_gradient_pattern.sbsar
carpet_short_cut_chainmail_pattern.sbsar
carpet_short_cut_diamond_pattern.sbsar
stylized_cotton_skirt.sbsar
weave_in_striped_knit.sbsar
grass_countryside.sbsar
loose_dirt.sbsar
thick_waterlogged_mud.sbsar
etowah_marble.sbsar
granite_white_princess.sbsar
kashmir_white_granite.sbsar
marble_light_green.sbsar
,546 marble_new_emperador_dark.sbsar
nero_marquina_marble.sbsar
pavonazzo_marble.sbsar
st_cecilia_granite.sbsar
yule_marble.sbsar
aluminium_patinated.sbsar
aluminium_perforated_hexagon.sbsar
aluminium_perforated_swiss_mesh.sbsar
aluminium_perforated_triangle.sbsar
aluminium_scratched.sbsar
curtain_wall_trifractal_panels.sbsar
rectangle_curtain_wall_panel.sbsar
steel_galvanized.sbsar
,016 plate_hatch_inner_side.sbsar
sci_fi_storage_unit_wall.sbsar
space_station_outer_panel.sbsar
bricks_enamel_combined.sbsar
carrara_grid_tiles.sbsar
ceramic_mozaic_tiles.sbsar
ceramic_tiles_green.sbsar
macael_marble_grid_tiles.sbsar
natural_terrazzo_flagstone_tiles.sbsar
random_terrazzo_inserts.sbsar
slate_floor_tile.sbsar
small_terrazzo_grid_tiles.sbsar
wall_tile_unstuck.sbsar
yule_marble_grid_tiles.sbsar
window_plastic_border.sbsar
black_koto_quarter_cut.sbsar
cork_natural.sbsar
parquet_echelle.sbsar
parquet_wood_mahogany.sbsar
tulipwood_quarter_cut.sbsar
wood_beech_honey.sbsar
wood_paldao.sbsar

Expected behavior:

Unity should recreate the Library folder and successfully reimport all assets from the project.

What happens:

Unity crashes with the following log (full log attached to the thread):

Code: [Select]
(Filename: C:\buildslave\unity\build\Modules/AssetPipelineEditor/Public/ScriptedImporter.cpp Line: 219)

AssetImporter is referencing an asset from the previous import. This should not happen.
(Filename: C:\buildslave\unity\build\Modules/AssetDatabase/Editor/V2/ImportAsset.cpp Line: 1005)

AssetImporter is referencing an asset from the previous import. This should not happen.
(Filename: C:\buildslave\unity\build\Modules/AssetDatabase/Editor/V2/ImportAsset.cpp Line: 1005)

AssetImporter is referencing an asset from the previous import. This should not happen.
(Filename: C:\buildslave\unity\build\Modules/AssetDatabase/Editor/V2/ImportAsset.cpp Line: 1005)

AssetImporter is referencing an asset from the previous import. This should not happen.
(Filename: C:\buildslave\unity\build\Modules/AssetDatabase/Editor/V2/ImportAsset.cpp Line: 1005)

Done importing asset: 'Assets/Materials/Substance Source/Wood/black_koto_quarter_cut.sbsar' (target hash: 'a6a8d21c814a1abb48d756e09b6986df') in 0.435649 seconds
Start importing Assets/Materials/Substance Source/Concrete/cast_concrete_blocks_line.sbsar using Guid(104611e02f9fa954ca91e07e50116c54) Importer(-1,00000000000000000000000000000000)
Crash!!!
SymInit: Symbol-SearchPath: 'D:/Software/Unity/2019.4.1f1/Editor/Data/Mono;.;D:\Workspace\TestProjects\SubstanceURPTest;D:\Software\Unity\2019.4.1f1\Editor;C:\WINDOWS;C:\WINDOWS\system32;SRV*C:\websymbols*http://msdl.microsoft.com/download/symbols;', symOptions: 534, UserName: 'Garrafote'

[[ dll dump cropped out unclutter this thread post ]]

========== OUTPUTTING STACK TRACE ==================
0x00007FFC6EB3A799 (KERNELBASE) RaiseException
0x00007FFC60076210 (VCRUNTIME140) CxxThrowException
0x00007FFC5FFE398E (MSVCP140) std::_Throw_Cpp_error
0x00007FFC5FFE3929 (MSVCP140) std::_Throw_C_error
0x00007FFC08D8006B (Substance.Engine) cppShutdownSubstance
0x00000186C7E95C0E (Mono JIT Code) (wrapper managed-to-native) object:wrapper_native_00007FFC08D75310 ()
0x00000186C7E95A88 (Mono JIT Code) [D:\Workspace\TestProjects\SubstanceURPTest\Assets\Allegorithmic\Plugins\Substance.Platform\NativeFunctions.cs:864] Substance.Platform.NativeFunctions:cppProcessQueuedOutputs ()
0x00000186C7E9566B (Mono JIT Code) Substance.Game.NativeCallbacks/Renderer:ProcessJobs ()
0x00000186C7E78F63 (Mono JIT Code) Substance.Game.NativeCallbacks/Renderer:Flush ()
0x00000186C7E741EB (Mono JIT Code) Substance.Editor.SubstanceImporter:OnImportAsset (UnityEditor.Experimental.AssetImporters.AssetImportContext)
0x00000186C7E73F15 (Mono JIT Code) UnityEditor.Experimental.AssetImporters.ScriptedImporter:GenerateAssetData (UnityEditor.Experimental.AssetImporters.AssetImportContext)
0x00000186BF7DA3D6 (Mono JIT Code) (wrapper runtime-invoke) <Module>:runtime_invoke_void__this___object (object,intptr,intptr,intptr)
0x00007FFBEE29D660 (mono-2.0-bdwgc) [c:\build\output\unity-technologies\mono\mono\mini\mini-runtime.c:2809] mono_jit_runtime_invoke
0x00007FFBEE2228E2 (mono-2.0-bdwgc) [c:\build\output\unity-technologies\mono\mono\metadata\object.c:2921] do_runtime_invoke
0x00007FFBEE22B93F (mono-2.0-bdwgc) [c:\build\output\unity-technologies\mono\mono\metadata\object.c:2968] mono_runtime_invoke
0x00007FF6486F2E5E (Unity) scripting_method_invoke
0x00007FF6486ECBCD (Unity) ScriptingInvocation::Invoke
0x00007FF6470D2320 (Unity) ScriptedImporter::GenerateAssetData
0x00007FF647077CD1 (Unity) ImportToObjects
0x00007FF64707741E (Unity) ImportAsset
0x00007FF6470770BB (Unity) AssetImportWorker::Import
0x00007FF64705CFC7 (Unity) AssetImportManager::ImportInProcess
0x00007FF64705C1DD (Unity) AssetImportManager::Import
0x00007FF646FF7243 (Unity) ImportAndPostprocessOutOfDateAssets
0x00007FF646FFEB7B (Unity) RefreshInternalV2
0x00007FF6470017F6 (Unity) StopAssetImportingV2
0x00007FF646FFF3A6 (Unity) RefreshV2
0x00007FF646F21D81 (Unity) AssetDatabase::Refresh
0x00007FF6465321F1 (Unity) Application::InitializeProject
0x00007FF646EB09A4 (Unity) WinMain
0x00007FF649E9A162 (Unity) __scrt_common_main_seh
0x00007FFC70EA7BD4 (KERNEL32) BaseThreadInitThunk
0x00007FFC7100CE51 (ntdll) RtlUserThreadStart

========== END OF STACKTRACE ===========

A crash has been intercepted by the crash handler. For call stack and other details, see the latest crash report generated in:
 * C:/Users/GARRAF~1/AppData/Local/Temp/Unity/Editor/Crashes

Workaround

  • Navigate to the project's Asset folder and rename the 'Allegorithmic' folder to 'Allegorithmic~'
  • Open Unity
  • Rename the 'Allegorithmic~' folder back to 'Allegorithmic'

Unity will reimport all substance materials.

Hey @garrafote ,

Thank you for the detailed report! :) We are aware of the issue, and have a ticket in for it.

Hi again,

Should this issue have been fixed in 2.5.2?
I did a little test and I'm still getting the crash after the update. I'm sending you my crash dump just in case.

Hi again,

Should this issue have been fixed in 2.5.2?
I did a little test and I'm still getting the crash after the update. I'm sending you my crash dump just in case.

@garrafote ,

I put in a ticket for this and the dev team is aware of it. It was not fixed in 2.5.2. It looks like there is some investigation to be done on the dev side so we can fix it, so it will be fixed in a future release.