The Human Bagel
The Human Bagel

Reputation: 7224

NSObject(NSObject) doesNotRecognizeSelector crashing app, report missing some symbolication

I have an application that has been release in the App Store. About maybe 1% - 2% of my users are reporting that the App is crashing. This isn't exactly unexpected behavior, so I have asked for the crash logs. Here is the last exception backtrace (the part that actually shows the issue):

  Last Exception Backtrace:
    0   CoreFoundation                  0x2ecc5e7e __exceptionPreprocess + 126
    1   libobjc.A.dylib                 0x390226c2 objc_exception_throw + 34
    2   CoreFoundation                  0x2ecc97b2 -[NSObject(NSObject) doesNotRecognizeSelector:] + 198
    3   CoreFoundation                  0x2ecc80aa ___forwarding___ + 702
    4   CoreFoundation                  0x2ec16dc4 __forwarding_prep_0___ + 20
    5   MyAppName                           0x000874d0 0x6c000 + 111824
    6   UIKit                           0x3157c310 -[UITableView _createPreparedCellForGlobalRow:withIndexPath:] + 404
    7   UIKit                           0x315246c8 -[UITableView _updateVisibleCellsNow:] + 1796
    8   UIKit                           0x31523eec -[UITableView layoutSubviews] + 180

As you can see the issue is on line 2, NSObject(NSObject) doesNotRecognizeSelector.

This tells me what is happening, but obviously not where or what. So go to line 5, and here is my App calling an unknown method. For some reason this is not symbolicated. It seems like this method is probably what is causing the issue.

Every single report (I have about 10 of them right now) is identical to this here. Any idea how I can see the proper symbolication? Thanks!

Upvotes: 4

Views: 668

Answers (1)

Durai Amuthan.H
Durai Amuthan.H

Reputation: 32270

I have experienced these kinds of crash before.

It was due to data type issue in all my cases.

For example trying to call a method specific for one data type on another data type.

i.e

trying to call integerValue method on a dictionary or trying to call length method on a string but in essence it is a dictionary so it crashes with [NSObject doesNotRecognizeSelector:]:

It's better check data type and call the method on the object to avoid crashes like this.

When we're calling APIs , it can easily happen as sometimes APIs can return wrong datatypes or unexpected response.

Upvotes: 1

Related Questions