1

I have some bug report from

 NSLog(@"Stack trace: %@", [exception callStackSymbols]);

But I can't locate this bug from my source code. I use this command to know where it crash, but it show unrelated part of code.

atos -arch armv7 -o nuPhoto.app/nuPhoto 0x000885f9

So, how to make sure my .app and .app.sSYM is the same as the version submitted to app store? Is it possible to show all the information(including line number and source code) in NSLog instead of using atos. Thank you.

Uncaught exception: -[__NSCFString objectForKey:]: unrecognized selector sent to instance 0x1cd80470
 Stack trace: (
    0   CoreFoundation                      0x330132bb <redacted> + 186
    1   libobjc.A.dylib                     0x3ad3097f objc_exception_throw + 30
    2   CoreFoundation                      0x33016e07 <redacted> + 170
    3   CoreFoundation                      0x33015531 <redacted> + 392
    4   CoreFoundation                      0x32f6cf68 _CF_forwarding_prep_0 + 24
    5   nuPhoto                             0x000885f9 nuPhoto + 177657
    6   CoreFoundation                      0x32fecfdf <redacted> + 46
    7   CoreFoundation                      0x32fed06b <redacted> + 186
    8   CoreFoundation                      0x32fed06b <redacted> + 186
    9   CoreFoundation                      0x32fed06b <redacted> + 186
    10  CoreFoundation                      0x32fed06b <redacted> + 186
    11  CoreFoundation                      0x32f5e401 CFSortIndexes + 972
nsgulliver
  • 12,655
  • 23
  • 43
  • 64
Bruce Tsai
  • 1,440
  • 2
  • 12
  • 18
  • When does it actually crash? Is it when you are running a method, switching views, what exactly are you doing when it crashes. The Exception you are getting is because you are trying to run the method `objectForKey:` on an `NSString` and `NSString` doesn't contain that method. So you will be assigning something to `id` or something like that and than when it is set at run time to a string it can't run that method. I presume it should be an `NSDictionary` not an `NSString`. – Popeye Mar 05 '13 at 09:00
  • 1
    The address you pass on to atos is not the correct one, see http://stackoverflow.com/questions/13574933/ios-crash-reports-atos-not-working-as-expected/13576028#13576028 – Kerni Mar 05 '13 at 09:28
  • Popeye, I don't know how it crash, I just log the user's stack trace, so I don't know it.But I know the viewController which crashes. In this viewController, I only use objectForKey for NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults]; I don't know why it will introduce this crash...so, I want to make sure by line of source code. – Bruce Tsai Mar 05 '13 at 15:12
  • I think use Crashlytics crash report tool is the better practice. It will tell you which line of crash happen on Server and Email. After my deployment for 6 monthes, I think it's good and doesn't make any problems. And it's free. FYR. – Bruce Tsai Apr 01 '14 at 02:11

0 Answers0