Crash when using big variable in "Run Program"

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
rullbandspelare
Pro Scripter
Posts: 149
Joined: Tue Mar 23, 2004 9:11 pm

Crash when using big variable in "Run Program"

Post by rullbandspelare » Sat Dec 08, 2007 12:50 pm

Hi!
Macro Scheduler crashes when i use a variable that contains a lot of data.
But not when i feed all the data directly to the .exe that Run Program uses.

For example
This is contained in a loop:
Let>MultiFile=%MultiFile% %jpegfil%
And after the loop:
Run Program>cmd /c "dcmulti %MultiFile% >../images/multiframe.dcm"

Over a certain amount of data in %MultiFile% the MS script crashes. So it works OK for about 10 "items" in the %MultiFile% but after that it Crashes.

But if I do it like this it does not crash.
Run Program>cmd /c "dcmulti File1 file2 file3 file4 etc...>../images/multiframe.dcm"

This hapends with more .exe than dcmulti.exe as in this example.

Any ideas?
Thanks!!

User avatar
pgriffin
Automation Wizard
Posts: 460
Joined: Wed Apr 06, 2005 5:56 pm
Location: US and Europe

Post by pgriffin » Sat Dec 08, 2007 2:52 pm

Could you send the contents of the "large" variable that is causing a crash? My guess is that there is a string within your variable which is being interpreted as something like a CR/LF and causing problems with the call.

As always, you should turn on logging in your script and place % around around all your variables to see the values.

rullbandspelare
Pro Scripter
Posts: 149
Joined: Tue Mar 23, 2004 9:11 pm

Post by rullbandspelare » Thu Dec 13, 2007 7:48 pm

Solved!
It was two separate problems.

One was, as You said, a malformed variable. And the other was the external exe who crashed from the long list. Suplying it wit a list on the format "file*" solved that problem.

Thanks!

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts