Script Editor crashed and now hangs on start

Yesterday i was working on a script when the Script Editor crashed and now it is hanging when I try to start it.

I had copied a function and pasted it in again to change it to a new function. Then editor crashed.
The function was a combination of Reading a Property List Key Value and then Changing a Property List Key Value from official Docs https://developer.apple.com/library/archive/documentation/LanguagesUtilities/Conceptual/MacAutomationScriptingGuide/WorkwithPropertyListFiles.html

The function was working. No errors.

I tried erasing Script Editors plist file and cache but still no luck.
On another account the Editor is starting and working.

Any help is greatly appreciated.

Marc

No idea if this helps, but:

  • did you restart the Mac before deleting those things? Prefs are under control of some daemon, and may not be written to disk when you think they should.
  • is Editor trying to open the document that was open when it crashed? If so, deleting that might help.
  • and restarting alone may suffice…

I had not tried to delete the file. Delete and Restart fixed it.
The most obvious solution not recognized :wink:
Thanks for the suggestion.

For me 3 times I have been having issue with Script Editor.

If the file is not saved it store files in iCloud… its a Script Editor way of autosave.
If a issue occurs and hang Script Editor it will not always work to reopen after force quit.
So I move the files untitled names from iCloud to a folder on my local drive.

Reopen Script Editor with only empty document.

If I need to reuse the Script I move… I could open them.

Maybe that will work for you, when Script Editor hangs or crash it could also prevent to start
to normal state. But It has only happen to me 3 times…

I duplicated the file that caused the crash and then deleted the original file.
After a restart I can use the Editor again and also could open the copy of the file.
Then copy and pasted everything to a fresh file.Seems to work again.

I am glad it worked out like that.
Reminded me to keep versions of scripts in various states to have he possibility to go back if necessary.