XCODE Crash when Applying Texture to Color Sprite

So I have been dealing with quite a fun problem today. I have been working in XCODE and have added all my @1x @2x @3x sprites for my player sprite and then headed over to the GameScene.sks file and placed a color sprite then tried to apply a texture to it.. Immediately xcode crashes... I tried a few more times, restarted computer, (Command-Shift-K) to clean build and nothing worked. The only thing that didn't make my xcode crash was to remove the @2x / @3x versions and just keep the @1x file in...


Please help! I submitted a bug but no one replied...

Replies

This *****.. same issue for me..


MacBook Pro 13-inch 2017

Xcode Version 9.2 (9C40b)

macOS HS 10.13.3


Tried the things mentioned at https://stackoverflow.com/questions/46879397/xcode-9-crashing-while-setting-a-texture-in-skscene-in-spritekit but no dice. Mine works if I just delete the @2x assets.

I see the workaround for deleting the 2x assets, but I ran into this issue when I only had 2x assets to start with.


Annoying, guess I'll work around it until a fix comes.

Same trouble for me, doing a training with only @2 assets provided... All crashed. Just submitted bug to Apple.


Will create @1 and try again ?

Has anybody made any progress / heard from Apple on this? It's driving me crazy and killing my workflow.

I haven't, besides adding textures in code, or laying out the nodes in the sks file and then importing the @2x graphics after finishing the layout. Very annoying... Xcode also crashes for me when trying to import images into tilemaps.

I have the same Problem but something is strange. All textures are no problem when I try to add them in 3x. As soon as I try 1x or 2x Xcode Crashes. Anyone suggestions for the reason?

Really, shame to Apple that this not being looked at. Really strugling with this.

Also having this issue. Bought a brand new 2k macbook and it crashes more than my crudy old macbook. Adding textures 1@ or 2@ crashes all the time so frustrating.

clear recent project - close your project then start it again. (+sometimes you need to delete the old color sprite and add it again)
so far that fix my problem 😐.

Hopefully apple fix this issue.

I have the same problem and can't seem to be able to find a fix. I messaged Apple Dev Support and I'll see what they reply.

I had the same issue and what worked for me was to bypass using `.xcassets` all together. I simply added a folder to my project and imported the images into the folder. After that, assigning texture in the scene editor no longer crashed Xcode

It has been working for a while with those things , again it crashes i dont no why. If somebody reads this who is beginner of sprite kit.Dont waste your time.Go to Unity!

Removing the assets from Assets.xcassets and just creating a separate folder worked for me also and it seems like a good workaround until Apple comes up with a real fix.

I contacted apple dev support but they just told me to submit a bug report.

I have been struggling with this issue since 2016 w/ high end iMac and 2 high end macbook pros. I believe over the years I've participated in one or two identical forum discussions with no real solution presented, always hoping the next version of Xcode would address it but it never has. So its definitely been through their support but I dont believe spritekit is a priority.


Now that my game project has much more assets it has become a real problem. It will almost always crash now anytime setting a new texture to a sprite. I think the Assets.xcassets might very well be an issue since it has performance issues and also is hit or miss when dragging new 1x/2x/3x images. But those are nothing comapred to the crash that happens when assigning sprite textures.


So far i've tried reza_shirazian suggestion and ill be damned if it works...so far. If it continues to work reliably this way then reza_shirazian is a rockstar. My only problem with this is only having one asset compared to having 1x/2x/3x versions in xcassets.

>always hoping the next version of Xcode would address it but it never has.


I've been calling asset catalogs 'brittle' for years now, even when face/face w/apple engrs. - they weren't too receptive to my description, tho.


.xcassets work when they work, but my advice continues to be it's best not to turn your back on them. I began falling back on manual folders back then, and can confirm that option can still be utilized when needed. Who knows for how much longer.


Thanks for the followup and good luck w/your apps.