Error: ProcessID empty for command

Hey guys,

I have an issues that is more annoying than problematic…

I have two displays that have a default layout (20s in length) that contains a command that puts the screen to sleep. The content we schedule then issues another command that wakes up the display. It works perfectly!

The problem is my logs. I see an error logged for each of those displays every 20 seconds…

“ProcessID empty for command:”
“ProcessID empty for command:”
“ProcessID empty for command:”
“ProcessID empty for command:”
“ProcessID empty for command:”

…and so forth…

How can I make it stop? It’s a short-running command so the process ID is probably hard to grab, which is why there is probably an error. The page associated with the command is [UI Thread] ShellCommand - TerminateCommand

Any and all suggestions are appreciated.

Seems like nobody else has any ideas… Any suggestion @alex?

It should only try to terminate the command if you have that option selected when you configured the Widget.

The option is called “Terminate the command once the duration elapses?”

What do you have set for that?

Edit: And sorry for the delay!

I see… Where exactly would I find this option? I don’t see it when I edit the module, command, display setting, or command media item in the layout. Am I missing something?

We are assuming that you have Shell command widget on your layout, is that correct?

If so, then when you edit this widget you will see this:

The ‘Terminate the command once the duration elapses?’ checkbox there is what Dan mentioned.

Thanks, I see what you’re talking about now, but it’s not available with the way we have this configured. We’re triggering a globally configured command from the layout. As soon as we select the command to trigger that option goes away…

If we look for the same option in the global command, it does not exist…

The Display Settings also do not provide an option for that…

We’d prefer to retain the ability to keep the layouts platform agnostic. Is there a way to configure those additional settings without embedding the command into the layout itself.

Any thoughts?

Scheduled commands either via Schedule page Command event type or send to Display/Display Group on the relevant page should be executed only once.

Shell command widget on the layout, as mentioned earlier has that checkbox to ensure the same.

Just to clarify could you remind us what CMS and player versions are you using please?

Hi Peter,

We’re currently running 1.8.7 on windows 1.8.3-130.

I reviewed the multiple use cases that you outlined, but your list does not seem to include our current use case: Triggering a globally configured command via a layout Shell Command widget.

When selecting a globally configured command from the list, all of the below options are removed and only this remains:

Is there something I have missed?

No…but there is something we’ve missed!

Apologies for that, indeed after command selection, it hides too many fields there, we will fix that in 1.8.8 - Shell Command widget - hides too many fields after command selection · Issue #1471 · xibosignage/xibo · GitHub

Thank you for bringing this to our attention.

Thanks @Peter! Glad to hear I wasn’t just having a moment. :joy:

1 Like

Hey @Peter,

I deleted the offending widgets and recreated them, ensuring that the boxes were left unchecked. Unfortunately, that still results in repeated errors:

ProcessID empty for command:

Do you or @dan have any other ideas?

Looking at the client source, it seems like an error is logged regardless of which options are selected:

Trace.WriteLine(new LogMessage("ShellCommand - TerminateCommand", _command), LogType.Info.ToString());

if (_processId == 0)
    Trace.WriteLine(new LogMessage("ShellCommand - TerminateCommand", "ProcessID empty for command: " + _command), LogType.Error.ToString());

if (_useTaskKill)
    using (Process process = new Process())
        ProcessStartInfo startInfo = new ProcessStartInfo();

        startInfo.WindowStyle = ProcessWindowStyle.Hidden;
        startInfo.FileName = "taskkill.exe";
        startInfo.Arguments = "/pid " + _processId.ToString();

        process.StartInfo = startInfo;
    using (Process process = Process.GetProcessById(_processId))

xibo-dotnetclient/Media/ShellCommand.cs @168

If the desired functionality is that a process ID is only raised to an error when the command needs to be killed, the error would need to be raised conditional on _useTaskKill. I’m not sure where the “Terminate the command once the duration elapses?” option is honored unless that determines the value of disposing passed to Dispose().


In the meantime I am going to see if I can find a way to make the command return a process ID to satisfy the gods.

This had me chuckling for quite some time!

I think its a bug - _terminateCommand isn’t honoured anywhere in that file and it should be. Issue created: Shell Command: Terminate Command is always run regardless of the setting · Issue #1510 · xibosignage/xibo · GitHub

I’m glad that I was able to amuse you! I’m also glad that you may have root-caused the problem because I haven’t gotten around to implementing a work-around yet. :wink:

1 Like