MadShark
MadShark

Reputation: 139

Xcode 5 constantly crashing. Looking for root cause.

I know this is a site more for coding questions, but I have been having a problem with my game crashing for about two weeks now, and Apple hasn't even begun to be helpful in solving the issue or even identifying what it could be. I was hoping maybe someone has experienced something similar and could at least get me pointed in the right direction.

For about a week I had a problem with Xcode crashing every time i accessed a current file (gameboard.m) in my game. This file had existed in my game for months and NEVER caused a crash and never did until a few days after I installed Xcode 5. Whenever I would be working, and click on my gameboard.m, it would, with increasing frequency, crash xcode. When looking at activity monitor, my free ram would go from 5gigs to about 10 mbs, and I would have to force-quit xcode.

After gameboard.m would crash xcode, it would crash xcode upon opening every time after that. I found a temporary fix for the issue by duplicating my file, going into it and deleting the gameboard.m file, then copy and pasting it from the previous version and re-importing it.

Sometimes I could click on gameboard.m and it would open just fine, but then if i press Cmd+Opt+Shift+Left to collapse all my methods, THAT would crash xcode. Every time xcode crashes its the same thing, Ram goes to 0, freezes until force-quitted. After the first week and about 30 copy-pastes fo my game, my quick fix stopped working and I couldnt open ANY file on my desktop, including files I havent opened in months.

So far I've submitted a bug ticket, to which i have gotten no replys besides asking for additional crash reports, I've reinstalled xcode MANY times, created a new user and tried working on that, and am about to reinstall my OS. I'm trying to figure out if it is a code related problem, or a hardware problem that needs to get fixed. I know I have some memory leaks in my game which I am trying to address right now (I've been teaching myself how to program since the start and this has been a gaping hole in my education until now. Any good source material you guys know of point it my way!!)

Side question: If you have a memory leak, when does the computer take back over the allocated ram? Exiting simulator? Restarting computer?

Again, i know this is a bit of an unusual question for SO, but I've been unable to do any work for 2 weeks now and I cant see any end in sight, so any help or ideas i can get from you guys would be very helpful. Thank you!!

Upvotes: 3

Views: 1873

Answers (4)

zeeawan
zeeawan

Reputation: 6905

My Xcode was crashing every time I opened it for the last opened project. I got the issue resolved by following the following steps took from here.

  • Open a Finder window and navigate to your project
  • Right-click on the .xcodeproj file (it’s a package actually)
  • Select Show Package Contents
  • A new window appears
  • Delete a folder called xcuserdata
  • Also, delete scuserdata folder from project.xcworkspace inside the .xcodeproj file

Upvotes: 0

John Milner
John Milner

Reputation: 1

I solved this by closing the project, then opening only the offending file in Xcode 5. Then 'Save' and the project then opened fine!

Upvotes: 0

Rob Napier
Rob Napier

Reputation: 299355

The most common way to resolve Xcode crashes is to clear out the derived data directory. Go to Preferences>Locations to find out where it is. Delete the whole directory tree. The default is ~/Library/Developer/Xcode/DerivedData but it may be different for you.

That said, the fact that this continued even when you were working as a different user is troubling, since by default the derived data directory is per-user, but it is possible you've set it to a single place.

Upvotes: 3

RyanR
RyanR

Reputation: 7758

I'm assuming by 'bug ticket' you mean the RADAR system (with its new facelift). If this is really preventing you from working on your app and that is critical, what you need to do is file a Technical Support Incident. You get 2 with your developer account, and you can buy 2 more at any time. This will put you in touch with an apple engineer that will focus on finding a solution to your problem as quickly as possible. I've only had to use it twice, and both times they had a solution for me within 48 hours.

Upvotes: 0

Related Questions