gpt4 book ai didi

ios - 无法理解崩溃日志

转载 作者:行者123 更新时间:2023-12-02 16:19:03 25 4
gpt4 key购买 nike

我有一个 View ,它由一个 UIScrollView 组成,在添加所有 subview 之后以及执行所有自定义方法后, subview 将在 viewDidLoad 中添加到 >viewWillappear,之后它崩溃并出现以下痕迹:

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString CIImage]: unrecognized selector sent to instance 0x7db5bb80'
*** First throw call stack:
(
0 CoreFoundation 0x04614946 __exceptionPreprocess + 182
1 libobjc.A.dylib 0x0429da97 objc_exception_throw + 44
2 CoreFoundation 0x0461c5c5 -[NSObject(NSObject) doesNotRecognizeSelector:] + 277
3 CoreFoundation 0x045653e7 ___forwarding___ + 1047
4 CoreFoundation 0x04564fae _CF_forwarding_prep_0 + 14
5 UIKit 0x02b589f1 -[UIImageView _shouldDrawImage:] + 33
6 UIKit 0x02b58aa2 -[UIImageView _canDrawContent] + 164
7 UIKit 0x02a2f750 -[UIView(Internal) _shouldInheritScreenScaleAsContentScaleFactor] + 83
8 UIKit 0x02a2f7e9 -[UIView(Internal) _applyScreenScaleToContentScaleFactorIfNotSpecifiedByDeveloper] + 35
9 UIKit 0x02a2f56e -[UIView(Internal) _didMoveFromWindow:toWindow:] + 1628
10 UIKit 0x02b5d762 -[UIImageView _didMoveFromWindow:toWindow:] + 65
11 UIKit 0x02a2f23f -[UIView(Internal) _didMoveFromWindow:toWindow:] + 813
12 UIKit 0x02a423e1 -[UIScrollView _didMoveFromWindow:toWindow:] + 65
13 UIKit 0x02a2f23f -[UIView(Internal) _didMoveFromWindow:toWindow:] + 813
14 UIKit 0x02a2f23f -[UIView(Internal) _didMoveFromWindow:toWindow:] + 813
15 UIKit 0x02a26517 __45-[UIView(Hierarchy) _postMovedFromSuperview:]_block_invoke + 154
16 UIKit 0x02a26475 -[UIView(Hierarchy) _postMovedFromSuperview:] + 458
17 UIKit 0x02a31f0d -[UIView(Internal) _addSubview:positioned:relativeTo:] + 2018
18 UIKit 0x02a2486e -[UIView(Hierarchy) addSubview:] + 56
19 UIKit 0x0299d0fa __53-[_UINavigationParallaxTransition animateTransition:]_block_invoke + 1849
20 UIKit 0x02a2b7af +[UIView(Animation) performWithoutAnimation:] + 82
21 UIKit 0x0299c5a6 -[_UINavigationParallaxTransition animateTransition:] + 1204
22 UIKit 0x02b2b64d -[UINavigationController _startCustomTransition:] + 3765
23 UIKit 0x02b38726 -[UINavigationController _startDeferredTransitionIfNeeded:] + 712
24 UIKit 0x02b39372 -[UINavigationController __viewWillLayoutSubviews] + 57
25 UIKit 0x02cad04c -[UILayoutContainerView layoutSubviews] + 213
26 UIKit 0x02a34dd1 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 608
27 libobjc.A.dylib 0x042b3771 -[NSObject performSelector:withObject:] + 70
28 QuartzCore 0x0215928f -[CALayer layoutSublayers] + 152
29 QuartzCore 0x0214d115 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 397
30 QuartzCore 0x0214cf70 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 26
31 QuartzCore 0x020ab3c6 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 284
32 QuartzCore 0x020ac78c _ZN2CA11Transaction6commitEv + 392
33 QuartzCore 0x020ace58 _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 92
34 CoreFoundation 0x045379de __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 30
35 CoreFoundation 0x04537920 __CFRunLoopDoObservers + 400
36 CoreFoundation 0x0452d35a __CFRunLoopRun + 1226
37 CoreFoundation 0x0452cbcb CFRunLoopRunSpecific + 443
38 CoreFoundation 0x0452c9fb CFRunLoopRunInMode + 123
39 GraphicsServices 0x05e6b24f GSEventRunModal + 192
40 GraphicsServices 0x05e6b08c GSEventRun + 104
41 UIKit 0x029a98b6 UIApplicationMain + 1526
42 POPCorn 0x000e9472 main + 130
43 libdyld.dylib 0x06193ac9 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException

最佳答案

由于未捕获的异常“NSInvalidArgumentException”而终止应用程序,原因:“-[__NSCFString CIImage]:无法识别的选择器发送到实例 0x7db5bb80”

您正在访问 NSString 的 CIImage 属性(可能是它的 id,并且您刚刚访问此属性时认为 id 对象是 UIImage)。在您的类中搜索 CIImage 并确保您从中获取属性的对象是实际的 UIImage

关于ios - 无法理解崩溃日志,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29861636/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com