Just chipping in for anyone else who is struggling on this one.
For me the solution was to restart my device.
I had this same issue when loading a bunch of very large images (5000px x 5000px) in UIImages. Luckily the images were not supposed to be anywhere near that big and I just needed to resize them.
UIImage
This bug appears frequently since I switched on iOS 11 Beta. Sometimes restarting the device works, sometimes my computer...