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

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

问题描述

我在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];

推荐答案

在代码中进行了大量搜索之后,我偶然发现了这里的另一篇帖子

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_msg的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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