Arithmetic operation resulted in an overflow - VisualCron - Forum

Community forum

Nupay_TSP_Dev
2008-10-28T08:22:50Z
I have an execute task that periodically fail with the following error - Arithmetic operation resulted in an overflow. What could be a possible cause for this error? Is this a VisualCron specific error or is it a problem with the exe itself? When the task fails and run again straight after the failure it runs successfully.
Support
2008-10-28T11:17:26Z
It could be various reasons:

1. VisualCron is returning the exit code which is not returned when you run it normally. Maybe this exception has existed every time but you have not seen it. This could be the case if the Task returns an error but "works" anyway.
2. It could be related to the context which you are running VisualCron in. It depends of what your Task do. Often, this is related to security and permissions. Try adding a Credential to the Task that uses the same user as you normally are logged in as.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Julien
2009-03-02T13:08:46Z
Hi,

Are there any news about this issue?

Indeed, I get the same error. I do not understand why, because when I created my job & task, it was fully functional. But for few day, I always get an error 77777.

The job is very simple, it just uses a timeout to stop the job
The task is "Execute" type to run a .bat file with credentials corresponding to my account. I use the logon type "With profile" with "Run with API code" option. I tried other credential options, but it didn't solved the issue...
Support
2009-03-07T08:06:45Z
In Juliens case this is a timing error. When the timeout is reached the application is killed. The ending application may not like to be "killed". Maybe it is in the middle of something - hence the error. To supress this kind of error you have a check button at the timeout of the Job and Task which controls this.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Julien
2009-03-23T10:03:24Z
Hi,

Thanks for the news.

I know the error is due to timeout, but why did I encounter a timeout?

For most of the jobs, I set timeout to 2x normal execution duration of my programs (means if a program needs 5 minutes to executes, I set timeout to 10 minutes)

This morning, all jobs were failed with this error while it was running for 2 weeks without any problem? This may be due to external error - like network disconnected - but now I can control everything is OK, but I still have error.

I will check admin console session to check error messages, but I find it strange.
Julien
2009-03-23T15:18:34Z
Hi again.

I was able to check errors that appears within administrator session.

I had a lots of popups with the following message:
"The application failed to initialize properly (0xc0000142). Click on OK to terminate the application."

After some investigations, it seems this message indicates troubles when using credential to "run as" applications.

I didn't find another solution than planning a reboot of the server that runs visual cron :(

Do you have tips regarding this problem?

Thx
Support
2009-03-23T15:28:52Z
This is a generic windows error. It is important to know that a Timeout in VisualCron has no other choice than killing the process instantly. This can lead to strange errors like this because the original process might feel that it was not terminated properly.

As this is a generic error there is no specific solution. Especially if there is a Task that has worked before. It could be, as you say, some kind of network problem or exhaustion.

First you could try to restart the VisualCron service and see if that helps. If not it is something outside of VisualCron. It might be interesting to check the Event viewer for other errors.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Julien
2009-03-24T09:49:53Z
Hi,

I tried to restart the VisualCron service (tray icon & services manager), but if I was able to stop it, I was not able to restart it... 🤦

Here is a screenshot of the event viewer related to this issue:
UserPostedImage 

I'm using VisualCron version 4.9.40.

When I check the logs, I found the following entries in log_server file:
- "Err Error OpenDesktop: 5 - Access is denied."
- "Info Job did timeout." (just after)

If it can help
Support
2009-03-24T12:18:52Z
Try changing from API to Managed mode in the Execute Task settings.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Julien
2009-03-24T18:07:15Z
Hi,

Using the managed code returns the following exit code: 128 (There are no child process to wait for)
Support
2009-03-24T18:46:06Z
It seems like the system is exhausted in some way. I think restart of Server is the only way right now.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Julien
2009-03-24T19:29:08Z
Hi,

I'd like to know why it' not possible to restart the service.

I restarted the server this morning, the tasks were running normally after that, but few hours later (maybe 2 hours), the problem appeared again.

I cannot restart the server when I desire because it is used by other people for production activities, and this inpact a lot of people... And in the same time, if I cannot schedule tasks, I have to launch them by myself via direct links (of course, I cannot start them with visual cron)

I understand it's not easy to find a solution, perhaps I did not give you all required information. Just ask me what you need to know !

For the moment, I use Visual Cron on another server not used by people (it's a rescue server), but I don't think it's a good solution (for the moment, it helps me, and will help - perhaps - to find the root cause)

Thanks for your help
Support
2009-03-24T19:32:58Z
We will try to give you a version which does not use the Windows API function OpenDesktop which fails on your server. We will notify you when it is ready, hopefully later today in the beta forum.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Support
2009-03-24T20:11:50Z
One question. How often do you run your Task?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Support
2009-03-24T20:27:01Z
Another question. Does it work better if you run your Task in hidden mode?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Julien
2009-03-26T22:29:20Z
Hi, sorry for these late answers, but I made some tests today!


> Concerning frequency of tasks execution, some of them are launched every hour (monitoring task)
For others tasks, they run one time a day each, but not at the same time (one starts at 1.00 am, the second at 2.am, so at one moment, only one task is running. But it is not forbidden that in the future, several tasks will run at the same time)

> The hidden option in task paramters does not change anything.

Concerning the test I realized today:
I disabled the "interact with desktop option" in the service options. This allow me to restart the service now, but without changes about error when trying to runs tasks.

I cannot use the API code as credential management (I get app initialization error 0xc0000142) but "managed code" seems to work. But I cannot acceed network resource requiring credential.

>QUESTION: can you quicly explain difference between API and managed code credential option?

Indeed, I created a small .bat script to test the current user:

echo %USERNAME% >> "c:\log_file.log"

And I noticed in the log file I did have the user of selected credential, but a generic account used to run services. I think this explains why I cannot run programs presents on network drives, because generic account does not have access to shared folder.

I think it was functional with API code (I'm sure because it worked), but not with managed code.

I'll hope it will help you!
Scroll to Top