Crashes on multiple script runs

Does anyone experience crashes running a script multiple times in a row?

From within the script editor, pressing the play button or cmd-r. Once a script returns, make a small change and try to run the script again. (Might take a 3rd try.)

Ever since the runestone update, and still as of version 1.7.4

Fully locks up the app – have to wait 60 seconds or force-quit.

Could be a webview or regular javascript code (running tests), doesn’t seem to matter. Though my scripts are a few hundred lines long.

Unfortunately I can’t really help you because I don’t have this issue but I think that it might have something to do with your scripts. I have tested it with a script that has about 4000 lines of code and only noticed that the editor sometimes reapplies the syntax highlighting.
When a script waits for a promise that never resolves then I also have to force-quit the app. I could close the editor and open it again but then I new log messages appear that are logged within a timer function. This is expected behaviour because the app doesn’t stop any execution. But this probably doesn’t help you.

You could try removing the app and installing it again. If this doesn’t solve it then please share a script where the issue appears (remove any personal information before sharing).

1 Like

I think this might just be a log window issue, with a race condition.

Paste this into a new script:


I think it has to be more than 2 log output lines.

Next important point: make sure the log window is closed/hidden.

Run it, then run it again quickly. (Don’t need to try to run it a second time while the first is still running – you can wait a second between runs.)

After running 1, 2, 3 times, at least for me, subsequent runs will lock the window.

I think this has something to do with the log window rather than the editor. I’ve heard few reports of similar issues but haven’t been able to track down the root cause yet.

1 Like

Hello Simon,
First, thanks for your formidable app.
Same problem yesterday (and not today for the moment) even with iPad shutdown.
Yes, it is a problem with the log window but what ???
For your investigations, just before the crashes, I worked with modules and the logs of the imported module were executed suddenly three times instead of logs of the calling script.

1 Like

I have now experienced the same issue. I can run the script as often as I want when the log window is open. But when I try to run it and there is something printed in the log, then the app completely freezes and I’ve to force quit it. This means that I can open the edit view, run it, close the edit view and open it again and run it again as often as I want without any freeze.
It looks to me like the problem might be related to clearing the log when it is hidden.

I agree. I have similar issue both on scriptable beta and not. Always seems to happen with the editor open from what I recall. Often have crashes when editing a script and then trying to run. I found if I close the editor first after making changes, then open it again and run the script, it usually works without crashing the app. Seems maybe it’s getting stuck somewhere?

I’m having this issue very frequently and can reproduce it the same way as @galtenberg. I’m on the latest TestFlight beta and iOS 16.2 (but it started a while ago). Please let me know if there’s anything I can do to help track down the root cause.

1 Like