Skip to main content
Stefan Rakete
Inspiring
July 3, 2024
Question

Batch script breaking after 100 documents

  • July 3, 2024
  • 1 reply
  • 410 views

Hi,
a batch script that I created for Illustrator will break after about 100 documents that have been processed. I am closing every document after processing and everything works fine if I process less than 100 documents at a time. What can cause this Illustrator behaviour and how can I avoid this? I am on an Mac M1 using OS Ventura and Illustrator version 28.5

This topic has been closed for replies.

1 reply

Inspiring
July 5, 2024

AI crashes after opening and closing >100 docs? I remember dealing with that bug from more than a decade ago. (Using the AppleScript API, but the JSX API shares a lot of the plumbing.) Quitting and restarting AI after every 100 docs was the workaround; you can easily do that using AppleScript. (If your script is JSX, write an AppleScript helper app that performs the relaunch, then have your JSX run it via `File.execute`.)

Stefan Rakete
Inspiring
July 5, 2024

Yes, AI is crashing. Thanks for the workaround. Anything I can do about memory management within the script itself to avoid the crash?  Thanks

Inspiring
July 5, 2024

It seems to be the number of files opened and closed that triggers it. Nothing you can do about that. Implement the workaround, file a bug report if you want, and move along.