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.

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.