Task failed with status -1

I'm getting a "Task failed with status -1" error on a macro. What can I do to get it complete? The macro reads a folder and execute a shell script for each file. I tried adding a 0.5s pause between loops but I am still getting this error.

Thanks.

We're pretty good around here, but we haven't quite mastered reading minds yet. :wink:
You'll need to post/upload your script/macro.

Please read:
Tip: How Do I Get The Best Answer in the Shortest Time?

1 Like

Can you please update the documentation with that a "status -1" mean? It is failing after ~2000 loops.

This is what the macro looks like.

This is what shows in the Error log.

2019-05-05 23:15:14 Task failed with status -1
2019-05-05 23:15:14 Task failed with status -1 Macro “process" cancelled (while executing Execute Shell Script).

After this error happens, every time I call the macro it fails immediately. I have to close KM, kill KM Engine, and run the macro again. Then everything works until the error happens again. I had to do this 8 times to process all files.

Hey Leonardo,

The macro and information you've posted is does not provide a real test case that either Peter or others can try out to see if the problem can be reproduced.

Error-strings are OFTEN not very informative, and Peter himself may not be able to look at it and say: "Right; that's this specific problem."

I'm able to run a simple shell command in a Repeat action 2000 times without issue, so your problem is going to require some real debugging.

If you want help then please post the actual macro.

-Chris

My guess would be the system running out of some resource, like pids perhaps. The system tends to cache various resources, and when you try to execute a large number of shell commands in sequence you can get cases where you hit limits on the resources because they have not been released yet.

You may be able to adjust the limits, but only if you can figure out what limit you have hit.

You might try not “ignoring results” and display or save the results and that may give an error message that indicates what the issue is in more detail.

-1 is not going to tell you anything.