gpt4 book ai didi

ios - 应用程序启动时令人费解的崩溃

转载 作者:行者123 更新时间:2023-12-03 17:18:29 25 4
gpt4 key购买 nike

我的许多用户在以下堆栈跟踪中获得了崩溃描述。
如您所见,如果我们不考虑第28行的标准主调用,它似乎是在应用程序启动时发生的,并且它不涉及我们的任何方法。
我不知道如何解决此错误,因为我无法重现它,并且下面的堆栈跟踪对我没有帮助。

该错误仅出现在iOS9(93%的iOS9.2、4%的iOS 9.1.0等)上。
也许有人知道在这种情况下该怎么办?

Thread : Crashed: com.apple.main-thread
0 libobjc.A.dylib 0x180911bd0 objc_msgSend + 16
1 Foundation 0x181b7b5f4 -[NSObject(NSKeyValueObservingPrivate) _changeValueForKey:key:key:usingBlock:] + 372
2 Foundation 0x181c2430c _NSSetPointValueAndNotify + 284
3 UIKit 0x18608e798 -[UIView(Geometry) _applyISEngineLayoutValues] + 656
4 UIKit 0x185f9b458 -[UIView(Geometry) _resizeWithOldSuperviewSize:] + 136
5 CoreFoundation 0x181188370 __53-[__NSArrayM enumerateObjectsWithOptions:usingBlock:]_block_invoke + 132
6 CoreFoundation 0x181188268 -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 308
7 UIKit 0x185f89f8c -[UIView(Geometry) resizeSubviewsWithOldSize:] + 148
8 UIKit 0x18608e8e0 -[UIView(AdditionalLayoutSupport) _is_layout] + 128
9 UIKit 0x1862931f0 -[UIView(Hierarchy) _updateConstraintsAsNecessaryAndApplyLayoutFromEngine] + 756
10 UIKit 0x185f7f778 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 656
11 QuartzCore 0x18398eb2c -[CALayer layoutSublayers] + 148
12 QuartzCore 0x183989738 CA::Layer::layout_if_needed(CA::Transaction*) + 292
13 QuartzCore 0x1839895f8 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 32
14 QuartzCore 0x183988c94 CA::Context::commit_transaction(CA::Transaction*) + 252
15 QuartzCore 0x1839889dc CA::Transaction::commit() + 512
16 QuartzCore 0x1839820cc CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 80
17 CoreFoundation 0x181248588 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32
18 CoreFoundation 0x18124632c __CFRunLoopDoObservers + 372
19 CoreFoundation 0x18124675c __CFRunLoopRun + 928
20 CoreFoundation 0x181175680 CFRunLoopRunSpecific + 384
21 GraphicsServices 0x182684088 GSEventRunModal + 180
22 UIKit 0x185fecd90 UIApplicationMain + 204
23 once 0x1000f0f00 main (main.m:14)
24 libdispatch.dylib 0x180d168b8 (Missing)

作为附加信息,我正在使用AFNetworking。这是不会崩溃的AFNetworking线程堆栈跟踪:
Thread : AFNetworking
0 libsystem_kernel.dylib 0x180e194bc mach_msg_trap + 8
1 libsystem_kernel.dylib 0x180e19338 mach_msg + 72
2 CoreFoundation 0x181248ac0 __CFRunLoopServiceMachPort + 196
3 CoreFoundation 0x1812467c4 __CFRunLoopRun + 1032
4 CoreFoundation 0x181175680 CFRunLoopRunSpecific + 384
5 Foundation 0x181b6d21c -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 308
6 Foundation 0x181bc2874 -[NSRunLoop(NSRunLoop) run] + 88
7 once 0x1001ddf9c +[AFURLConnectionOperation networkRequestThreadEntryPoint:] (AFURLConnectionOperation.m:169)
8 Foundation 0x181c53c40 __NSThread__start__ + 1000
9 libsystem_pthread.dylib 0x180efbb28 _pthread_body + 156

也许可以帮上忙。
感谢您的帮助!

最佳答案

我在SO中找到了另一个条目,该条目与您的堆栈非常相似。解决方案涉及在 subview 中删除setTranslatesAutoresizingMaskIntoConstraints:NO。

issue with reentering of view with [UIView(Geometry) _applyISEngineLayoutValues] in iOS8 but not iOS7

在应用程序启动时,如果您具有xib / storyboard,则只能是您的主 View Controller 或launchScreen。

关于ios - 应用程序启动时令人费解的崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34700550/

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