Author Topic: Typo in SubstanceRendererCompatibility.py crashes renderers  (Read 731 times)

I've been investigating reports from Redshift customers where having Slate Material Editor open while rendering would crash.

This happens when Redshift broadcasts NOTIFY_POST_RENDER from Renderer::Close().  The call stack showed a MaxPlus hook invoking Python, resulting in a call to exit() causing a chain reaction of exceptions in the Max main WndProc and finally overflowing the stack.

I dug into this and located your scripts, then experimented a little to discover SubstanceRendererCompatibility.py is using a non-existent object pymxs.rt in your force_no_display method.  This should be pymxs.runtime.

I've advised customers to make this change in C:\ProgramData\Autodesk\ApplicationPlugins\SubstanceIn3dsMax2019\scripts\python\substance - obviously substituting the correct Max version in that path or using %PROGRAMDATA% on non-standard systems.

Note the related bug report here: https://forum.substance3d.com/index.php/topic,32766.0.html -- the renderer_change handler calls this same method, so this fix might also apply.
Last Edit: February 26, 2020, 02:29:07 am

Thanks for the report there. We should have that fixed soon for the next version.

That is a slight mixup from a version for Python 3 that doesn't have all the same 3ds Max modules available.
Software Engineer, Integrations
Maya, 3ds Max and Core Libraries

Thanks a lot, fixed my problems