Jeenal Infotech

Xcode 8.2 simulator crash when save screen shot

Overview:


After upgrading to Xcode 8.2, We are facing the Xcode crash issue every time we save the screen shot (⌘S) in simulator. Even Reset Content and Settings… option won’t help.

After spending a lot time, I came to know that Simulator crash only happen on OS X El Capitan when saving a screenshot and not on macOS Sierra.

The crash seems to occur due to a segmentation fault, or more specifically a general protection fault, while calling the saveScreenShot: selector.

Solutions:


Option 1:-

1) Go to Simulators > Edit > Copy Screen (⌃⌘C)

Simulator_Edit_CopyScreen

2) Open Preview App > Go to File > New from Clipboard (⌘N) and Save (⌘S) to your favorite location on your machine

Preview_File_New_From_ClipboardOption 2:-  Using the xcrun Xcode command-line utility

Open Terminal App and run the following command to take screenshot

xcrun simctl io booted screenshot

If you wish to save the captured screenshot to specific location

xcrun simctl io booted screenshot <path_to_output_file>

Leave a Reply

Your email address will not be published. Required fields are marked *

Show Buttons
Hide Buttons