在越狱设备[UIDeviceRGBColor superview]上加载loadNibNamed时可能崩溃:无法识别的选择器 [英] Possible crash when loadNibNamed on jailbreak devices [UIDeviceRGBColor superview]: unrecognized selector

查看:174
本文介绍了在越狱设备[UIDeviceRGBColor superview]上加载loadNibNamed时可能崩溃:无法识别的选择器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的代码如下:

CGRect screenRect = [[UIScreen mainScreen] bounds];
SomeView *infoView;
if(screenRect.size.height != 568.0){
    // iPhone 5/5s users crash in the next line
    infoView = [[[NSBundle mainBundle] loadNibNamed:@"SomeViews" owner:self options:nil] objectAtIndex:1];  
}else{
    infoView = [[[NSBundle mainBundle] loadNibNamed:@"SomeViews" owner:self options:nil] objectAtIndex:0]
}

但是,我从Crashlytics的iPhone 5/5s用户那里获得了一些崩溃报告,作为上述代码中的注释.

However, I get some crash reports from Crashlytics for iPhone 5/5s users as comment in the above code.

令人惊讶的是,由于我的应用仅支持纵向方向,因此5/5s的高度不是568.我有数百个活动用户,只有4个用户发生了12次崩溃.

I am surprising that the height is NOT 568 for 5/5s since my app only supports Portrait orientation. I have hundreds of active users and only 12 crashes happened on 4 users.

即使iPhone 5/5s设备加载了错误的笔尖(用于3.5英寸屏幕),也不会造成崩溃. (我刚刚测试过.)

And even if a iPhone 5/5s device load the wrong nib(for 3.5inch screen), it should not cause crash. (I just tested.)

http://crashes.to/s/1ddc169b801

Crashlytics还向我显示90%的崩溃是在越狱设备上进行的,这使我想知道越狱设备是否可以通过任何方式更改此值?

Crashlytics also shown me that 90% of the crashes are on jailbreak devices, which makes me wonder that if jailbreak devices can change this value in any way?

Fatal Exception: NSInvalidArgumentException
-[UIDeviceRGBColor superview]: unrecognized selector sent to instance 0x14732db0

0
CoreFoundation  
__exceptionPreprocess + 130
1
libobjc.A.dylib 
objc_exception_throw + 38
2
CoreFoundation  
-[NSObject(NSObject) doesNotRecognizeSelector:] + 202

...

22
UIKit   
-[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 138
23
Banck   
BKAddRecordPagingViewController.m line 244 // line 244 is loadNibNamed
-[BKAddRecordPagingViewController viewDidLoad]

崩溃报告链接显示了原因,但是我不知道为什么,因为我在笔尖文件中仅使用内置的UILabel,UIImageView和UITextView.

The crash report link shows the reason but I can't figure out why since I use only built-in UILabel, UIImageView, UITextView in the nib file.

有人可以给我一些建议以更好地检查吗,以及是否在越狱设备上使用4英寸屏幕? 第二个问题是,是什么原因导致loadNibNamed内部崩溃?

Can anyone give me some advice to better check and if using 4 inch screen on jailbreak devices? The second question is that what caused the crash inside loadNibNamed?

推荐答案

我怀疑Cydia Tweak"Eclipse"有一个过发布的错误. (Eclipse.dylib列在您的崩溃跟踪中)

I suspect the Cydia Tweak "Eclipse" has an overrelease bug. (Eclipse.dylib is listed in your crash trace)

NIB中的UIView实例被释放,并且内存重新用于UIDeviceRGBColor实例.

An instance of UIView from your NIB is being released, and the memory reused for a UIDeviceRGBColor instance.

看看是否可以使用Cydia Eclipse进行复制?您可以使用Instruments跟踪您的分配.

See if you can repro with the Cydia Eclipse add on? You could trace your allocations with Instruments.

这篇关于在越狱设备[UIDeviceRGBColor superview]上加载loadNibNamed时可能崩溃:无法识别的选择器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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