I have a question about the attached error message. It is showing an EXC_BAD_ACCESS code around the variable closeTree1, defined below:
let closeTree1 = SKSpriteNode(texture: SKTexture(imageNamed: "tree1"))
As you can see at the bottom of the right side of the debug area, I have a print line that shows that Xcode has not deallocated closeTree1:
closeTree1: name:'(null)' texture:[ 'tree1' (721 x 1112)] position:{2902.64990234375, 577.58203125} scale:{1.00, 1.00} size:{420, 655.16400146484375} anchor:{0.5, 0.5} rotation:0.00
I also haven't had a problem with early deallocation in Swift before, so I think it's related to something else. The research I've done says that EXC_BAD_ACCESS comes from a variable being overreleased and is more of an Objective-C problem.
This crash occurs inconsistently and always when I am resetting the scene. I'm not transitioning scenes, but removing all the children from the same scene and adding everything back.
I've used NSZombies and breakpoint but to no avail. I've also been working on this issue for several days and seen several other EXC_BAD_ACCESS errors on seemingly trivial lines. If anyone can shed some light on this that would be greatly appreciated.