I have some trouble to get 3ds Max 2016 to run with a “Launcher”. The “Launcher” is an executable (located on the server), which sets up the pipeline without using any local installed files. It also uses the same command line arguments like the original does. To get the pipeline running (for some process jobs) we needed to change the executable location in Deadline to launch Max via our “Launcher”.
After changing the executable location I was running into the following issues:
1. Deadline was using wrong paths, because it is setting up the Max directory locations with a relative path to the executable and not with the path from the system variable, so I had to change the 3ds Max plugin:
3dsmax.py:
[code]
[ 326] MaxLaunchExecutable = “”
[ …]
[ 587] # Seperate for override variable (because it’s used for many path constructions)
[ 587] self.MaxLaunchExecutable = self.MaxRenderExecutable
[ …]
[ 613] ### GET INSTALL LOCATION FROM ENVIRONMENT:
[ 614] for e in os.environ:
[ 615] max = re.search(r"3DSMAX\s*\S*(\d{4})", e, re.I) if not bool(re.search(r"VRAY", e)) else None
[ 616] if max:
[ 617] maxInstallDirectory = os.environ[e].strip(os.path.sep)
[ 618] self.MaxRenderExecutable = Path.Combine(maxInstallDirectory,“3dsmax.exe”)
[ 619] break
[ …]
[1024] self.LaunchMax( self.MaxLaunchExecutable, parameters, Path.GetDirectoryName( self.MaxRenderExecutable ) )
[/code]I just changed as little as possible to save time (line numbers could be different, because of some additional print statements).
2. Deadline is using it’s own startup script (dl.ini) and plugin, which is not a problem for the launcher, because it combines the plug-in ini-file and executes given scripts after the pipeline is loaded. This works fine with Shotgun and some other processes we have tested with the launcher, but it doesn’t work with Deadline.
The combined ini-file looks like this:
# Group Definitions:
[Directories]
blur=MAP_DRIVE:\\XXX\\startup\\2016\\plugins
[Include]
Deadline Lightning=C:\Users\loefflerm\AppData\Local\Temp\lightningplugin_638106471024.ini
Original=C:\3dsMax2016\3ds Max 2016\en-US\plugin.ini
UserProfile=C:\Users\loefflerm\AppData\Local\Autodesk\3dsMax\2016 - 64bit\ENU\Plugin.UserSettings.ini
Deadline uses the following arguments to launch max:
-p "C:\Users\LOEFFL~1\AppData\Local\Temp\dl.ini" -q -s "C:\Users\loefflerm\AppData\Local\Thinkbox\Deadline7\..\55a68ed9ccad8a0cfc452b8e\deadlineStartupMax2016.max"
The ini-file will be combined with our pipeline ini-file. All arguments and the scene file are passed to the Python Popen command, which the launcher uses to actually run the application.
Executing the command manually via the command prompt works fine:
"MAP_DRIVE:\XXX\YYY\launcher\bin\3ds Max 2016.exe" -q -s -p "c:\users\loeffl~1\appdata\local\temp\tmpkmpiud.ini" -U MAXScript "MAP_DRIVE:\\XXX\\YYY\\launcher\\3dsMax\\startup.ms" "C:\\Users\\loefflerm\\AppData\\Local\\Thinkbox\\Deadline7\\slave\\ZZZ\\plugins\\55a682eaccad8a0cfc452b8b\\deadlineStartupMax2016.max"
But when Deadline starts the job, Max is closing before it could connect via the socket to Deadline.
Deadline Output:
=======================================================
Error
=======================================================
Error: 3dsmax startup: Error getting connection from 3dsmax: Monitored managed process "3dsmaxProcess" has exited or been terminated.
at Deadline.Plugins.ScriptPlugin.StartJob(Job job, String& outMessage, AbortLevel& abortLevel)
=======================================================
Type
=======================================================
RenderPluginException
=======================================================
Stack Trace
=======================================================
at Deadline.Plugins.Plugin.StartJob(Job job)
at Deadline.Slaves.SlaveRenderThread.a(TaskLogWriter A_0)
=======================================================
Log
=======================================================
2015-07-15 17:48:38: BEGIN - ZZZ\loefflerm
.
.
2015-07-15 17:48:38: 0: INFO: Rendering with executable: MAP_DRIVE:\XXX\YYY\launcher\bin\3ds Max 2016.exe
.
.
2015-07-15 17:48:38: OriginalFilename: 3ds Max 2016.exe
2015-07-15 17:48:38: FileVersion: 1.0.0
2015-07-15 17:48:38: FileDescription:
2015-07-15 17:48:38: Product: Launcher
2015-07-15 17:48:38: ProductVersion: 1.0.0
2015-07-15 17:48:38: Debug: False
2015-07-15 17:48:38: Patched: False
2015-07-15 17:48:38: PreRelease: False
2015-07-15 17:48:38: PrivateBuild: False
2015-07-15 17:48:38: SpecialBuild: False
2015-07-15 17:48:38: Language: English (United States)
.
.
2015-07-15 17:48:39: 0: INFO: Plugin ini file: C:\3dsMax2016\3ds Max 2016\en-US\plugin.ini
.
.
2015-07-15 17:48:39: 0: INFO: Lightning connection plugin: C:\..\Thinkbox\Deadline7\...\lightning64Max2016.dlx
2015-07-15 17:48:39: 0: INFO: 3dsmax socket connection port: 63597
.
.
.
2015-07-15 17:48:39: 0: INFO: -- Arguments: -p "C:\...\Temp\dl.ini" -q -s "C:\...\Thinkbox\...\deadlineStartupMax2016.max"
.
.
2015-07-15 17:48:39: 0: INFO: Running as user: loefflerm
2015-07-15 17:48:39: 0: INFO: Executable: "MAP_DRIVE:\XXX\YYY\launcher\bin\3ds Max 2016.exe"
2015-07-15 17:48:39: 0: INFO: Argument: -p "C:\Users\LOEFFL~1\AppData\Local\Temp\dl.ini" -q -s "C:\..\Thinkbox\..\deadlineStartupMax2016.max"
2015-07-15 17:48:39: 0: INFO: Startup Directory: "C:\3dsMax2016\3ds Max 2016"
2015-07-15 17:48:39: 0: INFO: Process Priority: BelowNormal
2015-07-15 17:48:39: 0: INFO: Process Affinity: default
2015-07-15 17:48:39: 0: INFO: Process is now running
2015-07-15 17:48:39: 0: INFO: Waiting for connection from 3dsmax
2015-07-15 17:48:40: 0: WARNING: Monitored managed process 3dsmaxProcess is no longer running
I am not sure what exactly goes wrong. Is the managed process working with Python Popen, or is it a different process execution?
It would helpful if I could recreate the issue with the manual execution vie the command prompt, but therefor I need more information how the job actually launches the application. In the task manager I could see Max starting, but closing after it was loading 340 MB into the RAM.
So the launcher is executing 3ds Max.
I was also tryed it with a higher timeout to connect Deadline with Max:
[ 1708] self.MaxSocket.WaitForConnection( 5000, True )
Any ideas, which helping me to solve this problem are welcome!!!
Thanks,
Michael