Finally I fixed the issue. I think the issue is with fetching the full resolution image.
Instead of :
CGImageRef iref = [rep fullResolutionImage];
I used:
CGImageRef iref = [myasset aspectRatioThumbnail];
And everything worked fine. No error in console, no crash, but quality/resolution of the image is reduced.