这个崩溃报告是什么意思? [英] What does this crash report mean?

查看:626
本文介绍了这个崩溃报告是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



这个UIKit是因为标签从超级视图中被删除而崩溃的,所以我从发行版中得到这个崩溃日志,但是很难弄清楚这是什么意思而它正在被动画化?

 异常类型:EXC_BREAKPOINT(SIGTRAP)
异常代码:0x0000000000000001,0x000000000000defe
崩溃线程:0

线程0名称:调度队列:com.apple.main线程
线程0崩溃:
0 UIKit 0x36011c7e - [UIView版本] + 54
1 UIKit 0x3603d12c - [UIView dealloc] + 292
2 TestApp 0x0011fb0e - [ValueLabel .cxx_destruct](ValueLabel.m:47)
3 libobjc.A.dylib 0x3beeff26 object_cxxDestructFromClass(objc_object *,objc_class *)+ 54
4 libobjc.A.dylib 0x3beed0de objc_destructInstance + 30
5 libobjc.A.dylib 0x3beed3ae object_dispose + 10
6 UIKit 0x3603d2e2 - [UIView dealloc] + 730
7 TestApp 0x0011fa48 - [ValueLabel dealloc](ValueLabel.m:306)
8 libsystem_blocks.dylib 0x3c32bab0 _Block_release + 220
9 UIKit 0x360255e0 - [UIViewAnimationBlockDelegate dealloc ] + 56
10 CoreFoundation 0x341406da CFRelease + 98
11 CoreFoundation 0x34161d78 - [__ NSDictionaryI dealloc] + 128
12 libobjc.A.dylib 0x3beed490(匿名命名空间):: AutoreleasePoolPage :: pop(void *)+ 164
13 CoreFoundation 0x3414282c _CFAutoreleasePoolPop + 12
14 CoreFoundation 0x341d31b2 __CFRunLoopRun + 1290
15 CoreFoundation 0x34146238 CFRunLoopRunSpecific + 352
16 CoreFoundation 0x341460c4 CFRunLoopRunInMode + 100
17 GraphicsServices 0x37d24336 GSEventRunModal + 70
18 UIKit 0x360622b4 UIApplicationMain + 1116
19 TestApp 0x000e6cae main(main.m:16)
20 TestApp 0x000e6c64 start + 36


解决方案

如果您正在删除在故事板或NIB中实例化的视图,请确保IBOutlet属性 strong strong>而不是分配,否则一旦从父视图中删除,它们就会被发布。



这是

  @property(nonatomic,strong)IBOutlet UILabel * labelToRemove; 

而不是

 code> @property(nonatomic,weak)IBOutlet UILabel * labelToRemove; 


I am getting this crash log from my release build but have a hard time figuring out what this means.

Is this UIKit crashing because the label got removed from superview while it was being animated?

Exception Type:  EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x000000000000defe
Crashed Thread:  0

Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   UIKit                           0x36011c7e -[UIView release] + 54
1   UIKit                           0x3603d12c -[UIView dealloc] + 292
2   TestApp                         0x0011fb0e -[ValueLabel .cxx_destruct] (ValueLabel.m:47)
3   libobjc.A.dylib                 0x3beeff26 object_cxxDestructFromClass(objc_object*, objc_class*) + 54
4   libobjc.A.dylib                 0x3beed0de objc_destructInstance + 30
5   libobjc.A.dylib                 0x3beed3ae object_dispose + 10
6   UIKit                           0x3603d2e2 -[UIView dealloc] + 730
7   TestApp                         0x0011fa48 -[ValueLabel dealloc] (ValueLabel.m:306)
8   libsystem_blocks.dylib          0x3c32bab0 _Block_release + 220
9   UIKit                           0x360255e0 -[UIViewAnimationBlockDelegate dealloc] + 56
10  CoreFoundation                  0x341406da CFRelease + 98
11  CoreFoundation                  0x34161d78 -[__NSDictionaryI dealloc] + 128
12  libobjc.A.dylib                 0x3beed490 (anonymous namespace)::AutoreleasePoolPage::pop(void*) + 164
13  CoreFoundation                  0x3414282c _CFAutoreleasePoolPop + 12
14  CoreFoundation                  0x341d31b2 __CFRunLoopRun + 1290
15  CoreFoundation                  0x34146238 CFRunLoopRunSpecific + 352
16  CoreFoundation                  0x341460c4 CFRunLoopRunInMode + 100
17  GraphicsServices                0x37d24336 GSEventRunModal + 70
18  UIKit                           0x360622b4 UIApplicationMain + 1116
19  TestApp                         0x000e6cae main (main.m:16)
20  TestApp                         0x000e6c64 start + 36

解决方案

If you are removing views instantiated in Storyboard or NIBs, make sure the IBOutlet properties are strong or retain rather than weak or assign, otherwise they will be released as soon as they are removed from the parent view.

This is

@property (nonatomic, strong) IBOutlet UILabel* labelToRemove;

rather than

@property (nonatomic, weak) IBOutlet UILabel* labelToRemove;

这篇关于这个崩溃报告是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆