Good job using ExtendScript to find exactly where the error occurred. The interesting part is what part of the script is executing when Photoshop crashes, at 9:19 in the video. Seems that Photoshop crashes when trying to run an action to get the ruler origin in the rulerOrigin
function. It is strange that no other users have reported this same failure, especially since you tried on multiple versions.
As mentioned in other threads nothing a Photoshop script can do should crash Photoshop, instead if there is a problem Photoshop should show the error but not crash. If Photoshop crashes completely instead of showing the script had an error, it means Photoshop has bugs and likely we need to rely on Adobe to fix Photoshop. 🙁
You can try modifying the rulerOrigin
function, for example change to this:
function rulerOrigin () {
return [0, 0];
}
That should use 0,0 for the origin instead of running an action to get the origin. Maybe that is sufficient for you?