Natron - Process exit code: -1073740940

I am trying Natron for some comp-goodness :grinning:
When i send a job to Deadline it spits out an error in the log-file:

Error: Renderer returned non-zero error code, -1073740940. Check the log for more information. vid Deadline.Plugins.PluginWrapper.RenderTasks(String taskId, Int32 startFrame, Int32 endFrame, String& outMessage, AbortLevel& abortLevel)

STDOUT: Write1 ==> Frame: 565, Progress: 100.0%, 0.3 Fps, Time Remaining: 0 second
STDOUT: Write1 ==> Rendering finished
INFO: Process exit code: -1073740940

If i try this in a cmd on the rendernode i get no errors.
C:\Natron\NatronRenderer.exe -w Write1 565-569 “C:\Natron\test1.ntp”
Restoring the image cache…
Loading plugin cache…
Info: init.py script not loaded (this is not an error)
Loading PyPlugs…
Loading project: C:/Natron/test1.ntp
Write1 ==> Rendering started
Write1 ==> Frame: 565, Progress: 20.0%, 0.3 Fps, Time Remaining: 14 seconds
Write1 ==> Frame: 567, Progress: 40.0%, 0.2 Fps, Time Remaining: 12 seconds
Write1 ==> Frame: 566, Progress: 60.0%, 0.3 Fps, Time Remaining: 6 seconds
Write1 ==> Frame: 568, Progress: 80.0%, 0.3 Fps, Time Remaining: 3 seconds
Write1 ==> Frame: 569, Progress: 100.0%, 0.4 Fps, Time Remaining: 0 second
Write1 ==> Rendering finished
C:\Natron\bin\

So is it possible to change the python-script for Natron.py to just ignore this error?
The render-files is all saved and looks ok, so it is when closing the Natronrenderer.exe this happens.

This is a snippet from the Natron.py, but i can’t seem to get where it should halt on “Process exit code”:
def HandleStdoutCompleted( self ):
msg = self.GetRegexMatch( 0 )
self.SetStatusMessage( msg )
self.SetProgress( 100.0 )

def HandleStdoutError(self):
    self.SetStatusMessage( "" )
    self.SetProgress( 0.0 )
    self.FailRender( self.GetRegexMatch(0) )

If i look at the After Effects .py-file i get this:
def CheckExitCode( self, exitCode ):
if self.FailWithoutFinishedMessage: # job marked to fail if no render success message found
if not self.RenderSuccess: # no render success message found
self.FailRender( “After Effects did not report successful render; exit code: %s. Check the render log.” % exitCode )
else:
if exitCode != 0: # if exit code non-zero, then fail the job
self.FailRender( “After Effects returned non-zero error code: %s. Check the render log.” % exitCode )

You’ll definitely want to use the CheckExitCode there. You’ll also need to tie that new function into the plugin by adding this line in __init__():

        self.CheckExitCodeCallback += self.CheckExitCode

Then likely add this:

    def CheckExitCode( self, exitCode ):
        if self.FailWithoutFinishedMessage: # job marked to fail if no render success message found
            if exitCode != -1073740940:
                self.FailRender( "Exited with code: %s." % exitCode )
            else:
                self.LogInfo("Exited with heap corruption error. Considering non-fatal")

I looked into what Windows code that error is, and it seems to be heap corruption.

If the work is already done though, it’s likely fine? I wonder how many others are hitting the same issue. It’ll be worth reporting it to the Natron team so they can look into it.

All these years later, and I’m getting this same issue trying out Natron! Job renders but errors on finish, and restarts in a loop.

I dont completely follow the above suggestion, any chance you can advise further on this fix? Also be nice if the newer versions of Natron were include din the plugin setup, I just had to add the correct .exe location.

Hello! I’ve made the changes Edwin mentioned in 2018 - but I don’t have a copy of Natron to test them with. Let alone a copy of Natron showing the issue you’re experiencing!

Drop that into your /DeadlineRepository10/custom/plugins folder and give it a shot! Putting it into custom will keep it from being blown away by upgrades.

Natron.zip (4.2 KB)

Nice one. Its free so you can try it out! And I can send over a test comp that has the error if needed.
I’m justing finishing but will try the file first thing and report back. Thanks for the speedy reply.

Ok, I have put the 4 files in the root of that folder. BTW I’m running 2 sites using RCS so I have put the files at the main repository end. But I’ll be testing from the 2nd site.

I’ll try it now. Fingers Crossed.


Thats where I’ve put the files, in site 1, but still getting errors at site 2. Not sure if this is an issue with the files getting handed over by RCS?

Error =
Error: Renderer returned non-zero error code, -1073740940. Check the log for more information.
at Deadline.Plugins.PluginWrapper.RenderTasks(String taskId, Int32 startFrame, Int32 endFrame, String& outMessage, AbortLevel& abortLevel)

Also, loads of the same error before the render starts -
2020-05-01 09:33:03: 0: STDOUT: Failed to run onNodeCreated callback: NATRON_PYTHON_NAMESPACE::getFunctionArguments(): interpretPythonScript(import inspect
2020-05-01 09:33:03: 0: STDOUT: args_spec = inspect.getargspec(afterNodeCreatedCallback)
2020-05-01 09:33:03: 0: STDOUT: failed!

Hey @Mhinks

Looks like the path you dropped the plugin files is incorrect. You will need to drop the “Natron” folder under custom->plugins directory.

Regards,
Kavi

Hi @kavi.

Of course, silly me. Its not worked immediatly, but maybe the Repo machine needs to sync the folder to my end. Eror before -

Error: AttributeError : ‘NatronPlugin’ object has no attribute ‘FailWithoutFinishedMessage’ (Python.Runtime.PythonException)
File “C:\Users\Mark Hinks\AppData\Local\Thinkbox\Deadline10\slave\gm-sry-ws-01\plugins\5eac22b3ab665a22a03b7733\Natron.py”, line 171, in CheckExitCode
if self.FailWithoutFinishedMessage: # job marked to fail if no render success message found

Thanks for coming back to me.
MarkAnnotation 2020-05-05 172011

Hi @Mhinks

Did you try restarting the worker and resubmitting the job? The worker should then pull all the new plugin files based on the job.

Regards,
Kavi

Hi, I just checked as I updated Deadline the other day, the files are still in the Repo, and my machine has been restarted and the worker started, and the job was resubmitted in the monitor, and its still doing it.

Its less of a concern as I think we’re going to not use Natron for now, but happy to get it working if you have other ideas.