Skip to content

Category: iOS

How to fix Xcode Crashes

Tips for when your Xcode/beta crashes when you try to run.

TLDR: Xcode was crashing after building successfully but before running. Deleting my User Prefs fixed my error, but I’ve listed the steps I tried, and some other best practice options below.


My problem was this: Xcode 8 beta 2 arrived, and I went merrily on my way playing with all the great stuff we learned about at WWDC.

However, everytime I tried to build and run in the new Xcode beta 2 (and later in beta 3) I would get a successful build and then the whole program would crash without opening the simulator or deploying to a device.

I talked to a lot of people in my knowledge network, and did all sorts of searching on the error I was getting:

“Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY

Application Specific Information:
ProductBuildVersion: 8S162m
_ASSERTION FAILURE_ in /Library/Caches/com.apple.xbs/Sources/IDESpriteKitSupport/IDESpriteKitSupport-11049/Foundation/Classes/Document/SKEditorDocument.m:201”

This was strange, because the app I was working on was not using SpriteKit at all.  It was from a tutorial from Paul Hudson from his new Practical iOS 10 book. (which is great so far, fyi)

To test that it wasn’t something I’d done in the project, I made a new blank one, cleverly named ‘dontcrash’, and tried to build and run it. Xcode crashed again.

I actually ended up with several blank apps: dontcrash2, dontcrash3 dontcrashXcodebeta3 and finally- CrashyApp, before I hit on the solution. 

Basic Options for Xcode Crashes

  1. Clean the project.
  2. Target a different simulator you haven’t tried with the project yet.
  3. Delete Derived Data directory
  4. Delete app, re-install.
  5. Delete User Preferences
    1. As mentioned here: http://stackoverflow.com/questions/31354850/xcode-7-beta-3-crash-at-startup
    2. Note: Deleting the app and reinstalling does not remove the user preferences.
    3. This fixed my problem.Not sure how my prefs got confused in the first place.

Advanced options (I didn’t get this far)

  • Monitor memory usage in the Debug navigator
  • Inspect a few malloc generations in Instruments

 

iOS Project Log 12

Things are coming together.

Fixed a lot of auto layout issues, added a true type font to the app bundleStruggled with the scene builder quite a bit. it lacks precision tools, so I’m trying continue to create things in Tiled.

Started to add SKTileMap to my project, which will read both the objects/boundaries i place in Tiled, but also send the graphic information in the JSON export.

 

Screenshots

Tollway Towers Main Menu
Tollway Towers Main Menu

 

Tollway Towers Settings
Tollway Towers Settings

 

Tollway Towers Credits
Tollway Towers Credits

iOS Project Log 11

Ah, end of semester is drawing near, and I’ve got a conference and an apartment relocation going on all in the last 2 weeks! eek! ok. Full speed ahead on this.

I copied the todo list from the previous log, and have crossed things out that I’m just don’t have time for now.

This with an X mean I’ve started and/or finished an item. Today’s work specifically meant struggling with Xcode and auto-layout.

Design

Designers have sent me some UI assets, still waiting on level pieces for the actual maze. Working with what I have lying around.

Hero

  • X get hero graphics in,
  • animating properly.

Levels

  • Parse Json mazes
  • figure out how to parse image names in with the tmx file (maybe)
  • X Establish tile grid sizes – 70 x 70 or aspect 1:1
  • Create new sks mazes – working on this

Menus

  • X Start menu l
  • X Play button goes to first game level
  • X pauseSettings  scene – options don’t do anything yet.
  • X Credits scene – need to add links

Illusions?

  • may need to revisit this idea this summer
  • crop/mask
  • explore scenekit for enemies.

Sound

  • find bandura/mandolin/string sounds/chords for up/down/left/right audio – a friend has offered to synth some things for me.
  • tweak background music.
  • explore using SKaudio with UDLR sounds to help you know if you
  • are near/far from goal.
  • need hero movement sounds. perhaps some ambient ruins/castle sounds. Things sound stark.

 

it’s progress, right?

Brief Intro to Tile Maps, Spritesheets and Atlases

Presentation

As part of our class this semester, we each gave a brief talk about an iOS related topic. Teacher Eric recorded the presentation, and gave us the videos. There was no expectation of sharing the talk with anyone else.

However, YouTube makes it far too easy to share things, so… here is the vid.  I’ve been playing video games since childhood and web developing for most of my career, I thought that was unique enough perspective to give a talk on.

PDF of talk

I found a typo while giving the talk, I’ll leave that in for you to enjoy as well.

Here are the links from the resource page.

Resources