Community forum

Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


Hector
2014-08-14T18:15:35Z
The following exception is thrown when a console app in an Execute Task calls the Console.SetCursorPosition or plays with moving the cursor.
We see the apps execute but Visual Cron catches the exception and shows no output at all (neither Standard or error streams)


Exception in Task: Array cannot be null.
Parameter name: bytes
Sponsor
Forum information
Support
2014-08-15T07:26:39Z
I guess that is because it is running in the background. Why do you need that function?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Hector
2014-08-15T13:52:18Z
Yes the Execute Task is configured to run the app on a remote Visual Cron server. We do this to distribute the processing load. We keep an instance of Visual Cron purely doing Scheduling and an other (can be multiple) instance of Visual Cron for processing.

The alternative method using the WMI channel did not bring back the outputs of the IO streams.
BTW in the previous post
Hector
2014-08-15T16:01:54Z
Further info. The full exception is

Exception in Task: System.ArgumentNullException: Array cannot be null.
Parameter name: bytes
at System.Text.Encoding.GetString(Byte[] bytes)
at OBOKIIHBDBPMCFALPGECCIFHCDJPEDKODDGK.CCEDIKOJOACMABGAIHHOHPJCDMJPDMLJKHNK.JKEKJGLIDAFCKLBOJBNNLAOJKNCCEAKIJLII() in C:\sourcefiles\code\VisualCronService\Jobs\clsTaskFoundation.vb:line 719


We've worked around the problem by placing the exe's into a cmd file. and appending >nul 2>nul to each command line. This pipes the output of the exe to null and the job succeeds.
Support
2014-08-18T09:48:26Z
But why do you need the SetCursorPosition method?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Hector
2014-08-20T14:43:45Z
Its a way of backspacing. Of showing progress without scrolling through lines. It is used to make the output pretty. Whatever the reason it appears to be causing vcron to fail on the app.
Support
2014-08-20T15:08:01Z
Yes, it makes no sense to keep it as the process runs hidden in the background by VisualCron. Please just remove that function.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Hector
2014-08-20T20:42:20Z
Henrik,
We have two vcron servers and we want to have one as the scheduler and the other as a remote executioner of jobs.
We use the execute process. with background execution context on a the remote executioner.
We see the process run, we see the output files from the process indicating that it succeeds but when we are done an exception from outside our application happens.

It is either
1 )Exception in Task: Array cannot be null.
Parameter name: bytes
or
Exception in Task: System.ArgumentNullException: Array cannot be null.
Parameter name: bytes
at System.Text.Encoding.GetString(Byte[] bytes)
at OBOKIIHBDBPMCFALPGECCIFHCDJPEDKODDGK.CCEDIKOJOACMABGAIHHOHPJCDMJPDMLJKHNK.JKEKJGLIDAFCKLBOJBNNLAOJKNCCEAKIJLII() in C:\sourcefiles\code\VisualCronService\Jobs\clsTaskFoundation.vb:line 719

We originally thought the cursor position calls where the culprit, but we have commented these calls out of our code and we right nothing to the default output stream and still get these exceptions.

Sorry for the confusion but we are tracking this down. We changed to this scenario from using the WMI "remote execute" since we like the capability of seeing the output stream in the vcron log.
Thanks
Hector
Similar Topics
Users browsing this topic
Scroll to Top