Author Topic: Substance in Maya Assertion failed  (Read 2755 times)

Hey everyone,

I have a problem with my substance in maya plugin. When i try to build a shader network it crashes with an assertion error that points to a dircotry that I can not find and do not understand. You can see the exact error in the screenshot.
This is what the script editor shows after loading the substance plugin and importing a sbsar:
file -f -new;
// untitled //
commandPort -securityWarning -name commandportDefault;
// Error: line 1: Could not open command port commandportDefault because that name is in use. //
onSetCurrentLayout "Modeling - Two Pane";
// Warning: Panel size cannot accommodate all requested Heads Up Display elements. //
// Warning: file: C:\Users\patri\Documents\maya\2020\prefs\filePathEditorRegistryPrefs.mel line 4: filePathEditor: Attribute 'aiImage.filename' is invalid or is not designated 'usedAsFilename'. //
// Warning: file: C:\Users\patri\Documents\maya\2020\prefs\filePathEditorRegistryPrefs.mel line 5: filePathEditor: Attribute 'aiPhotometricLight.aiFilename' is invalid or is not designated 'usedAsFilename'. //
// Warning: file: C:\Users\patri\Documents\maya\2020\prefs\filePathEditorRegistryPrefs.mel line 6: filePathEditor: Attribute 'aiStandIn.dso' is invalid or is not designated 'usedAsFilename'. //
// Warning: file: C:\Users\patri\Documents\maya\2020\prefs\filePathEditorRegistryPrefs.mel line 7: filePathEditor: Attribute 'aiVolume.filename' is invalid or is not designated 'usedAsFilename'. //
// Warning: file: C:\Users\patri\Documents\maya\2020\prefs\filePathEditorRegistryPrefs.mel line 12: filePathEditor: Attribute 'substanceNode.substanceFile' is invalid or is not designated 'usedAsFilename'. //
// AbcExport v1.0 using Alembic 1.7.5 (built Feb  6 2018 18:28:08)
evalDeferred "shaderBallRendererMenuUpdate";
// Warning: line 1: filePathEditor: Attribute 'aiStandIn.dso' and label 'Standin' have been saved already. //
// Warning: line 1: filePathEditor: Attribute 'aiVolume.filename' and label 'VDB' have been saved already. //
// Warning: line 1: filePathEditor: Attribute 'aiImage.filename' and label 'Image' have been saved already. //
// Warning: line 1: filePathEditor: Attribute 'aiPhotometricLight.aiFilename' and label 'IES' have been saved already. //
import arnold
// Successfully imported python module 'arnold'
import mtoa
// Successfully imported python module 'mtoa'
import mtoa.cmds.registerArnoldRenderer;mtoa.cmds.registerArnoldRenderer.registerArnoldRenderer()
// Successfully registered renderer 'arnold'
updateRenderOverride;
// Warning: file: C:/Program Files/Autodesk/Maya2020/scripts/startup/autoLoadPlugin.mel line 35: Loading plug-in "mtoa" has resulted in changes to the scene that may need to be saved. //
// AbcImport v1.0 using Alembic 1.7.5 (built Feb  6 2018 18:28:08)
updateRendererUI;
updateRendererUI;
// Warning: file: C:/Program Files/Allegorithmic/Substance in Maya/2020/scripts/SubstancePluginCreateMenuGui.mel line 119: filePathEditor: Attribute 'substanceNode.substanceFile' and label 'SBSAR' have been saved already. //
SubstancePluginOpenContent;
addContextHelpProc "|" "contentBrowserBuildContextHelpItems";
addContextHelpProc "|" "contentBrowserBuildContextHelpItems";
// Substance - Rendering substanceNode1 //
// Substance - Render completed for substanceNode1 //

When I then click on one of the outputs to create it, the assertion error happens.



If I then click on cancel, maya crashes, if I click on retry, maya freezes and I have to end it via task manager. This is the stack trace in the maya output:

Stack trace:
  ucrtbase.dll!_get_wpgmptr
  substancemaya.mll!uninitializePlugin
  substancemaya.mll!uninitializePlugin
  substancemaya.mll!uninitializePlugin
  substancemaya.mll!uninitializePlugin
  substancemaya.mll!uninitializePlugin
  ucrtbase.dll!_configthreadlocale
  KERNEL32.DLL!BaseThreadInitThunk
  ntdll.dll!RtlUserThreadStart
00007FFCED5AF600Fatal Error. Attempting to save in C:/Users/patri/AppData/Local/Temp/patri.20200923.1348.ma

Im on the newest version of the plugin and maya. I hope somene can help me!
Thanks in advance

Someone ran into this earlier when they had Houdini installed, where the older version of some of the binaries there were conflicting somehow.
Software Engineer, Integrations
Maya, 3ds Max and Core Libraries

Any idea how he resolved it? I have uninstalled it, gone through all directorys and removed every trace I could find but its still not working.

They said they removed the linker file out of the Houdini install

https://forum.substance3d.com/index.php/topic,34536.0.html

But they never really gave any further details than that, although I did ask them for more information.

I'll talk to the folks we know at SideFX, and see if we can figure out what is going on.
Software Engineer, Integrations
Maya, 3ds Max and Core Libraries

Okay, it works now, but only after completly uninstalling houdini. This means houdini is intervening with my maya, which is a bit strange. I will try to reinstall houdini later and get them working side by side. Thanks for your help!

Okay, now I have got them working side by side, here's how and what I noticed. When trying to delete the substance_link.dll in houdinis installation folder I got the error that its currently in use by maya. This means, for some reason the maya substance plugin uses not the substance_link in its installation path but the in houdinis installation path. Because the substance_link.dll in the houdini installation is on version 7.0.0, the creating of the shader network is not working. I fixed it by restarting my pc to relase the substance_link.dll in houdinis installation path from maya, deleting it and then copying the link from the maya plugin into the houdini installation.

thanks for the help I had exactly the same problem

Does Houdini have a Maya plugin for working with its assets? It could be that it is adding the houdini install folder to the path.

I'll test it to see if I can find something more concrete. It sounds like something that will need to be fixed on thr Houdini side, however.
Software Engineer, Integrations
Maya, 3ds Max and Core Libraries

I'm having the same problem, any news?

I'm wondering if it has anything to do with the Houdini engine for Maya which I assume is the only logical integration link between the two apps.

Any word on a solution for this with Maya?

This issue is impacting our ability to use Substance in Maya

A simple hack would be to replace the substance_linker.dll in the houdini integration with the one that is in the Maya plugin.

That's a workaround though.
Software Engineer, Integrations
Maya, 3ds Max and Core Libraries

I can confirm that after what felt like an exhaustive process of uninstalling, reinstalling, changing configs and more... the solution was as simple as taking the substance_linker.dll from the substance install lib folder and copying it over the one in the Houdini bin folder. remarkably everything is happy now : )  it just works : )  :)