Octane Crashes running Lua Script

Forums: Octane Crashes running Lua Script
Forum for OctaneRender Lua scripting examples, discussion and support.

Octane Crashes running Lua Script

Postby cnewswanger » Mon Aug 17, 2015 8:01 pm

cnewswanger Mon Aug 17, 2015 8:01 pm
Octane Standalone
Lua script (below) needs to render 65,536 images.
Machine is Win7, Intel Core i7-5930K CPU - Six Cores, 3.5GHz
Quad Titan X air cooled not overclocked, fans on 100%
64 Gig memory, 1500 watt ps running at 850 watts while rendering.
all components running cool.
Crashes happen at random times. Has run for 12 hours without a problem.
Sometimes fails in an hour.

When crashes occur CPU drops from 25% to zero, All GPU's cool down to idle.
Octane and Script windows grey out and show "Not Responding"
No hint of a problem in the Windows log files.
Octane Memory usage value in task manager freezes at ~750,000 K
This value floats around this number while rendering.

Images are simple so far Render time for each frame is 1-2 seconds.

Any suggestions would be appreciated!

Code: Select all
-- Shear animation using Octane Scatter node
-- animates the shear elements of a single scatter transform
-- @description renders an array of ortho views for holograms
-- @author      Craig Newswanger & Ariel James
-- @version     0.3  August 4, 2015
-- @script-id   Octane Shear Animation

-- Returns copies of the original scene graph, the camera node and the rendertarget.
-- This prevents us from modifying the original scene.
local function getSceneCopy()

    -- get the selected render target
    local selectedRt = octane.project.getSelection()[1]
    if not selectedRt or selectedRt.type ~= octane.NT_RENDERTARGET then
        octane.gui.showError{ text = "No render target selected" }
        return nil

    -- Create a full copy of the whole project so we don't modify the original project.
    local copyScene = octane.nodegraph.createRootGraph("Project Copy")
    local copyRt    = copyScene:copyFromGraph(octane.project.getSceneGraph(), { selectedRt })[1]

    -- check if the copied node is a render target with a thinlens camera connected to it
    if not copyRt or copyRt.type ~= octane.NT_RENDERTARGET then
        octane.gui.showError("No render target selected")
        return nil

    -- check if a thin lens camera is connected to the render target
    local copyCam = copyRt:getInputNode(octane.P_CAMERA)
    if not copyCam or copyCam .type ~= octane.NT_CAM_THINLENS then
        octane.gui.showError("No thinlens camera connected to the render target")
        return nil

    return copyScene, copyRt, copyCam

local function saveRender(cScene, fName)

   --Find parent direcotry of current project
   local filePath = octane.project.getCurrentProject()
   fileName = octane.file.getParentDirectory(filePath)
   --Define new render folder and check if it exists
   --renderFolder = fileName .. '/RenderFolder'
    renderFolder = 'E:\\Death_Star_8-15-15'
   exists = octane.file.exists(renderFolder)
   --If the render folder does not exist create it
   if not exists then
      local result = octane.file.createDirectory(renderFolder)
    renderFile = renderFolder .. '/' .. fName
      renderTargetNode = cScene,
      maxSamples       = 10,
   octane.render.saveImage(renderFile, octane.render.imageType.PNG8)

-- Get the render target and camera in global variables

-- if getSceneCopy failed, halt the script
if SCENE_GRAPH == nil then return end

basename = "Death_Star_Battle"
for x = 255,0,-1 do
    xshear = x/128 -1
        for y = 255,0,-1 do
          yshear = y/128 -1
            filename= basename .. "_" .. ystr .. "_" .. xstr .. ".png"
         local myScatterNode = octane.nodegraph.findItemsByName(SCENE_GRAPH,"myScatter",false)[1]
         local matrix = { { 1, 0, xshear, 0 }, { 0, 1, yshear, 0 }, { 0, 0, 1, 0 } }
         saveRender(RT_NODE, filename)

-- reset the render engine
Posts: 9
Joined: Mon Jun 22, 2015 9:16 pm

Re: Octane Crashes running Lua Script

Postby cnewswanger » Thu Aug 27, 2015 3:05 pm

cnewswanger Thu Aug 27, 2015 3:05 pm
I have not received much assistance from Otoy on this issue.

We purchased an ASUS X99-E WS motherboard and set it up yesterday. Got the same freeze behaviour. No difference from the previous Gigabyte MOBO.
4th titan card interferes with the usb and front panel connectors so I'm testing with three Titan cards till I get past the Octane crash issue.
This motherboard is named as the testbed that Nvidia has used for quad Titan x. I'll have to solder a connector for the front panel to make it fit under the card.

Here is a video showing the freeze.

I ran 15 of combinations of my four Titan X Graphics cards, with one, two and three cards.
Swapping cards in slots did not indicate any change in the failure. It is not a problem with the cards.
I have run typical GPU benchmarks with all cards on the Gigabyte mobo and saw no issues.

For as long as I was willing to wait I did not see a failure with any of my 4 single Titan X cards.
I typically rendered over a thousand frames in each configuration.

I set the samples parameter very low since the failure seems to occur when the scatter node is changed.
I noted that in every case after a freeze the last image was rendered fully and saved. I never see a partially complete image.
I compared the rendered image in the frozen Octane window with the last saved file and it matches.

I saw one failure with two cards but could not duplicate that event.

Any combination of three cards produces the error in a minute or less.
I’ll assume that 4 cards will do the same.

I do not see any single card stand out as a cause.

It seems that 2 or more cards increases the chance that the freeze will occur.

Larger more complex models fail faster.
I ran the Chess example with an inserted scatter node, the render fails in one to three frames.
If I comment out this line in the script:


From what I have seen, If it gets past this line in the script then all is well.

It will render thousands of frames without fail. (All identical of course.)
Uncomment the line and it fails after 2 or three frames.

Just so you know. The bios settings on the ASUS motherboard are set to “Default” no over-clocking or over voltage.
Ran GPU fans at full, all card ran below 57 degrees while rendering. Running them hotter makes no difference to the crashes.

Any reason that I might try to run this under Linux?
If so which flavor of Linux. I will try it! Right away!

Anyone out there willing to test my script with quad titan X's?
Posts: 9
Joined: Mon Jun 22, 2015 9:16 pm

Re: Octane Crashes running Lua Script

Postby cnewswanger » Fri Sep 04, 2015 3:58 pm

cnewswanger Fri Sep 04, 2015 3:58 pm
This issue has been determined to be a bug in 2.24.

We currently resolved the issue by reverting to 2.23.2.

Posts: 9
Joined: Mon Jun 22, 2015 9:16 pm

Return to Lua Scripting

Who is online

Users browsing this forum: No registered users and 1 guest

Thu Nov 21, 2019 1:34 am [ UTC ]