2012-10-31 4 views
12

Ich habe Benutzer per E-Mail mich Stack-Spuren, wenn meine App auf ihrem Gerät abstürzt. Vor iOS 6 sahen sie wie folgt aus:Stack-Trace-Methodennamen redigiert

CRASH: NSInvalidArgumentException (*** -[__NSArrayM insertObject:atIndex:]: object cannot be nil) 

TRACE: (
0 CoreFoundation      0x355e58a7 __exceptionPreprocess + 186 
1 libobjc.A.dylib      0x3798c259 objc_exception_throw + 32 
2 CoreFoundation      0x3553a1d7 -[__NSArrayM insertObject:atIndex:] + 186 
3 MYAPP        0x0006c0f7 MYAPP + 188663 
4 MYAPP        0x000652a3 MYAPP + 160419 
5 Foundation       0x3512ac29 __65-[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:]_block_invoke_0 + 16 
6 Foundation       0x350826d9 -[NSURLConnectionInternalConnection invokeForDelegate:] + 28 
7 Foundation       0x350826a3 -[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:] + 198 
8 Foundation       0x350825c5 -[NSURLConnectionInternal _withActiveConnectionAndDelegate:] + 60 
9 CFNetwork       0x34de77f5 _ZN19URLConnectionClient23_clientDidFinishLoadingEPNS_26ClientConnectionEventQueueE + 192 
10 CFNetwork       0x34ddc4a5 _ZN19URLConnectionClient26ClientConnectionEventQueue33processAllEventsAndConsumePayloadEP20XConnectionEventInfoI12XClientEvent18XClientEventParamsEl + 424 
11 CFNetwork       0x34ddc1a3 _ZN19URLConnectionClient13processEventsEv + 106 
12 CFNetwork       0x34ddc0d9 _ZN17MultiplexerSource7performEv + 156 
13 CoreFoundation      0x355b9ad3 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 14 
14 CoreFoundation      0x355b929f __CFRunLoopDoSources0 + 214 
15 CoreFoundation      0x355b8045 __CFRunLoopRun + 652 
16 CoreFoundation      0x3553b4a5 CFRunLoopRunSpecific + 300 
17 CoreFoundation      0x3553b36d CFRunLoopRunInMode + 104 
18 GraphicsServices     0x371d7439 GSEventRunModal + 136 
19 UIKit        0x33047cd5 UIApplicationMain + 1080 
20 MYAPP        0x0003fbcf MYAPP + 7119 
21 MYAPP        0x0003fb84 MYAPP + 7044 
) 

Aus den Corefoundation etc Methodennamen und den Benutzer zu fragen, was passiert ist, habe ich eine ziemlich gute Vorstellung davon bekommen, wo passiert der Absturz.

Da jedoch iOS 6 wurde meine Crash-Berichte veröffentlicht, schauen alle wie folgt aus:

CRASH: NSRangeException (*** -[__NSArrayI objectAtIndex:]: index 2147483670 beyond bounds [0 .. 11]) 

TRACE: (
0 CoreFoundation      0x3a3872bb <redacted> + 186 
1 libobjc.A.dylib     0x32ca697f objc_exception_throw + 30 
2 CoreFoundation      0x3a2d1e8d <redacted> + 164 
3 MYAPP        0x000ff721 MYAPP + 214817 
4 MYAPP        0x000e8999 MYAPP + 121241 
5 UIKit        0x372f60ad <redacted> + 72 
6 UIKit        0x372f605f <redacted> + 30 
7 UIKit        0x372f603d <redacted> + 44 
8 UIKit        0x372f58f3 <redacted> + 502 
9 UIKit        0x372e1287 <redacted> + 526 
10 UIKit        0x37373f3d <redacted> + 748 
11 UIKit        0x3721e52b <redacted> + 318 
12 UIKit        0x3720b809 <redacted> + 380 
13 UIKit        0x3720b123 <redacted> + 6154 
14 GraphicsServices     0x362085a3 <redacted> + 590 
15 GraphicsServices     0x362081d3 <redacted> + 34 
16 CoreFoundation     0x3a35c173 <redacted> + 34 
17 CoreFoundation     0x3a35c117 <redacted> + 138 
18 CoreFoundation     0x3a35af99 <redacted> + 1384 
19 CoreFoundation     0x3a2cdebd CFRunLoopRunSpecific + 356 
20 CoreFoundation     0x3a2cdd49 CFRunLoopRunInMode + 104 
21 GraphicsServices     0x362072eb GSEventRunModal + 74 
22 UIKit        0x3725f301 UIApplicationMain + 1120 
23 MYAPP        0x000ccbd3 MYAPP + 7123 
24 MYAPP        0x000ccb88 MYAPP + 7048 
) 

ich den Stack-Trace von hier, die der Benutzer aufgefordert wird, eine E-Mail, wenn die App wieder geöffnet wird:

void uncaughtExceptionHandler(NSException *exception) { 
    //make a file name to write the data to using the documents directory: 
    NSString *fileName = [NSString stringWithFormat:@"%@/crashlog.txt", documentsDirectory]; 
    //create content - four lines of text 
    NSString *content = [NSString stringWithFormat:@"CRASH: %@ (%@)\n\nTRACE: %@", [exception name], [exception reason], [exception callStackSymbols]]; 
    //save content to the documents directory 
    [content writeToFile:fileName atomically:NO encoding:NSStringEncodingConversionAllowLossy error:nil]; 
} 

Ohne die Methodennamen, dann ist dies schlimmer als nutzlos. Gibt es eine Möglichkeit, diese Methodennamen in meine Stack-Traces zurück zu bekommen? Dies ist eine Release-Konfiguration, nicht debuggen.

EDIT:

ich die Anweisungen in this answer gefolgt.

Ich Extrahieren der .app und .dSYM Dateien aus dem .xcarchive Paket und atos -arch armv7 -o 'MyApp.app'/'MyApp'

Allerdings läuft, bin ich immer noch nicht bekommen Methodennamen von atos.

+0

Das gleiche Problem in iOS 6.1 – malhal

+0

Followup - ich habe nie dies zu arbeiten, so habe ich E-Mail Crash-Berichte verlassen und ich bin jetzt mit QuincyKit - viel bessere Lösung. – colincameron

Antwort

1

Haben Sie zufällig irgendwelche iOS 6 Betas installiert? Ich stieß auf dasselbe Problem.

Diese question hat mir geholfen.

+1

Danke für die Antwort, aber das ist ein etwas anderes Problem. Das Absturzprotokoll wird auf dem Gerät des Benutzers symbolisiert, nicht auf meinem Entwicklungs-Mac. Kann ich auf meinem Mac Absturzprotokolle symbolisieren, die von einem Gerät eines Benutzers kommen, nicht von iTunes? – colincameron

+0

Sie können symbolisieren, solange Sie das dSym des Builds von Ihrem Benutzergerät haben. Der Prozess hat sich wahrscheinlich geändert, seit Xcode zu einer richtigen App wurde, aber es gibt wahrscheinlich Tutorials, wie man es über Google macht. – ageektrapped