出于某种奇怪的原因,CGRectMake有可能返回零吗?因为我在一些设备上撞车了:
Fatal Exception: NSInvalidArgumentException
(null): unrecognized selector sent to instance 0x145de2f0这是导致崩溃的代码行:
mirror_crop_filter = GPUImageCropFilter(cropRegion: CGRectMake(0.25, 0, 0.5, 1))有关坠机事件的更多细节:
Thread : Fatal Exception: NSInvalidArgumentException
0 CoreFoundation 0x256f6c1f __exceptionPreprocess + 126
1 libobjc.A.dylib 0x32ecec8b objc_exception_throw + 38
2 CoreFoundation 0x256fc039 __methodDescriptionForSelector
3 CoreFoundation 0x256f9f57 ___forwarding___ + 714
4 CoreFoundation 0x2562bdf8 _CF_forwarding_prep_0 + 24
5 Coowl 0x000f6eec Coowl.MirrorView.init (Coowl.MirrorView.Type)(frame : C.CGRect) -> Coowl.MirrorView (MirrorView.swift:31)
6 Coowl 0x000f6c9c Coowl.MirrorView.__allocating_init (Coowl.MirrorView.Type)(frame : C.CGRect) -> Coowl.MirrorView (MirrorView.swift)
7 Coowl 0x000af500 Coowl.EdicaoViewController.init_camera (Coowl.EdicaoViewController)() -> () (EdicaoViewController.swift:213)
8 Coowl 0x000bf99c Coowl.EdicaoViewController.(viewDidLoad (Coowl.EdicaoViewController) -> () -> ()).(closure #1).(closure #1) (EdicaoViewController.swift:114)
9 libdispatch.dylib 0x334388cd _dispatch_barrier_sync_f_slow_invoke + 372另外,根据Crashlytics的说法,如果有帮助的话,95%的设备都在使用Jailbrake。
发布于 2015-05-03 14:02:32
您认为CGRectMake API返回零值有什么特别的原因吗?CGRectMake从不返回零,因为是内联函数简单地设置了CGRect并返回。在我看来,GPIImageCropFilter内部似乎有一些不允许零的函数(例如,一个着色函数)。
https://stackoverflow.com/questions/30014173
复制相似问题