Crashing after Set Iterations

Last year, I built my entire project in an iOS environment and transferred it over to a playground and everything worked perfectly. This year, I built a UIViewController in an iOS app. It worked beautifully. I copied the code over, changing the file locations and UIViewController to UIView, and it randomly crashes after 50 or 99 iterations, depending on the function. I thought this was a problem regarding the computational limits, but printing "Hello World" did not fix it. The error message is "There was a problem encountered while running this playground." I tried doing the same idea five different ways and the only solution I am left with is a bug on Apple's side. It works fine in the iOS app and running it on a macOS playground, it crashes only on an iPad, which it needs to use for augmented reality. Can someone please help?

Edit: The code is from a UISlider target in a UITableViewCell, calling a delegate to change the multiply factor of a SCNNode.