iPhone 应用程序在快速停止/重新启动后崩溃

发布于 2024-10-21 01:53:53 字数 3139 浏览 0 评论 0原文

因此,当应用程序停止然后重新启动时速度非常快时,我的应用程序崩溃了,这是堆栈跟踪:

看起来 UITabBar 正在尝试访问空视图,因此 exc_bad_access。我很困惑为什么它只在重新启动时发生,而且我的选项卡栏是完全在 IB 中创建的。任何想法都会很棒。

异常类型:EXC_BAD_ACCESS (SIGBUS) 异常代码:KERN_PROTECTION_FAILURE 位于 0x00000000 崩溃的线程:0

0x30183f24 objc_msgSend + 24 1 励志名言 0x00009900 0x1000 + 35072

2 UIKit 0x338c37b4 -[UITabBarControllertransitionFromViewController:toViewController:transition:shouldSetSelected:] + 212

3 UIKit 0x338c36cc -[UITabBarControllertransitionFromViewController:toViewController:] + 32

4 UIKit 0x338 c2d38 -[UITabBarController _setSelectedViewController:] + 248

5 UIKit 0x339cbc44 -[UITabBarController setSelectedViewController:] + 12

6 UIKit 0x339cc888 -[UITabBarController _tabBarItemClicked:] + 308

7 CoreFoundation 0x35eada3c -[NSObject(NSObject)performSelector:withObject:withObject:] + 20

8 UIKit 0x3384af18 -[UIApplication sendAction:to :来自: forEvent:] + 128

9 UIKit 0x3384ae80 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 32

10 UIKit 0x33ab1ed8 -[UITabBar _sendAction:withEvent:] + 416

11 CoreFoundation 0x35eada3c -[NSObject(NSObject)performSelector:withObject:withObject: ] + 20

12 UIKit 0x3384af18 -[UIApplication sendAction:to:from:forEvent:] + 128

13 UIKit 0x3384ae80 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 32

14 UIKit 0x3384ae48 -[UIControl sendAction:to:forEvent:] + 44

15 UIKit 0x3384aa98 -[UIControl(内部)_sendActionsForEvents:withEvent:] + 528

16 UIKit 0x3388f338 -[UIControl sendActionsForControlEvents:] + 16

17 UIKit 0x33aae560 -[UITabBar(静态)_buttonUp:] + 108

18 CoreFound化 0x35eada3c -[NSObject( NSObject) PerformSelector:withObject:withObject:] + 20

19 UIKit 0x3384af18 -[UIApplication sendAction:to:from:forEvent:] + 128

20 UIKit 0x3384ae80 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 32

21 UIKit 0x3384ae48 -[ UIControl sendAction:to:forEvent:] + 44

22 UIKit 0x3384aa98 - [UIControl(内部)_sendActionsForEvents:withEvent:] + 528

23 UIKit 0x3384b5c4 - [UIControl TouchesEnded:withEvent:] + 452

24 UIKit 0x3383cea8 - [UIWindow _sendTouchesForEvent:]第580章

25 UIKit 0x3383c4dc -[UIWindow sendEvent:] + 388

26 UIKit 0x3381fc94 -[UIApplication sendEvent:] + 444

27 UIKit 0x3381f3ac _UIApplicationHandleEvent + 6816

28 GraphicsServices 0x35262c80 PurpleEventCallback + 1040

29 CoreFoundation 0x 35e9a5c4 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION + 22

30 CoreFoundation 0x35e9a582 __CFRunLoopDoSource1 + 158

31 CoreFoundation 0x35e8c82e __CFRunLoopRun + 574

32 CoreFoundation 0x35e8c504 CFRunLoopRunSpecific + 220

33 CoreFoundation 0x35e8c412 CFRunLoopRunInMode + 54

34 GraphicsServices 0x35261d1c GSEventRunMod al + 188

35 UIKit 0x33865574 -[UIApplication _run] + 580

36 UIKit 0x33862550 UIApplicationMain + 964

37 励志名言 0x00002b96 0x1000 + 7062

38 条励志名言 0x00002b0c 0x1000 + 6924

So my app is crashing when the app is stopped and then restarted really fast here's the stack trace:

It looks like the UITabBar is trying to access a view that is null, hence the exc_bad_access. I'm confused as to why it only happens on the restart, also my tabbar is created fully in IB. Any thoughts would be great.

Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x00000000
Crashed Thread: 0

0x30183f24 objc_msgSend + 24
1 Inspirational Quotes 0x00009900 0x1000 + 35072

2 UIKit 0x338c37b4 -[UITabBarController transitionFromViewController:toViewController:transition:shouldSetSelected:] + 212

3 UIKit 0x338c36cc -[UITabBarController transitionFromViewController:toViewController:] + 32

4 UIKit 0x338c2d38 -[UITabBarController _setSelectedViewController:] + 248

5 UIKit 0x339cbc44 -[UITabBarController setSelectedViewController:] + 12

6 UIKit 0x339cc888 -[UITabBarController _tabBarItemClicked:] + 308

7 CoreFoundation 0x35eada3c -[NSObject(NSObject) performSelector:withObject:withObject:] + 20

8 UIKit 0x3384af18 -[UIApplication sendAction:to:from:forEvent:] + 128

9 UIKit 0x3384ae80 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 32

10 UIKit 0x33ab1ed8 -[UITabBar _sendAction:withEvent:] + 416

11 CoreFoundation 0x35eada3c -[NSObject(NSObject) performSelector:withObject:withObject:] + 20

12 UIKit 0x3384af18 -[UIApplication sendAction:to:from:forEvent:] + 128

13 UIKit 0x3384ae80 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 32

14 UIKit 0x3384ae48 -[UIControl sendAction:to:forEvent:] + 44

15 UIKit 0x3384aa98 -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 528

16 UIKit 0x3388f338 -[UIControl sendActionsForControlEvents:] + 16

17 UIKit 0x33aae560 -[UITabBar(Static) _buttonUp:] + 108

18 CoreFoundation 0x35eada3c -[NSObject(NSObject) performSelector:withObject:withObject:] + 20

19 UIKit 0x3384af18 -[UIApplication sendAction:to:from:forEvent:] + 128

20 UIKit 0x3384ae80 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 32

21 UIKit 0x3384ae48 -[UIControl sendAction:to:forEvent:] + 44

22 UIKit 0x3384aa98 -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 528

23 UIKit 0x3384b5c4 -[UIControl touchesEnded:withEvent:] + 452

24 UIKit 0x3383cea8 -[UIWindow _sendTouchesForEvent:] + 580

25 UIKit 0x3383c4dc -[UIWindow sendEvent:] + 388

26 UIKit 0x3381fc94 -[UIApplication sendEvent:] + 444

27 UIKit 0x3381f3ac _UIApplicationHandleEvent + 6816

28 GraphicsServices 0x35262c80 PurpleEventCallback + 1040

29 CoreFoundation 0x35e9a5c4 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION + 22

30 CoreFoundation 0x35e9a582 __CFRunLoopDoSource1 + 158

31 CoreFoundation 0x35e8c82e __CFRunLoopRun + 574

32 CoreFoundation 0x35e8c504 CFRunLoopRunSpecific + 220

33 CoreFoundation 0x35e8c412 CFRunLoopRunInMode + 54

34 GraphicsServices 0x35261d1c GSEventRunModal + 188

35 UIKit 0x33865574 -[UIApplication _run] + 580

36 UIKit 0x33862550 UIApplicationMain + 964

37 Inspirational Quotes 0x00002b96 0x1000 + 7062

38 Inspirational Quotes 0x00002b0c 0x1000 + 6924

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

生死何惧 2024-10-28 01:53:53

您遇到了异常 exc_bad_access,我认为您的 nib 文件未正确连接。将您的选项卡栏与选项卡栏控制器连接。

You got the exception exc_bad_access, I think your nib file is not connected properly.Connect your tab bar with a tab bar controller.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文