符号断点 - [NSObject doesNotRecognizeSelector:]:

时间:2014-08-08 23:33:26

标签: ios objective-c debugging

我的应用因此错误而崩溃:

- [__ NSCFDictionary length]:无法识别的选择器发送到实例0x178669400 2014-08-08 16:24:14.397 TestAPP [7196:60b] ***由于未捕获的异常终止应用程序' NSInvalidArgumentException',原因:' - [__ NSCFDictionary长度]:无法识别的选择器发送到实例0x178669400'

它不是代码的一部分。我尝试在viewcontroller.m文件中添加断点。我无法找到导致此错误的行。我为[NSObject doesNotRecognizeSelector:]添加了符号断点:Debug Navigator在UIVIEW层中显示了我的问题。知道什么可能是错的吗?我添加了调试导航器的屏幕截图。

debug navigator view

线程1堆栈如下所示: enter image description here

使用异常断点我可以看到以下内容:

debug navigator

以下是崩溃的堆栈跟踪:

  CRASH: -[__NSCFDictionary length]: unrecognized selector sent to instance 0x17826aa00
  Application Memory Usage 46649344
  Device Orientation 5
  Total space 28096 Total Free Space 20312
  Stack Trace: (
      0   CoreFoundation                      0x000000018cd2711c <redacted> + 160
      1   libobjc.A.dylib                     0x00000001992301fc objc_exception_throw + 60
      2   CoreFoundation                      0x000000018cd2bdb4 <redacted> + 0
      3   CoreFoundation                      0x000000018cd29ae0 <redacted> + 912
      4   CoreFoundation                      0x000000018cc4978c _CF_forwarding_prep_0 + 92
      5   UIKit                               0x000000018fcfc0a4 <redacted> + 44
      6   UIKit                               0x000000018fd75b04 <redacted> + 112
      7   UIKit                               0x000000018fd75a34 <redacted> + 364
      8   QuartzCore                          0x000000018f90cf7c <redacted> + 140
      9   QuartzCore                          0x000000018f8f755c <redacted> + 2436
      10  QuartzCore                          0x000000018f8f6bc8 <redacted> + 112
      11  QuartzCore                          0x000000018f8f6758 <redacted> + 1260
      12  QuartzCore                          0x000000018f8d701c <redacted> + 244
      13  QuartzCore                          0x000000018f8d6ce4 <redacted> + 44
      14  QuartzCore                          0x000000018f8d6560 <redacted> + 280
      15  QuartzCore                          0x000000018f8d6304 <redacted> + 424
      16  UIKit                               0x000000018fcef154 <redacted> + 9800
      17  CoreFoundation                      0x000000018cce77f4 <redacted> + 24
      18  CoreFoundation                      0x000000018cce6b50 <redacted> + 256
      19  CoreFoundation                      0x000000018cce4de8 <redacted> + 632
      20  CoreFoundation                      0x000000018cc25dd0 CFRunLoopRunSpecific + 452
      21  GraphicsServices                    0x000000019290dc0c GSEventRunModal + 168
      22  UIKit                               0x000000018fd56fc4 UIApplicationMain + 1156
      23  PrototypeN                          0x000000010019af88 main + 116
      24  libdyld.dylib                       0x0000000199823aa0 <redacted> + 4
 )

1 个答案:

答案 0 :(得分:4)

你试图在某处获得字典的长度。我的猜测是你试图得到你认为NSString的长度,但实际上是NSDictionary