Learn Courses My Dashboard

Xcode Keeps Crashing

I’ve been cruising along in iOS Foundations. I’m in Module 4 Lesson 7 currently, but a couple of days ago Xcode started throwing a message saying to Reopen, Restart or Ignore. If I click Reopen it says I can’t use it with this version of software and wants me to update. I’m running Monterey 12.1 and Xcode 13.2.1, which are supposed to be compatible with each other. I sent the bug report to Apple but at this point I have to stop because I am getting errors I shouldn’t be following along with Chris and it won’t let me run it, which puts me at a stand still. I already struggle when it comes to the challenges sometimes where I feel like a just draw a blank. I’m not an Apple person, I use PC primarily so I’m not sure what, if anything, I can do to resolve this issue. I took a screenshot so you can see what I mean with all the errors. I have gone character for character in the RecipeFeaturedView in Xcode compared to Chris’s video and everything I have to that point is identical…

Has anyone run into this or know how to resolve it? I can’t imagine Apple responds timely to crash reports.

UPDATE: Decided to treat this like a Windows issue. Uninstalled Xcode and am reinstalling it now.

It’s unlikely that Apple will ever contact you regarding your crash report.

When Xcode gets a bit cranky (we all see that from time to time) try cleaning your Build folder - Shift + Command + K or close the project and re-open it or restart Xcode. You may have to resort to restarting your Mac. Those are the basic things to try initially.

Xcode is a huge Application and takes up about 32Gb of disk space. In the process of compiling Apps it takes up a lot of additional file space on your HD which at some point needs to be managed.

For macOS to work effectively it also needs free disk space for memory management. If you do not have sufficient free disk space you will run into problems to the extent that the machine may grind to a halt.

So, that said, how much free disk space do you have?

I have rebooted several times and cleared the Build folder. I’ve tried closing and reopening Xcode SEVERAL times as well. It took hours for the Xcode reinstall to complete only to find that did not resolve the issue either. Of a 1TB hard drive, I have 920.46 GB free.

Ah, this might have something to do with it.

The second modifier should be:
.indexViewStyle(PageIndexViewStyle(backgroundDisplayMode: .always))

OMG…I’ve gone through the screen several times and STILL missed that, LOL. Thanks! That cleared up all the errors except the one on line 23 that has "Rectangle()’’. The error says “Invalid character in source file”. Any thoughts on that one?

Alright, I clicked the red circle next to that error (not sure why I didn’t do that sooner) and it offered a fix:

(Replace " " with ’ ')

I clicked “Fix” and it fixed the issue but I don’t understand why because those characters are nowhere on that line that can see…

There may have been a hidden character on that line somewhere. I have had that issue which puzzled the heck out of me. I deleted the line of code and re-wrote it to solve it. You can set the editor to display hidden characters (invisibles) but that may not show up all hidden characters.

Screen Shot 2022-01-23 at 09.07.25

1 Like

Thanks. I toggled that on to see what that looks like and it looked as annoying as the hidden characters in MS Word :slight_smile: So, I turned that off but it’s nice to know that option is there for future reference as I’m sure I’ll have this issue again.