3ds Max crashes on startup when using Shotgun Toolkit.

When launching 3ds Max from Shotgun Desktop or the Shotgun website, it is possible that 3ds Max will freeze leaving you with a frozen white dialog or the following message will appear:

Microsoft Visual C++ Runtime Library (Not Responding)
Runtime Error!
Program: C:\Program Files\Autodesk\3ds Max 2016\3dsmax.exe
R6034
An Application has made an attempt to load the C runtime library incorrectly.
Please contact the application's support team for more information.

This is generally due to a version of msvcr90.dll in your path that conflicts with the version of Python that is bundled with 3ds Max. 

Solution

First, go to your pipeline configuration’s config/hooks folder and create the file before_app_launch.py. In it, paste the following:

"""
Before App Launch Hook
This hook is executed prior to application launch and is useful if you need
to set environment variables or run scripts as part of the app initialization.
"""
import os
import tank

class BeforeAppLaunch(tank.Hook.get_hook_base_class()):
    """
    Hook to set up the system prior to app launch.
    """
    def execute(self, **kwargs):
        """
        The execute functon of the hook will be called to start the required application
        """
        env_path = os.environ["PATH"]
        paths = env_path.split(os.path.pathsep)
        # Remove folders which have msvcr90.dll from the PATH
        paths = [path for path in paths if "msvcr90.dll" not in map(
            str.lower, os.listdir(path))
        ]
        env_path = os.path.pathsep.join(paths)
        os.environ["PATH"] = env_path

Now save the file.

Then, open config/env/includes/app_launchers.yml in your pipeline configuration and find the launch_3dsmax entry. You should replace hook_before_app_launch: default to hook_before_app_launch: '{config}/before_app_launch.py'.

You should now be able to launch 3ds Max correctly from Shotgun and Shotgun Desktop. If you still have any issues, please contact support@shotgunsoftware.com

Follow

2 Comments

  • 0
    Avatar
    Amina Rachdi

    Hello,

     

    I had the same problem with 3dsmax 2016.  I followed the procedure described in the solution above, but it seems something is still going wrong.  when I try now to open 3dsmax via SG Desktop, nothing happens, 3dsmax is simply not launched.

     

  • 0
    Avatar
    Jean-François Boismenu

    Hi Amina,

    Could you go to the folder where your project's pipeline configuration resides and try to launch 3dsMax from there? This can generally be achieved by typing `tank launch_3dsmax`. You will probably see what is going wrong by then. 

    If after this you need more help on his matter, please contact support@shotgunsoftware.com.

    Cheers,

    JF

    PS: If the tank command complains that launch_3dsmax does not exist, simply type tank and find the name of the command that launches Max.

Please sign in to leave a comment.