今天遇到这个问题,程序崩溃了……日志如下:

-[NSNull intValue]: unrecognized selector sent to instance 0x375c9860
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSNull intValue]: unrecognized selector sent to instance 0x375c9860'
*** First throw call stack:
(0x287910d7 0x36c23c77 0x2879659d 0x28794479 0x286c3708 0x17661 0x7d4fd 0x7f419b 0x7f4187 0x7f7e9d 0x28756669 0x28754d89 0x286a06d1 0x286a04e3 0x300651a9 0x2be52445 0xca0c5 0x371f1aaf)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)

而 crash 的时候线程停在了这里:

右侧代码出现了 "Thread 1: signal SIGABRT",如图所示:

出现“unrecognized selector sent to instance”问题原因之一及解决方法 该文介绍了一种方法,不过还是没解决我的问题。

目前寻找在路上……

———————————————这是分割线—————————————————————

今天测试,报的错还是那样,但又出现了新的错误内容,如下:

[NSNull intValue]: unrecognized selector sent to instance 0x1095444c0
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSNull intValue]: unrecognized selector sent to instance 0x1095444c0'
*** First throw call stack:
(
0 CoreFoundation 0x0000000109298c65 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x0000000108b46bb7 objc_exception_throw + 45
2 CoreFoundation 0x00000001092a00ad -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
3 CoreFoundation 0x00000001091f613c ___forwarding___ + 988
4 CoreFoundation 0x00000001091f5cd8 _CF_forwarding_prep_0 + 120
5 NetloanRoad 0x0000000105e4322e __32-[goingOnViewController request]_block_invoke_2 + 3310
6 NetloanRoad 0x0000000105eb8278 __64-[AFHTTPRequestOperation setCompletionBlockWithSuccess:failure:]_block_invoke46 + 40
7 libdispatch.dylib 0x000000010b299186 _dispatch_call_block_and_release + 12
8 libdispatch.dylib 0x000000010b2b8614 _dispatch_client_callout + 8
9 libdispatch.dylib 0x000000010b2a0a1c _dispatch_main_queue_callback_4CF + 1664
10 CoreFoundation 0x00000001092001f9 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
11 CoreFoundation 0x00000001091c1dcb __CFRunLoopRun + 2043
12 CoreFoundation 0x00000001091c1366 CFRunLoopRunSpecific + 470
13 GraphicsServices 0x000000010b97da3e GSEventRunModal + 161
14 UIKit 0x0000000109db78c0 UIApplicationMain + 1282
15 NetloanRoad 0x0000000105f0dd1f main + 111
16 libdyld.dylib 0x000000010b2ec145 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)

我只能自己说:编程就是在不断的出现 bug,解决 bug 中成长进步的……

Stack Overflow 上有个链接有参考价值:Only iOS 7 crash [NSNull intValue]: unrecognized selector sent to instance 虽然没解决我的问题。

后来注释掉报错的那段代码,然后问题就这么解决了……测试后发现那段代码是多余的……

[NSNull intValue]: unrecognized selector sent to instance 0x375c9860的更多相关文章

  1. 利用objc的runtime来定位次线程中unrecognized selector sent to instance的问题

    昨天遇到一个仅仅有一行错误信息的问题: -[NSNull objectForKey:]: unrecognized selector sent to instance 0x537e068 因为这个问题 ...

  2. '-[__NSCFString stringFromMD5]: unrecognized selector sent to instance 0x14d89a50'

    类型:ios 问题描述: 导入百度地图 然后在模拟器运行可以,真机测试不行: 报错: '-[__NSCFString stringFromMD5]: unrecognized selector sen ...

  3. unrecognized selector sent to instance

    今天长一见识(特此感谢小星星老湿-坏笑),凡是遇到“unrecognized selector sent to instance *******”的都是******方法没有,比如这种的错误: 可以尝试 ...

  4. IOS 错误 [UIWebView cut:]: unrecognized selector sent to instance

    那在什么场景中会出现这种情况呢? 如果一个包含文字的输入元素有焦点,然后按钮的点击会导致输入失去焦点,然后接下来在输入时双按会重新得到焦点并从弹出bar中选择剪切复制粘贴,就会导致此error. 也就 ...

  5. iOS 程序报错:reason: [NSArrayI addObject:]: unrecognized selector sent to instance

    *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSArrayI ad ...

  6. -[__NSCFNumber length]: unrecognized selector sent to instance 0xb0000000000000e3

    网络数据解析出现-[__NSCFNumber length]: unrecognized selector sent to instance 0xb0000000000000e3这样的错误,具体 re ...

  7. CBUUID UUIDString unrecognized selector sent to instance 错误

    CBUUID UUIDString unrecognized selector sent to instance 错误 ios7.0,4s 蓝牙出现上述错误! 查看api可知,错误原因,由于CBUUI ...

  8. reason: -[UIKBBlurredKeyView candidateList]: unrecognized selector sent to instance

    reason: -[UIKBBlurredKeyView candidateList]: unrecognized selector sent to instance 发现上线的app一直会有这个cr ...

  9. unrecognized selector sent to instance 0x10b34e810

    一个错误: *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSURLEr ...

随机推荐

  1. Spring Boot2(四):使用Spring Boot多数据源实现读写分离

    前言 实际业务场景中,不可能只有一个库,所以就有了分库分表,多数据源的出现.实现了读写分离,主库负责增改删,从库负责查询.这篇文章将实现Spring Boot如何实现多数据源,动态数据源切换,读写分离 ...

  2. 关于vue项目中在js中引入图片问题

    <template> <div> <img v-for="(star,index) in stars" :src="star.src&quo ...

  3. tar命令压缩和解压

    https://www.cnblogs.com/jyaray/archive/2011/04/30/2033362.html tar命令详解 -c: 建立压缩档案 -x:解压 -t:查看内容 -r:向 ...

  4. 获取Class的实例

    //1.调用运行时类本身的.class属性 Class<Person> class1 = Person.class; System.out.println(class1); //2.通过运 ...

  5. CSS3之响应式布局及其应用

    使用 Media 属性前需添加兼容移动设备优先代码 <meta name=”viewport”content=”width=device-width,initial-scale=1.0,maxi ...

  6. Spring中的配置文件文件位置

    在Java开发中,一般在Spring框架中,classpath的位置是指src下,在IDEA中一般是指resource中 配置文件 位置:任意,开发中一般在classpath下(src) 名称:任意, ...

  7. 并发编程-concurrent指南-阻塞队列-优先级的阻塞队列PriorityBlockingQueue

    PriorityBlockingQueue是一个支持优先级的无界阻塞队列. 它使用了和类 java.util.PriorityQueue 一样的排序规则.你无法向这个队列中插入 null 值. 所有插 ...

  8. java获取config下文件

    private static final String keystore="keystore.jks"; InputStream is=Thread.currentThread() ...

  9. java打印1000内的质数并用表格输出

    <table width='500' border='1'><% int c=1; for(int i=2;i<=1000;i++){ int n=0; for(int j=2 ...

  10. python笔记(2)--字符串

    一.字符串 字符串是不可变序列,具有序列的公共操作方法,具体操作见python笔记(1)--序列(列表 元组 range) 1.创建字符串 单引号:'Hello , I am Logan ! ' 双引 ...