Corey F Corey F - 1 year ago 155
iOS Question

Xcode 8 crashes right after opening project (Seems to be Scene Editor related)

So Xcode 8 has been pretty buggy and seems to crash constantly when using the Sprite Kit scene editor and tile maps...

The error occurred while I had a scene open in the scene editor and was using tile maps.

Now I can't even open my project for more than 3 seconds without Xcode crashing...
Kind of at a loss as to what to do...

I've tried uninstalling and reinstalling Xcode...but that did nothing.

Here's a pastebin of the crash report.
Any help would be extremely appreciated.

Answer Source

Well the error is due to some empty array that is being indexed.

UNCAUGHT EXCEPTION (NSRangeException): *** -[__NSArrayM objectAtIndex:]: index 0 beyond bounds for empty array

Which is here:

3 -[__NSArrayM objectAtIndex:] (in CoreFoundation) 4
-[SKTileSet getCenterTileDefinitionForGroup:withRequiredOutputGroupAdjacency:] (in SpriteKit) 5 -[SKTileMapNode updateTileGroupsAtX:y:] (in SpriteKit) 6 -[SKTileMapNode rebuildTileSprites] (in SpriteKit)
7 -[SKTileMapNode setTileSet:] (in SpriteKit) 8
-[SKEditorTileMapNode assetReference:didUpdateFromDocument:] (in IDESpriteKitParticleEditor)

I get that is most unhelpful. But at least you know it is tile map editor related. This could very well be an Apple bug. But as Mark Brownsword mentioned above, if you have source control, you can go back to your prior version of the file that worked. Then diff with that version versus the current version. If you are not using source control, this unfortunately is an example of why source control is helpful.

Questions like you raise are difficult because you are not clear about actions that lead to this. This isn't to say you are doing something that isn't correct. But it is a difficult diagnosis when limited info is presented.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download