Event plugin not being trigerred...

This is a weird one,

could you, please, try to confirm that there is something wrong with Event Plugin trigerring system?

Here’s the event plugin I’m using: GymtracerAutoSubmitter.zip (2.85 KB)

It looks for 3ds Max jobs with “GT_” in their name and also with “prepass” in the comment. If it finds such a job it’ll automatically submit the same job, but with different parameters. It is being trigerred on onJobFinished event.

The weirdest thing is, the plugin works! But! When I manually submit a job via the Monitor Submission plugin (which has been modified to use the “-drop” flag) and the job finishes, nothing happens! The event plugin is not being triggered. But, when I go to the finished job in the Monitor and requeue one task and immediately after that mark it as Complete, the Event Plugin gets trigerred and works perfectly fine!

I’ve noticed this happening on all my submissions (be it external batch submissions or manual Monitor submissions).

Can you, please, try this and see what’s up? I haven’t found any errors or problems in the logs, so I don’t really know what’s happening. Thank you.

Hi Lukas,
The code looks fine…so I’m struggling to see much wrong with it. Have you tried restarting Pulse and your Deadline Slaves? I may well be wrong, so please don’t shoot the messenger :slight_smile:, but I think you might need to add a couple more name-spaces to the top of the script:

from System import * from System.Globalization import *

Other than this, I’m sure Mr. R will come to the rescue shortly :slight_smile:

HTH,
Mike

Thanks for the reply, Mike.

I’ll add the namespaces, no problem, but should Deadline need to access from the namespaces, wouldn’t it have thrown an error?

Also, why does the script work when triggered “manually” via the “reque - mark as complete” combo, but not automatically?

I just tested it here and it worked fine. A job I submitted finished and the slave ran the event to submit the new job.

Maybe the slave that is finishing the job is having problems, which could explain why it only works when you manually mark the job as complete (the machine that marks the job as complete is the one that processes the event).

Maybe submit a job with a single task for testing, because then you’ll know that the slave that finished that task is the same one running the event script. You can then check the log of that slave to see if it prints out any errors.

Cheers,

  • Ryan

Ok, just tested it and it doesn’t work.

Where can I find the log I’m looking for on that machine?

I found the log and here’s what it contains:

[code]2011-08-24 17:55:13: 3ds Max autosubmission: Found 3ds Max job GT_AB_02
2011-08-24 17:55:13: 3ds Max autosubmission: Plugin info entry: \rammstein_UNMANAGED_PROJECTS_\Gymtracer\SHOTS\GT_AB_14\3D\GT_AB_14_Max2011_loocas_003.max
2011-08-24 17:55:13: 3ds Max autosubmission: Trying to submit the GT_AB_02 3ds Max job
2011-08-24 17:55:13: 3ds Max autosubmission: Submission output: Deadline Slave 5.0 [v5.0.0.44528 R]

Submitting to Repository: \rammstein\Deadline

Submission Contains the Following:

  1. Auxiliary File #1 (“C:\Users\loocas\AppData\Local\Thinkbox\Deadline\temp\max_plugin_info.job”)
    Error: Object reference not set to an instance of an object. (System.NullReferenceException)

2011-08-24 17:55:13: 3ds Max autosubmission: \rammstein_UNMANAGED_PROJECTS_\Gymtracer\SHOTS\GT_AB_14\3D\GT_AB_14_Max2011_loocas_003.max successfully submitted to Deadline[/code]

Now, I see the Error message “System.NullReferenceException”. But what exactly does it mean? Why couldn’t deadlinecommand submit the job?

I had this bug a while ago. I’m pretty sure its fixed in v5.1 :slight_smile:
Mike

EDIT: I just tried to find the beta release note which confirms this, but for the life of me I can’t find it!

Ah, at least it’s fixed. :slight_smile:

But why does it work from my machine, but not on the actual renderfarm?

Strangely enough, when I changed the Event Plugin’s submission line to include the “-drop” flag, the error changes as well:

[code]Submission Contains the Following:
0) Submission File #0 (“C:\Users\loocas\AppData\Local\Thinkbox\Deadline\temp\max_job_info.job”)

  1. Submission File #1 (“C:\Users\loocas\AppData\Local\Thinkbox\Deadline\temp\max_plugin_info.job”)
    Error: Object reference not set to an instance of an object. (System.NullReferenceException)[/code]

It now lists both of the submission files correctly, but still errors out… :confused:

Ah, that error does sound familiar, and yes, it is currently fixed in the 5.1 beta. It’s an issue with the script environment on the slave, which is why it doesn’t affect the Monitor.

A workaround might be to use an external process to call deadlinecommand.exe to submit the job, instead of using the ClientUtils function.

Uff, a little too disruptive of the entire Event Plugin paradigm. :frowning:

But at least now I know where the issue is. :slight_smile: I’ll modify the Event Plugin then.

Thanks for clarifying that it really is a bug. Cheers…

Ok, so I’ve modified the Event Plugin code so it triggers an actual Process and starts the deadlinecommand.exe outside of the Deadline scope.

The code snippet:

startInfo.Arguments = "{0} {1}".format(jobInfoFilename, pluginInfoFilename) Process.Start(startInfo)

But, I see no errors in the logs, yet, the jobs just don’t get submitted. :frowning:

The log (note these are just text strings I put in to debug my code):

2011-08-31 05:01:49: Nuke autosubmission: Found 3ds Max job GT_AR_08 2011-08-31 05:01:49: Nuke autosubmission: Plugin info entry: \\rammstein\__UNMANAGED_PROJECTS__\Gymtracer\SHOTS\GT_AR_08\3D\GT_AR_08_Max2011_loocas_002.max 2011-08-31 05:01:49: Nuke autosubmission: Trying to submit the GT_AR_08 Nuke job 2011-08-31 05:01:49: Nuke autosubmission: \\rammstein\__UNMANAGED_PROJECTS__\Gymtracer\SHOTS\GT_AR_08\COMP\GT_AR_08.nk successfully submitted to Deadline

Yet, there are no new jobs in the Monitor.

You would have to check the stdout from deadlinecommand to see why the submission failed. I should have mentioned this before, but there is a ProcessUtils function to launch a process that will redirect stdout (see the 4th SpawnProcess function):
thinkboxsoftware.com/deadlin … _Utilities

Use WaitForExit to wait for the process to exit. Then you should be able to read from the process’ StandardOutput property:
msdn.microsoft.com/en-us/library … utput.aspx

Cheers,

  • Ryan

Thanks for that too, Ryan!

But I’m afraid it’s too late in the process of rendering all out. I’ll just wait for the batch to process and then submit the rest via my batch submit scripts. That way it’s easier for me to debug/manage and also I won’t make a huge mess of all the shots that need to be rendered in specific orders. :slight_smile:

Thanks again!