TOCropViewController icon indicating copy to clipboard operation
TOCropViewController copied to clipboard

Crash when double tap done button

Open Amefuri opened this issue 5 years ago • 1 comments
trafficstars

Describe the bug Application crash when we done cropping and repeat tap done button before library done the cropping process.

To Reproduce Steps to reproduce the behavior:

  1. Show TOCropViewController
  2. Process edit picture / cropping
  3. Quickly repeat tap done button in the bottom right
  4. See error:
cropViewController:didCropToImage
CropViewController was compiled with optimization - stepping may behave oddly; variables may not be available.

https://i.ibb.co/nCxkVvJ/Screen-Shot-2563-06-08-at-14-02-15.png

Expected behavior Library done the cropping process and return the cropped image.

iOS Device:

  • Device: iPhone7Plus
  • OS: iOS13.3.1
  • Library Version: 2.5.2

Amefuri avatar Jun 08 '20 07:06 Amefuri

Hi @Amefuri! Thanks for reporting this bug!

Hmm, that's interesting. I wonder if that dispatch delay is causing an issue. Maybe if you can, try commenting out the dispatch_after line (And the subsequent }); one too) and see if that fixes it!

I'll try and look at it when I get the chance, but if you can try diagnosing the problem for your own use case, that would help a lot. :)

Thanks!

TimOliver avatar Jun 10 '20 13:06 TimOliver