Crop, Save, Close Selected Image quickly in Preview crashes

Originator:peter
Number:rdar://28402583 Date Originated:21-Sep-2016 03:30 PM
Status:Open Resolved:
Product:macOS Product Version:Sierra
Classification:Crashes Reproducible:Always
 
Summary:
Preview crashes if you type the Command-K (Crop), Command-S (Save), Command-Shift-W (Close Selected Image) quickly.

Steps to Reproduce:
If you have multiple images open in a Preview window, and select a rectangular selection, and then run this AppleScript in Script Editor, switch back to Preview, Preview will crash when the Crop, Save, Close Tab happens in quick succession.

I could not duplicate it typing the keystrokes manually, but typing the Command-Shift-W quickly is tricky.  If the command key were changed in the System Preferences, it might be possible.


Expected Results:


Actual Results:


Version:
macOS Sierra 10.12 16A320

Notes:
This is very easy to duplicate.

Configuration:
macOS Sierra GM

Attachments:
'Crash Preview.scpt' and 'Preview Crashlog.txt' were successfully uploaded.

tell application "System Events"
	delay 5
	key code 40 using command down
	key code 1 using command down
	key code 13 using {command down, shift down}
end tell

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!