TKImageView icon indicating copy to clipboard operation
TKImageView copied to clipboard

Crashed on -[TKImageView setToCropImage:]

Open ghost opened this issue 7 years ago • 10 comments

we have integrated this cropping library in our Project and it working Well. but we recive many complains from user that they facing crash while Cropping image. following is our fabrics crash Track TKImageView.m line 867 -[TKImageView setToCropImage:]

Fatal Exception: CALayerInvalidGeometry CALayer position contains NaN: [nan 301]

0 CoreFoundation __exceptionPreprocess
1 libobjc.A.dylib objc_exception_throw
2 CoreFoundation -[NSException initWithCoder:]
3 QuartzCore CA::Layer::set_position(CA::Vec2 const&, bool)
4 QuartzCore -[CALayer setPosition:]
5 QuartzCore -[CALayer setFrame:]
6 UIKit -[UIView(Geometry) setFrame:]
7 UIKit -[UIImageView _setViewGeometry:forMetric:]
8 iFax iOS TKImageView.m line 867-[TKImageView setToCropImage:]
9 iFax iOS EditImageViewController.swift line 177specialized EditImageViewController.btn_Crop(UIBarButtonItem) -> ()
10 iFax iOS EditImageViewController.swift line 0@objc EditImageViewController.btn_Crop(UIBarButtonItem) -> ()
11 UIKit -[UIApplication sendAction:to:from:forEvent:]
12 UIKit -[UIBarButtonItem(UIInternal) _sendAction:withEvent:]
13 UIKit -[UIApplication sendAction:to:from:forEvent:]
14 UIKit -[UIControl sendAction:to:forEvent:]
15 UIKit -[UIControl _sendActionsForEvents:withEvent:]
16 UIKit -[UIControl _sendActionsForEvents:withEvent:]
17 UIKit -[UIControl touchesEnded:withEvent:]
18 UIKit _UIGestureEnvironmentSortAndSendDelayedTouches
19 UIKit _UIGestureEnvironmentUpdate
20 CoreFoundation CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION
21 CoreFoundation __CFRunLoopDoObservers
22 CoreFoundation __CFRunLoopRun
23 CoreFoundation CFRunLoopRunSpecific
24 GraphicsServices GSEventRunModal
25 UIKit UIApplicationMain
26 iFax iOS AppDelegate.swift line 106main
27 libdyld.dylib start

ghost avatar Oct 12 '17 07:10 ghost

Any Solution to Above Issue.

ghost avatar Oct 13 '17 11:10 ghost

Hi @moontecholabs , Does it crash any time or just in special cases? Could you please tell me more about this bug, like iOS version and screenshots?

3tinkers avatar Oct 17 '17 11:10 3tinkers

yes this is random Crash and found in ios 9,10,11. we didn't have screenshots.because it is random Crash.and mostly generated in Live User device

ghost avatar Oct 17 '17 11:10 ghost

@moontecholabs ok, could you paste your config of TKImageView? lineWidth, borderWidth....

3tinkers avatar Oct 17 '17 11:10 3tinkers

And your app's name, I'll download and test it to replay the crash.

3tinkers avatar Oct 17 '17 11:10 3tinkers

cropView.toCropImage = image_editing.image // cropView.toCropImage = self.default_image toolBar.isHidden = true cropView.cropAreaCornerWidth = 22 cropView.cropAreaCornerHeight = 22 cropView.minSpace = 30 cropView.cropAreaCornerLineColor = UIColor.yellow cropView.cropAreaBorderLineColor = UIColor.yellow cropView.cropAreaCornerLineWidth = 4 cropView.cropAreaBorderLineWidth = 1 cropView.cropAreaMidLineWidth = 25 cropView.cropAreaMidLineHeight = 4 cropView.cropAreaMidLineColor = UIColor.yellow cropView.showMidLines = true

ghost avatar Oct 17 '17 11:10 ghost

  1. Does it crash any time or just in special cases?

  2. Could you please tell me more about this bug, like iOS version and screenshots? —> #1 & #2 We are not facing but live user facing it, you an find these all details from attached SS

  3. could you paste your config of TKImageView? lineWidth, borderWidth…. —> cropView.toCropImage = image_editing.image toolBar.isHidden = true cropView.cropAreaCornerWidth = 22 cropView.cropAreaCornerHeight = 22 cropView.minSpace = 30 cropView.cropAreaCornerLineColor = UIColor.yellow cropView.cropAreaBorderLineColor = UIColor.yellow cropView.cropAreaCornerLineWidth = 4 cropView.cropAreaBorderLineWidth = 1 cropView.cropAreaMidLineWidth = 25 cropView.cropAreaMidLineHeight = 4 cropView.cropAreaMidLineColor = UIColor.yellow cropView.showMidLines = true


  4. And your app's name, I'll download and test it to replay the crash. —> https://itunes.apple.com/in/app/ifax-send-fax-receive-faxes/id331514859?mt=8 https://itunes.apple.com/in/app/ifax-send-fax-receive-faxes/id331514859?mt=8

Regards, iFax Team

On 17 Oct 2017, at 16:32, YinYu [email protected] wrote:

Hi @moontecholabs https://github.com/moontecholabs , Does it crash any time or just in special cases? Could you please tell me more about this bug, like iOS version and screenshots?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/3tinkers/TKImageView/issues/4#issuecomment-337196327, or mute the thread https://github.com/notifications/unsubscribe-auth/ARtqEiUmR-DWBnNNyzlz-xyOLSpk5fBCks5stIlYgaJpZM4P2mFF.

ghost avatar Oct 17 '17 11:10 ghost

Got it.I'll check and fix it.

3tinkers avatar Oct 17 '17 12:10 3tinkers

Thanks for looking into my request. May I know expected update date? So my team can update pod

Regards, iFax Team

On 17 Oct 2017, at 17:39, YinYu [email protected] wrote:

Got it.I'll check and fix it.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/3tinkers/TKImageView/issues/4#issuecomment-337210622, or mute the thread https://github.com/notifications/unsubscribe-auth/ARtqEkTUO_6uFTsm61bSozydH0WFkcUQks5stJjlgaJpZM4P2mFF.

ghost avatar Oct 17 '17 12:10 ghost

Thanks for looking into my request. May I know expected update date? So my team can update pod Regards, iFax Team

ghost avatar Oct 24 '17 06:10 ghost