Xcode crashes on canceled upgrade of Xcode Server

Originator:davidbalbert
Number:rdar://49532241 Date Originated:1/2/2019
Status:Open Resolved:
Product:Xcode Product Version:10.2 (10E125)
Classification:Bug Reproducible:Always
 
Summary:

If you cancel upgrading Xcode Server by pressing "Cancel" when you are asked for your admin password, and then navigate to another section of Xcode's settings during a specific time window, Xcode crashes.

Steps to Reproduce:

1. Install Xcode 10.1 (Mac App Store)
2. Install Xcode Server from within Xcode (it's possible I installed Xcode server from an earlier version of Xcode, but I think this is unlikely)
3. Uninstall Xcode 10.1 by dragging it to the trash and emptying the trash (this may not be necessary to reproduce. I did this when upgrading to Xcode 10.2 because the App Store reported that I didn't have enough free space to upgrade).
4. Install Xcode 10.2 (Mac App Store)
5. Open Xcode preferences and navigate to "Servers & Bots." The settings pane should have the text "Upgrade Xcode Server, Your computer is configured to run Xcode Server with an older version of Xcode..."
6. Press "Upgrade"
7. When the "Xcode wants to make changes" dialog box comes up, press "Cancel."
8. Wait until the settings pane reads "Xcode Server Not Yet Configured"
9. Wait three additional seconds. This is important. If you don't get the timing right, you won't reproduce the bug.
10. Navigate to another section of the Xcode preferences ("Text Editing" works).

A note: If I wait long enough after pressing "Cancel" without navigating to another preferences section, a dialog sheet with the subject "You must log in as $USERNAME to run integrations," appears with buttons labeled "Log In" and "Don't Log In." It's possible that this dialog box is an indicator of some sort of hidden state necessary to reproduce the bug.

I've attached the output from my system console from 17 seconds before the crash to 2 seconds after the crash. The "Xcode	Fatal error: Unexpectedly found nil while unwrapping an Optional value" at 16:17:16.889627 is when the crash occurred and likely the issue.

I've also attached screenshots of the upgrade screen, the modal dialog where you press "Cancel," the preferences screen before it says "Xcode Server Not Yet Configured," and the preferences screen that says "Xcode Server Not Yet Configured" (this is the point where you have to wait 3 additional seconds before triggering the crash).

Expected Results:

You see the "Text Editing" section of Xcode's preferences.

Actual Results:

Xcode crashes.

Version/Build:

10.2 (10E125)

Configuration:

I'm not sure what configuration I should attach, but I'm happy to provide any if it would be helpful.

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!