ios - 应用在 UIButtonLabel defaultAttributes 上崩溃

标签 ios uibutton uikit crash-reports crashlytics

我们正在尝试解决应用程序崩溃问题,但我不确定从哪里开始。问题似乎与对 UIButtonLabel 的 defaultAttributes 的调用有关。

它看起来像是对 UIKit 的核心调用,而不是直接来自应用程序代码。关于可以在此处检查哪些内容以确定问题或进一步解决问题的任何建议?

enter image description here

线程:崩溃:com.apple.main-thread
0 libobjc.A.dylib 0x33ab0f66 objc_msgSend + 5
1 UIKit 0x29874a4b -[UIButtonLabel _defaultAttributes] + 154
2 UIKit 0x297d7a81 -[UILabel 字体] + 120
3 UIKit 0x29aed4d3 -[UILabel _contentInsetsFromFonts] + 250
4 UIKit 0x29c410e3 -[_UILabelLayer updateContentInsets] + 94
5 UIKit 0x29c411b7 -[_UILabelLayer updateContentLayerSize] + 42
6 QuartzCore 0x291e7bd1 CA::Layer::layout_if_needed(CA::Transaction*) + 360 7 QuartzCore 0x291e7a59 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 16 8 QuartzCore 0x291e7447 CA::Context::commit_transaction(CA::Transaction*) + 222
9 QuartzCore 0x291e7251 CA::Transaction::commit() + 324
10 UIKit 0x297b9699 _afterCACommitHandler + 132
11 核心基础 0x2630c845 CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION + 20
12 CoreFoundation 0x26309f29 __CFRunLoopDoObservers + 276
13 CoreFoundation 0x2630a32b __CFRunLoopRun + 914
14 CoreFoundation 0x26257db1 CFRunLoopRunSpecific + 476
15 CoreFoundation 0x26257bc3 CFRunLoopRunInMode + 106
16 图形服务 0x2d5e2051 GSEventRunModal + 136
17 UIKit 0x29822f01 UIApplicationMain + 1440
18 APPNAME 0x0005120f main (main.m:16)

最佳答案

我有一次非常相似的崩溃,这是由于一条消息发送到一个已释放的实例。我通过启用僵尸发现了这一点。

关于ios - 应用在 UIButtonLabel defaultAttributes 上崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26284625/

相关文章:

objective-c - 动态移动 UIButton

iphone - 为什么不直接使用 self.view 在 iPhone SDK 中切换 View ?

iphone - UITextField 选择导致 UITableVIew 拉伸(stretch)

objective-c - setNeedsDisplay 在一个大的 UIView 上导致

ios - 无法为 'XCTest' 加载底层模块

ios - 在 Swift 中将 UIButton 覆盖在 UIWebView 上

iphone - 当按钮位于UITableViewCell上时,UIButton为什么showTouchWhenHighlighted不起作用?

ios - 如何在不指定估计行高的情况下使用 iOS 自动调整单元格大小?

ios - 以编程方式将自定义 View 添加到另一个 View

ios - 异步下载图像时, Collection View 单元格中的图像不会更新