Xcode doesn't start my app in Simulator

Originator:s.pankevich
Number:rdar://28915489 Date Originated:24-Oct-2016 05:07 PM
Status:Closed Resolved:
Product:Developer Tools Product Version:8.1 beta (8T47)
Classification:Serious Bug Reproducible:Sometimes
 
Summary:

Sometimes Xcode stops to launch my application. I saw this issue on iOS with Simulator but also when I was doing a development of a command-line Mac OS tool.

The symptoms are the following:

I start my iOS app as usually by Command+R, I start seeing the launch screen of my app and then it hangs. What is especially annoying is that Xcode stops responding to Stop action via both "Command+." and also Stop button doesn't work: it is clickable and is of solid black color but clicking on it doesn't change anything, the only thing is that I get:

"
*** If you believe this error represents a bug, please attach the log file at .....log
"

You find the log in attached.

If I kill both Xcode and Simulator and run the app again, the issue is still there.

I have tried to clean:
- My simulator by both manually and by using     xcrun simctl erase all
command.
- Derived Data
- App's Build directory
- Various folders like /var/folders/*, /tmp and /var/tmp

Nothing of this helps to resolve the issue. Restarting the machine once does help sometimes but sometimes not.

I noticed that if I don't do anything for some time (like turn on computer after a night) Xcode starts working again.

Steps to Reproduce:
No stable strategy to reproduce this. I run the app in Simulator and it is working but after a certain point when I run it again, it hangs.

Expected Results:
I expect to see my app running correctly. 

Actual Results:
I see it hanging on a launch screen instead.

Version:
Version 8.1 beta (8T47)

I saw the same issue on Version 8.0 and also before that in Xcode 7.x versions.

Comments

Response from Apple

Thank you for contacting us. The original report on this issue, Bug ID 23140937, is closed. If you still see the issue in Xcode 9 (when available) or a newer release, please file a new bug report. Please note that you will not be able to directly view the original report in order to keep its information confidential. If you have further questions about this issue, please update your report again using the Apple Bug Reporter .

By s.pankevich at Sept. 1, 2017, 1:01 p.m. (reply...)

Response from Apple

Apple Developer Relations15-Nov-2016 07:25 PM

Thank you for contacting us.

The original report on this issue, Bug ID 23140937, is still under investigation. We will notify you when it is closed.

Please note that you will not be able to directly view the original report in order to keep its information confidential.

We will do our best to keep you informed as new information becomes available. Please check release notes regularly for changes affecting this issue.

If you have further questions about this issue or wish to check on the status, please update your report again using the Apple Bug Reporter http://bugreport.apple.com.

By s.pankevich at Nov. 28, 2016, 9:30 a.m. (reply...)

Additional feedback

I can confirm that the following is the only reliable way to get out of this hanging behaviour:

  • after the app is stuck, kill Xcode
  • start building project and almost immediately cancel the build
  • start again
  • the issue doesn't appear

I hope this will help to nail it down.

By s.pankevich at Nov. 28, 2016, 9:29 a.m. (reply...)

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!