First, CALayer's "frame" is a "computed property" according to Apple's docs. You may want to be setting the bounds, anchorPoint or position properties. (In contrast, UIView's frame can be set and animated.)
Second, I came to this post 'cos I encountered such a crash as well. It happened when I was setting a CALayer's position property. It turned out that the exception thrown was for an invalid position - one of the coordinates was NaN. I found this by wrapping the "layer.position = pos" in a @try-@catch block. Fixing the root cause of the invalid position solved the problem for me. Based on this, I would guess that you have an invalid "imageRatio" value.