Xcode8: SIGKILL from the simulator running a new app occasionally bubbles up and causes confusion

Originator:markd
Number:rdar://27349531 Date Originated:7/14/2016
Status:Open Resolved:
Product:Developer Tools Product Version:Version 8.0 beta 2 (8S162m)
Classification:Ui/Usability Reproducible:Sometimes
 
Summary:
This happens to me occasionally - I go to run an iOS app from Xcode in the simulator. There's a prior version of some app in some open Xcode project.

The simulator kills the app with SIGKILL.  Understandable. Most of the time that doesn't get noticed.

Sometimes, though, the app that's running gets the SIGKILL to stop in the debugger, pulling that app's project to the front.

There's two usability problems with this:

1) More often than not, I don't notice the change in the project (all Xcode project windows look the same).  The code that's being displayed is the boilerplate main(), so it's identical from project to project.  If I do Run again (since I'm used to Xcode getting confused and a re-run fixes things, c.f. rdar://27268734 / rdar://2716318), I've now run the _old_ project, not the new one.  Sometimes I get a SIGKILL in the other project. But more often I get the old app launching in the simulator, swear, and go back to my other project

2) When this happens in the same project. (I run it, edit stuff, re-run it, get a SIGKILL), it resets the current source code view to main. I may have gotten a source window all set up with break points, scrolled to the right place.  Sometimes the Xcode "back" button gets messed up, so I can't return to the precise place I was before, leading to more grumbling as I manually kill the app, get my source window configured happily, and re-run.

I'd be happy if the behavior was consistent - always show the SIGKILL stopping in main, or never showing it.  The "most of the time, the KILL isn't shown, but sometimes it does, pulling random project files to the front" is frustrating.

Attached is a movie showing what just happened.  Project left over from last night got the SIGKILL.  If I had been running full-screen, I would not have noticed it was a different project.

Only having one project window open at a time is a non-starter. I frequently have two or three of them open as I'm building course materials (so I can, like, teach people to use Xcode and develop on Apple platforms), with the starter project and final project for comparison, along with the in-medias-res version halfway through the chapter.

Steps to Reproduce:


Expected Results:


Actual Results:


Version:
Version 8.0 beta 2 (8S162m)
10.11.5 (15F34)


Notes:
It's really not that big a deal - just swap back to the original project file and re-run, but
when these kinds of things happen day-in, day-out, it's just another heavy-sigh
death-of-a-thousand-cuts that makes using Xcode unpleasant.


Configuration:
This has been happening at least since xcode 7.  Maybe before, but I don't recall.

Attachments:
'kill-kill-kill.mp4' was successfully uploaded.

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!