Problem saving script inside another script (when top script is open)

I have an AppleScript app that runs one of two AppleScript apps that are stored in its Resources folder. (It decides which one to run after testing some things in the user’s system.) For clarity, I’ll call the app that contains the other two apps the “top-level app” and the others the “contained apps”.

If if I have both the top-level app and one of the contained apps open in Script Debugger, and try to save the contained app after making changes in it, Script Debugger stops responding and displays the spinning beachball. This does not happen if I only have the contained app open.

Is this a peculiarity of my over-complex scripts, or is it a problem in Script Debugger that might be fixable in the future? Everything else in Script Debugger is working beautifully, and I’m not sure how I managed without it all these years.

No, Script Debugger should not fail in the way you describe. I have two requests:

  1. When you get this hang in the future, please use the Activity Monitor application to get a Sample report of Script Debugger. This may tell us what Script Debugger is waiting for when you experience the spinning beachball.

  2. If possible, reduce your script to its simplest form while still demonstrating the hang you are experiencing and send that to me. Once I have that I’ll see if I can reproduce the problem here.

Thank you for looking into this. Here is a sample created by Activity Monitor when the problem occurred earlier today:

If this doesn’t help, I can try reducing the script for you to experiment with. But three things may be of interest:

  1. Just a detail: I changed my app so that it uses a single script and a couple of script libraries instead of running two separate scripts, but the same problem occurs - not always, but often enough: If I’m editing the main script and one of the script libraries in different tabs, and try to save one or the other, I get the spinning beachball.

  2. This may not be a Script Debugger problem but a problem in OS X. I experienced the same beach-ball problem in the Yosemite Script Editor when I was working on my script in a VMware Fusion VM. I had the main script open in the editor and one of the script libraries open, and when I tried to save the script library, the Script Editor locked.

  3. In case you want to look at this now, the application bundle is here:

It uses the open-source libwpd software to convert old WordPerfect files first to Open Document format, and then it uses either Word 2016 (if it’s installed) or textutil (or TexteEdit) to convert them those files to DOCX, DOC, or PDF formats.

Please don’t burst out laughing at the code; I don’t pretend to know what I’m doing, and my coding method is to throw things into the editor until something works.

Looking at the sample report, Script Debugger appears to be hung waiting for code signing to complete. Until I can figure out what is actually happening, you should probably turn off code signing during development and then you can apply code signing when you are done.

OK - thank you for that. I’ll take your advice and turn off code signing until I’m ready to distribute. Meanwhile, thank you also for Script Debugger. It took me a long time to take the plunge and buy it but version 6 made it impossible to stay away.