Comments (3)
你好,PrefixsArr数组里放了哪些字符串,麻烦贴出你的代码。
由于自带类的某些少数方法的调用是通过最后的转发补救的,所以AvoidCrash有时候会拦截了系统的默认做法,会导致误伤,所以可能会导致你所说的情况。你可以参考下面的链接。
同时,请贴出你的代码,给大家借鉴一下哪些情况会出现这样的问题,也方便AvoidCrash进行改进,谢谢
from avoidcrash.
下面是我在AppDelegate调用的方法
NSArray *noneSelClassPrefix = @[
@"IM",
@"Project",
@"Attend",
@"Report",
@"Labor",
@"Quality",
@"Contract",
@"Bill"
];
[AvoidCrash setupNoneSelClassStringPrefixsArr:noneSelClassPrefix];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(dealwithCrashMessage:) name:AvoidCrashNotification object:nil];
其中Attend对应的AttendanceSignInVC和AttendanceLocusDetailVC的两个类,
Project对应的ProjectHomePageViewController类运行就会闪退,出现EXC_BREAKPOINT错误
from avoidcrash.
@hj4859199 抱歉,目前AvoidCrash对 “unrecognized selector sent to instance”的兼容并不是非常完善,建议不要填入 UIKit中的类或者子类,也不要加入NSObject(可以加入继承于NSObject的子类)。
unrecognized selector sent to instance 一般用来对数据的处理比较多,建议直接使用如下代码(只针对数据的处理)
NSArray *noneSelClassStrings = @[
@"NSNull",
@"NSNumber",
@"NSString",
@"NSDictionary",
@"NSArray"
];
[AvoidCrash setupNoneSelClassStringsArr:noneSelClassStrings];
对于AvoidCrash给你带来的困扰,在此表示抱歉。
from avoidcrash.
Related Issues (20)
- Reveal 查看视图结构时, App 闪退 HOT 1
- 死循环导致项目奔溃 HOT 1
- 调用相册时出现的闪退没能捕捉到
- 和第三方有冲突
- 死循环,卡在了启动页 HOT 4
- 偶现的一个crash,但是不太确定是否是添加AvoidCrash导致 HOT 8
- 启动崩溃 !!! HOT 6
- 用try-catch来捕获unrecognized selector sent to instance异常?
- 字符串拼接的异常不能捕获 HOT 1
- 跟MJRefresh 有崩溃冲突 !!!!! HOT 1
- setupNoneSelClassStringPrefixsArr加上前缀Crash
- 效率
- NSMutableString部分崩溃拦截失败 HOT 1
- 子线程上刷新ui的崩溃能拦截吗
- Debug View Hiervrchy 无法打开 HOT 1
- __NSArrayM 交换objectAtIndex:方法之后内存持续增加
- 大佬你要坚持住并加油呀!!! HOT 1
- 子线程操作UI防护能搞里面吗,😄
- 希望大家继续共建!
- About PrivacyInfo.xcprivacy HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from avoidcrash.