iOS 崩溃 libobjc.A.dylib objc_msgSend [英] iOS crash libobjc.A.dylib objc_msgSend

查看:51
本文介绍了iOS 崩溃 libobjc.A.dylib objc_msgSend的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Crashlytics 中遇到如下所示的崩溃.

I am getting the crash shown below in Crashlytics.

我无法理解这是在应用程序中的什么地方出现的.不幸的是,我自己从来没有能够产生这个崩溃,但它正在发生在野外.

I am unable to understand where this is coming form within the app. Unfortunately I have never been able to generate this crash myself, but it is occurring in the wild.

只有一个对应用名称的引用,没有任何内容可以显示应用名称的来源.

There is only one reference to the app name, and there is nothing that leads to show where in the app this is coming from.

是否没有关于应用程序中发生这种情况的数据的事实,是否表明在 didFinishLaunchingWithOptions 期间发生了问题,因此实际上还不足以显示任何进一步的细节?还是有其他原因导致日志中缺少数据来显示问题所在?

Is the fact that there is no data as to where in the app this occurs, an indication of an issue occurring during didFinishLaunchingWithOptionsand thus not actually getting far enough to show any further detail? Or is there some other reason that the log is lacking in data to show where the issue is?

谁能告诉我如何追踪这个问题?

Could anyone advise how I may be able to track this down?

    Thread : Crashed: com.apple.main-thread
0  libobjc.A.dylib                0x0000000195de3bd0 objc_msgSend + 16
1  CoreFoundation                 0x0000000183fd9458 CFRelease + 524
2  CoreFoundation                 0x0000000183fe5a18 -[__NSArrayM dealloc] + 152
3  libobjc.A.dylib                0x0000000195de9724 (anonymous namespace)::AutoreleasePoolPage::pop(void*) + 564
4  CoreFoundation                 0x0000000183fdd074 _CFAutoreleasePoolPop + 28
5  Foundation                     0x0000000184f0e588 -[NSAutoreleasePool release] + 148
6  UIKit                          0x0000000188be03f4 -[UIApplication _run] + 588
7  UIKit                          0x0000000188bdaf40 UIApplicationMain + 1488
8  _THE_APP_NAME_                 0x0000000100031e20 main (main.m:16)
9  libdyld.dylib                  0x000000019647aa08 start + 4

Crashed: com.apple.main-thread
EXC_BAD_ACCESS KERN_INVALID_ADDRESS at 0x00000000f5b2beb8

<小时>

我正在添加以下与此线程上的评论相关的内容.这段代码是与 UI 相关的主要更改,除了通常的标签设置等,我看不出有什么问题.


I am adding the following in relation the comments placed on this thread. This code was the main UI related change, other than usual label setting etc, which I can't see an issue with.

以下代码已添加到 AppDelegate.m,DidFinishLaunchingWithOptions.

The code below was added to the AppDelegate.m, DidFinishLaunchingWithOptions.

我想知道,因为崩溃不是我能够重现的,虽然每天都会发生,但只是在少数情况下,如果它可能是时间问题,并且 UI 无法接收消息.

I am wondering, as the crash is not something I have been able to re-produce, and whilst happening daily is only in a handful of cases, if it could be a timing issue, and the UI not being available to receive the messages.

我欢迎任何想法,如果您同意,我是否应该将代码移至 ViewController 中的 ViewDidLoad.

I welcome any thoughts, and if you agree, if I should instead move the code to the ViewDidLoad in the ViewController instead.

[[UITabBarItem appearance] setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:
                                                               [UIColor lightGrayColor], NSForegroundColorAttributeName,
                                                               [UIFont fontWithName:@"Helvetica Neue" size:16],
                                                               NSFontAttributeName, nil] forState:UIControlStateNormal];
            [[UITabBarItem appearance] setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:
                                                               [UIColor darkGrayColor], NSForegroundColorAttributeName,
                                                               [UIFont fontWithName:@"Helvetica Neue" size:16],
                                                               NSFontAttributeName,
                                                               nil] forState:UIControlStateSelected];

    [[UITabBar appearance] setBarTintColor:[UIColor colorWithRed:0.44 green:0.99 blue:0.45 alpha:1]];

    [[UINavigationBar appearance] setBarTintColor:[UIColor colorWithRed:0.44 green:0.99 blue:0.45 alpha:1]];

    [[UINavigationBar appearance] setTintColor:[UIColor darkGrayColor]];

    [[UINavigationBar appearance] setTitleTextAttributes:@{NSForegroundColorAttributeName : [UIColor darkGrayColor], NSFontAttributeName : [UIFont fontWithName:@"Helvetica Neue" size:22]}];

    [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];

推荐答案

在代码中搜索了很多之后,我偶然发现了另一个帖子 objc_msgSend [__NSArrayM dealloc] 有时来自 Crashlytics 的崩溃报告.

After much searching in the code, I stumbled across another post on here objc_msgSend [__NSArrayM dealloc] crash report sometimes from Crashlytics.

Crashlytics 似乎在 3.0.9 中存在错误,并且是导致此问题的原因.

It seems that Crashlytics had a bug in 3.0.9, and was the cause of this issue.

更新了 SDK,现在一切正常.

Updated the SDK and all now okay.

这篇关于iOS 崩溃 libobjc.A.dylib objc_msgSend的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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