So I’m trying to intentionally break Deadline as it happens occasionally and I want to see when and why it happens…
Excuse my rambling I just find it easier to explain it to myself and good to come back to in the future.
We get errors on stitching files when the filepath is too long…
I made a long path and increased it until it started breaking Deadline…I got to this monster before things broke.
“Y:\CGI_R&D\Jobs\12_LengthName\Render_WIP\VERSION1\RGBA\Test_004_needs_a_long_name
s010_rgb_Landscape_and_environment_and_seawater_01_dw
s010_rgb_Landscape_and_environment_and_seawater_01_dw_.tga”
I had a render element with a long name too…
“Y:\CGI_R&D\Jobs\12_LengthName\Render_WIP\VERSION1\RGBA\Test_004_needs_a_long_name
s010_rgb_Landscape_and_environment_and_seawater_01_dw\ExtraTex_Thisisaverylongelement
ExtraTex_Thisisaverylongelement_s010_rgb_Landscape_and_environment_and_seawater_01_dw_.tga”
And I was submitting as a Tile Render so the filename output for the element was actually…
“Y:\CGI_R&D\Jobs\12_LengthName\Render_WIP\VERSION1\RGBA\Test_004_needs_a_long_name
s010_rgb_Landscape_and_environment_and_seawater_01_dw
ExtraTex_Thisisaverylongelement
ExtraTex_Thisisaverylongelement_s010_rgb_Landscape_and_environment_and_seawater_01_dw__tile_1x1_2x2_0000.tga”
Which gives us a count of 276, which according to the documentation I’ve found is either 16 or 21 above the limit for Windows.
The tasks on deadline were failing with the error,
“Exception during render: An error occurred in RenderTasks(): RenderTask: Unexpected exception (Monitored managed process “3dsmaxProcess” has exited or been terminated.”
Looking at the log…
“: INFO: Lightning: Attempt to move C:\Users\Remote\AppData\Local\Temp\ExtraTex_Thisisaverylongelement_s010_rgb_Landscape_and_environment_and_seawater_01_dw__tile_1x1_2x2_0000.tga to destination failed: The system cannot find the path specified.”
All the other render elements and RGB had actually saved to the local disk, but this one was too long to be moved back to the server from the local temp directory.
So lets take 16 characters off the length and see if it renders…
“Y:\CGI_R&D\Jobs\12_LengthName\Render_WIP\VERSION1\RGBA\Test_004_n\s010_rgb_Landscape_and_environment_and_seawater_01_dw\ExtraTex_Thisisaverylongelement\ExtraTex_Thisisaverylongelement_s010_rgb_Landscape_and_environment_and_seawater_01_dw_.tga”
260 characters still causes the issue…
255 is next target… which works, renders, copies back to the folder and stitches.
Annoyingly though one of the issues we’ve had, which I don’t seem able to replicate is where we have a tile task job which completes and then the assembly task fails because the path is too long. (Can’t find tile, even though they exist) We might stop getting it now I’m going to limit our filenames to 255 characters with the code below, but if anyone else manages to catch this error let me know and send me the error report so I can find out what the problem is.
I’ve written a sanity check to see if it’s likely to fail, but will need to call the RenderElementUpdatePaths() before hand to know what the element paths will be, we have our own custom RenderElementUpdate() function which we always use so I can call ours before submission without any issues.
[code](
local re = maxops.getCurRenderElementMgr()
local tilestring = 4
if SMTDSettings.tilesrendering then
(
local TilesX = (SMTDsettings.tilesinX as string).count
local TilesY = (SMTDSettings.tilesinY as string).count
tilestring = (14 + (2 * (tilesX + tilesY)))
)
local rendlength = (Rendoutputfilename as string).count + tilestring
for i = 1 to re.NumRenderelements() do
(
local elementpath = re.getrenderelementfilename (i - 1)
local eleLength = (elementpath.count + tilestring)
if eleLength > RendLength do rendlength = eleLength
)
RendLength <= 255
)
[/code]