Why do random errOSAInternalTableOverflow errors return when running AppleScripts via ScriptingBridge?

We have an app that controls InDesign Desktop and InDesignServer via hundreds of AppleScripts. Some macOS security updates a while back dictated that we start communicating with other apps via ScriptingBridge. We couldn't afford to convert the hundreds of AppleScripts into direct ScriptingBridge nomenclature, so we opted to keep them as is and instead tell the external apps to:

[app doScript:<the script text> language:InDesignScLgApplescriptLanguage withArguments:nil undoMode:InDesignESUMScriptRequest undoName:@"blah"]

There are a handful of scripts that we did convert to direct ScriptingBridge.

There are times (and under the right circumstances, it's repeatable) when a certain script will have run perfectly dozens of times, and then it will throw errOSAInternalTableOverflow.

We create a new SBApplication for every job (which could be a single instance of Desktop or the multiple instances of Server).

Why is this error happening seemingly randomly? Is there anything we can do to work around or prevent this?

Our engineering teams need to investigate this issue, as resolution may involve changes to Apple's software. Please file a bug report, include a small Xcode project and some directions that can be used to reproduce the problem, and post the Feedback number here once you do. I'll check the status next time I do a sweep of forums posts where I've suggested bug reports and post any information about changes I am able to share to this thread.

Bug Reporting: How and Why? has tips on creating your bug report.

Hoo boy, making a sample app might be tricky. I'll find time to see if it's possible. Is there any way to know if the error is coming from OSA/SB or if InDesign is doing something goofy that would cause that error to be returned?

I spent all day yesterday trying to make the error occur, but had no luck. Of course, when we need to get a job out the door for a customer, it pops up all the time.

Yeah, this isn’t super surprising. errOSAInternalTableOverflow isn’t something I have a lot of experience with but it seems like it’s primarily associated with AppleScript’s garbage collector.

At least one of the places that raise this error logs relevant info to the system log, so you should have a rummage around in there to see if anything interesting pops out. See Your Friend the System Log for my advice on how to wrangle the system log.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

In your System Log post, this part has me confused:

Console supports viewing log entries in a specific timeframe. By default it shows the last 5 minutes. To change this, select an item in the Showing popup menu in the pane divider. If you have a specific time range of interest, select Custom, enter that range, and click Apply.

I'm not finding this pane divider popup, not as a visible control or as a contextual menu. Which pane divider? The Mac I'm looking on right now is sing macOS 26.3. My work one (not booted yet, but the one experiencing the problem for this thread) is 15.something.

Try this:

  1. In Terminal, collect the log for the last 5 minutes:

    % sudo log collect --last 5m  
    Archive successfully written to /Users/quinn/system_logs.logarchive
    
  2. In the Finder, double click the resulting system_logs.logarchive.

  3. In Console, you see a divider (pink arrow) and the Showing popup (purple allow).

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Why do random errOSAInternalTableOverflow errors return when running AppleScripts via ScriptingBridge?
 
 
Q