gpt4 book ai didi

ios - UIApplicationMain 方法在 iOS 10 中崩溃

转载 作者:行者123 更新时间:2023-11-29 00:20:55 25 4
gpt4 key购买 nike

我的应用程序在 iOS 10.3.1 设备的 UIApplicationMain 方法上以某种方式崩溃。

It indicates a SIGSEGV: SEGV_ACCERR crash.

这是到目前为止我得到的记录数据:

0   libobjc.A.dylib 0x00000001943afbd0 objc_msgSend + 12
1 CoreFoundation 0x0000000182b7bf6c ___forwarding___ + 436
2 CoreFoundation 0x0000000182a7eccc __forwarding_prep_0___ + 88
3 CoreFoundation 0x0000000182b7e100 __invoking___ + 140
4 CoreFoundation 0x0000000182a7a2fc -[NSInvocation invoke] + 292
5 WebCore 0x000000019148aefc HandleDelegateSource() + 116
6 CoreFoundation 0x0000000182b30240 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 20
7 CoreFoundation 0x0000000182b2f4e4 __CFRunLoopDoSources0 + 260
8 CoreFoundation 0x0000000182b2d594 __CFRunLoopRun + 708
9 CoreFoundation 0x0000000182a592d4 CFRunLoopRunSpecific + 392
10 GraphicsServices 0x000000018c26f6fc GSEventRunModal + 164
11 UIKit 0x000000018761efac UIApplicationMain + 1484
! 12 my_app_name 0x00000001000c9954 main (main.m:14)
13 libdyld.dylib 0x0000000194a1aa08 start + 0

这是方法:

// If nil is specified for principalClassName, the value for NSPrincipalClass from the Info.plist is used. If there is no
// NSPrincipalClass key specified, the UIApplication class is used. The delegate class will be instantiated using init.
UIKIT_EXTERN int UIApplicationMain(int argc, char *argv[], NSString * __nullable principalClassName, NSString * __nullable delegateClassName);

关于如何调试这种无效内存引用错误的任何想法?

最佳答案

可能是由于重命名的 IBOutlet 实例变量与相应的 .xib 文件(将旧名称埋在 XML 中)之间不匹配造成的?

有关 Xcode 重构中导致应用程序在执行任何代码之前在 UIApplicationMain() 中崩溃的缺陷的深入示例:

IBOutlet Name Change Causing Crash at UIApplicationMain

关于ios - UIApplicationMain 方法在 iOS 10 中崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44247702/

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