last night my code worked. today, it is randomly failing with multiple EXC_BAD_ACESS errors

last night my code worked. today, it is randomly failing with multiple EXC_BAD_ACESS errors


it was throwing an error when I added an element to an existing array like this:

self.view?.node?.children += [node]


I replaced that code with :

if let aNode = self.view?.node{
     aNode.children.append(node)
}


and for 1 test it worked fine. But i got another error with another array in a completely unrealted section of the app.


then the next time I ran, trying to fix the other error... The code i replaced started throwing errors.


the only difference was that I ran the OS update last night. 10.12.6. Ok so I'm working with beta 2 of Xcode 9... I checked and ther eis an update: beta 4.

updated to that, cleaned the code, rebuilt... same error.


My code, which was written in Swift 4, which worked yesterday, compiles and has apparently hundreds of EXC_BAD_ACCRESS errors now.

what gives? any ideas? I have checked in code that the array exists, and the the object I am adding to it exists. there's nothing in my code that is changing that in any way, when I try to append the object to the array. and like I said: this is tested and working code, that until last night had been humming along happily in thousands of tests.

last night my code worked. today, it is randomly failing with multiple EXC_BAD_ACESS errors
 
 
Q