Does Xcode 12 (12A7209) crash Spotlight? Also Core Data template does not run in Simulator. Also makes Mac super hot and fans whirl?!

Is anyone else experiencing problems with the new Xcode 12 (build 12A7209)? Specifically:
  • Xcode crashes spotlight when running Simulator or Previews

  • Xcode makes Macbook Pro run very hot and fans kick up

  • Using a Core Data template with SwiftUI and running it in Simulator produces a blank white screen and never shows the timestamp list.

Made a feedback ticket using Feedback Assistant, and attached a copy-pasted diagnostic error report for the Spotlight crashing issue.

Is anyone else experiencing this? (I'm on a Macbook Pro 2017 touch bar) on Catalina MacOS.

Is this just me? It's not like this Xcode is in beta anymore, right? The Mac App Store has the updated Xcode 12, but I can see on the Apple Download website that there's an Xcode 12.2 beta as well.. I'm assuming Apple just decided to copy-paste the Xcode 12 beta 6 and rename it Xcode 12.0 for the 12A7209 build and expect everything to work out fine.

My Mac can barely run it without fans blazing and fingers melting as I tap my lava keyboard..


Yes.

I just launched Xcode Version 12.0.1 (12A7300)on a fresh installation of Catalina 10.15.7 and started opened an Xcode project.

When I launched the refresh Preview or Simulator I get the same error:

Spotlight unexpectedly quit.
Same issue, it is very annoying. Could anyone help to fix the issue.
For what it's worth, I had the same problem. I've been frustrated by this for days since I couldn't build or test my app. In the end, I think that I found the problem. If this is your problem, then maybe this will help you. If not, good luck:

I have a Navigation View driven app that pulls files from the device and the web. The files are json files which contain menu items. All of the problems appeared to be coming from my base menu view which looked something like this:

Code Block Swift
//omit a bunch of stuff
NavigationView{
VStack {
//a bunch of HStacks and VStacks and buttons
}
.NavigationBarTitle(Text("someTitle"))
.toolbar {
ToolbarItem(...content: {
HStack {
spacer()
Button...
spacer()
Button...
spacer()
Button...
}
}
}
}
.onAppear(doSomeStuff)
//omit some more stuff

The ".toolbar" is what was causing the problems. I commented out the .toolbar bits. After testing, I reenabled all of my Spotlight checkboxes (see this thread for references), and remove "CoreSimulator" from my list of private areas to prevent spotlight from searching (also see this tread).

The app is back to its snappy self without any crashes.

When I add the .toolbar back in any location, the app goes back to causing problems. After removing one item at a time from the HStack of the ToolbarItem, I found that the problem was the use of the "padding()" in the HStack. Upon further testing, "spacer()" also causes a problem. Why? I don't know. But getting rid of the padding()s got rid of my problems.

One item worth noting: I suspect that the problem is somewhere around the auto layout bits of SwiftUI. I do not have other auto layout elements in place to test with so I cannot confirm the hypothesis.


Mac OS Catalina 10.15.7
Macbook Pro 16
Xcode 12.0.1
Same problem
Same problem here: every time I work on Xcode 12, the message "Spotlight quit unexpectedly"

Attention Everyone


This post continues to receive plenty of comments experiencing the same issues as described in my post. There have been a few who have posted potential work arounds. It's good to know my experience isn't uncommon. However, to properly change and fix things - this is what we all must do:
  1. Open Feedback Assistant (apple's service for collecting feedback from developers using their tools like Xcode) - Feedback Assistant is a website for those who don't know.

  2. Open a new ticket describing the issue with Xcode and the crashing and the high CPU usage.

  3. Wait for Apple to notice and ask for more information from you.

In doing so, by sheer number of similar reports in the Feedback Assistant we will help Apple notice and fix these issues, and hopefully make the Xcode experience much better for the foreseeable future. I'm sure we agree that we all want to help Apple make Xcode great to use and operate as the best dev tool in the mobile marketplace.

Just today, I have received reply from Apple on my ticket regarding one of the problems listed in this post and I have followed their instructions to send them over a diagnostic report generated via Terminal, which will help them see what exactly the issue is.

Also as a sidenote - I had repaired my macbook pro last week because i noticed that it was not sitting flat and the screen was not closing flat, which is a sign of swollen battery. I also noticed i had high CPU usage from my antivirus (BitDefender) when first running the simulator. I'm not sure if they are related problems, but I do still experience issues like high CPU with Xcode after the repair and disabling BitDefender. But the Spotlight issue does seem to have disappeared for me; although I can see on my Activity Monitor, some process called "CrashReport" appears with high CPU usage when I run the simulator, then it disappears after a minute.


Same issue but what about solution ? Are there any solutions for these problems?
I cannot properly view or edit the xcdatamodeld file in XCode12.01 or XCode 12.2 in table view. There appears to be a rectangular white space overlaying the editing area at the top left of the editing area. Because you can see some lines and a bit of the '+' at the bottom of the area.
This solution by @libar worked for me:

Add the /Users/<username>/Library/Developer/CoreSimulator/ to the privacy tab in spotlight settings.

Just blanket disabling spotlight for the entire Applications folder is not a great solution if you use spotlight to find and open other applications.

Hope this helps.
Yes adding the /Users/<username>/Library/Developer/CoreSimulator/ path to the privacy tab in spotlight settings should be better than I made with unchecking the whole /Application in Spotlight.

But Xcode brings too many other bugs as too high cpu usage in previews (even with this workaround and no spotlight crashs) or the print function which displays nothing in the debug output when in debug live preview.
I've tried Xcode 12 beta 2 which even worse on cpu usage (on my Mac) and doesn't fix any of these bugs.

So now I went back to Xcode 11.7 a most stable version I think.
Just roll back to xcode 12.0, this is the latest non crashing version
I had the same issue after upgrading to 12.0.1, going back prevented the glitch

Just wait for a new release
I am having the same problem about Spotlight crashes, fan working heavily with Xcode 12.0.1

Did anybody try Xcode 12.2 beta 3? Is that beta version solving the crash problem?
Same problem with Xcode 12 and 12.0.1.
Yesterday, I tried with Xcode 12.1 GM, and issue cleared
I still have this problem with Xcode 12.1.
Сonfirm, XCode 12.1 has problem with crash. Stay on 12.0
Does Xcode 12 (12A7209) crash Spotlight? Also Core Data template does not run in Simulator. Also makes Mac super hot and fans whirl?!
 
 
Q