Option-dragging to duplicate a playground page crashes Xcode

Originator:igeek1
Number:rdar://47971270 Date Originated:11-Feb-2019 02:10 PM
Status:Open Resolved:
Product:Developer Tools Product Version:Xcode 10.2 (10P91b)
Classification:Crash/Hang/Data Loss Reproducible:Always
 
Summary:
Title says it all.

Steps to Reproduce:
1. Open Xcode.
2. Choose File → New → Playground…
3. Choose macOS → Blank.
4. Save it on the desktop as CrashDemo.playground.
5. Press Command-1 to show the File Inspector.
6. Right-click the CrashDemo playground and choose New Playground Page.
7. Press Return to accept the default name of “Untitled Page 2”. You will also see “Untitled Page” below it.
8. Option-drag Untitled Page 2 under the CrashDemo top-level entry with intent to duplicate this new page to make a third page.

Expected Results:
The page is duplicated and a new name is chosen, just like if you duplicate a file in the Finder by Option-dragging it within the same parent folder.

Actual Results:
Xcode crashes when you release the mouse button.

Version:
Xcode 10.2 (10P91b)

Notes:
It looks like this is specifically disallowed in Xcode currently, because the crash log contains the text: :Can only copy groups, not _IDEPlaygroundPageFileReference”. So Xcode should either guard against this more directly, or support it as a feature.

Reproducible in Xcode 10.1 and 10.2 beta 2. Crash log also uploaded at https://cl.ly/319931578f8d

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!