Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Symbolicating crash log for app with static library

I'm receiving crash reports from an app but Xcode is not able to symbolicate the symbols that are specific to my app:

Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   libsystem_kernel.dylib          0x32c43a1c __pthread_kill + 8
1   libsystem_c.dylib               0x33a0a3b4 pthread_kill + 52
2   libsystem_c.dylib               0x33a02bf8 abort + 72
3   libsystem_c.dylib               0x33a306d4 __assert_rtn + 140
4   MyApplication                   0x0000dd54 0x9000 + 19796
5   MyApplication                   0x0000dbda 0x9000 + 19418
6   MyApplication                   0x000103f6 0x9000 + 29686
7   MyApplication                   0x0001035e 0x9000 + 29534
8   MyApplication                   0x0000f3cc 0x9000 + 25548
9   MyApplication                   0x00025d1e 0x9000 + 118046
10  CoreFoundation                  0x35847efc -[NSObject(NSObject) performSelector:withObject:] + 16
11  Foundation                      0x36eec7a2 __NSThreadPerformPerform + 262
12  CoreFoundation                  0x358b1a72 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 6
13  CoreFoundation                  0x358b3758 __CFRunLoopDoSources0 + 376
14  CoreFoundation                  0x358b44e4 __CFRunLoopRun + 224
15  CoreFoundation                  0x35844ebc CFRunLoopRunSpecific + 224
16  CoreFoundation                  0x35844dc4 CFRunLoopRunInMode + 52
17  GraphicsServices                0x3446b418 GSEventRunModal + 108
18  GraphicsServices                0x3446b4c4 GSEventRun + 56
19  UIKit                           0x344a2d62 -[UIApplication _run] + 398
20  UIKit                           0x344a0800 UIApplicationMain + 664
21  MyApplication                   0x0000b174 main (main.m:14)
22  MyApplication                   0x0000b124 0x9000 + 8484

Except for the line in main.m. I know I have the dSYM file for it still in Xcode's archive. I've tried using the command line to reference those debug symbols directly, but I get the same result every time. I've tried using atos to lookup the symbol directly and it wasn't able to find it. I verified that it was the right dSYM by comparing the UUID.

It finds main.m every time, so it seems like its half working, but just not able to find anything else.

I am using a static library in this app--is it possible that the crash is occurring in the static library? Would that debug information be in a separate set of debug symbols? It says that the responsible library is my application...would it say the name of the static library if it was in fact responsible for the crash?

Thanks!

like image 590
Daniel Avatar asked Apr 13 '12 17:04

Daniel


1 Answers

Static libraries are linked into your app executable, so after linking you won't be able to identify the original source of that code. Hence it will always name your app as the source binary.

It is likely that those frames are not getting symbolicated, because of the static library you included. This happens if the static library doesn't have the symbols in it, but stripped of. Happens quite often for static library release builds, where the default setting is the same as for apps, to strip of the symbols. (For apps this is the correct thing to do!)

In that case the symbols wouldn't be copied into the dSYM, because it can't find them in the static library.

like image 167
Kerni Avatar answered Oct 19 '22 11:10

Kerni