Xcode 10 crash with SKScene

Most of my Sprite Kit scene are unable to be read in XCode, Xcode just crashes. I tried many solutions found on internet : delete the names, remove all the 2X and 3x. Nothing seems to work.


I tried to make a new project from scratch but i have random crashes when i try to put a texture on a SKSpriteNode.


I don't know what to do an it's an impotant project for me

Replies

I have the same issue with my scene but I managed to get it open so I could edit it for a while by:

1) Creating a new sks scene

2) Making sure it matched the size of the one that crashes

3) I opened both scens with a text editor and copied over the contents of the old crashin scene into the new one and saved the file

4) I managed to open the new scene in the scene editor allowing me to add some new sprites


Sadly the new one is also crashing when I try to open it, but luckily I managed to get the new content in.


I hope this solution (though temporary) works for you. I would love to hear how to solve it permanently though. Surely someone here has found a long term fix?

I tried to, open them with Vi but i don't understand what to copy


You're right i was also hoping a long term fix

I did this:

1) CMD-A to copy all of the original text

2) Switched to the new .sks file in the text editor

3) Deleted everything

4) Pasted in the copied text and saved the file


Then I opened the new .sks file. I had to adjust some sprites and labels.

Again, this was a short term fix as even this new file is crashing, but for a brief moment I could edit it.

It doesn't work or it works just for three sprite change and after it's gone


So all my work is lost

Help!

@Fonojo i have the similar problem, can contact you for search together a solution?

If you find a solution post it here please

I was following a SpriteKit tutorial (made in Xcode 9) in Xcode 10.1 this week and ran into this bug in the visual SceneKit editor. You simply can't use Assets.xcassets images that have @2x images and set the texture visually in the GameScene.sks file at all without Xcode crashing. If you don't use @X assets it seems to work fine though. This is a known bug but Apple hasn't fixed it in months.


The solution I found was to grab all of your images from the Asset Catalog and put them into a normal folder in the project. That will then allow you to texture the sks.


I'm laying out my Scenes in code instead because of it. It doesn't crash when I use the Asset Catalog and I can also make the layout support iPhone X screens along side iPhone 16:9 screens rather than using two sks files (as I was going to until the repeated Xcode crashing).


I still hope it gets fixed because prototyping visually is really quick with a visual editor if you just want to test something out.