2015-12-01 4 views
5

So habe ich einen Stack-Trace von meiner UWP Windows-Anwendung im Freigabemodus erhalten. Ich habe jetzt alle Adressen mit windbg in ihre Methodennamen übersetzt.Schritte zur Diagnose übersetzte UWP-Stack-Trace

Ich habe jetzt diese Ausgabe:

System.InvalidOperationException: InvalidOperation_EnumFailedVersion. For 

more information, visit http://go.microsoft.com/fwlink/?LinkId=623485 
at MyApp!<BaseAddress>+0x7710b7 
    - MyApp!System::Func$4<System::__Canon,System::__Canon,System::__Canon,System::__Canon>.BeginInvoke+0x27 
    | (00b710c0) MyApp!System::Func$4<System::__Canon,System::__Canon,System::__Canon,System::__Canon>.Invoke 
at MyApp!<BaseAddress>+0x771125 
    - MyApp!System::Func$3<System::__Canon,System::Int32,System::__Canon>.GetThunk+0x45 
     | (00b71130) MyApp!System::Func$3<System::__Canon,System::Int32,System::__Canon>.ReverseInvokeImpl 
at MyApp!<BaseAddress>+0x7710d5 
    - MyApp!System::Func$4<System::__Canon,System::__Canon,System::__Canon,System::__Canon>.Invoke+0x15 
     | (00b710e0) MyApp!System::Func$3<System::__Canon,System::Int32,System::__Canon>.GetThunk 
at MyApp!<BaseAddress>+0x85d8c9 
    - MyApp!$58_System::Net::Http::HttpContent::<>c__DisplayClass0.<ReadAsStringAsync>b__1$catch$0+0x16 
     | (00c5d8f2) MyApp!$58_System::Net::Http::HttpContent::<>c__DisplayClass0.<ReadAsStringAsync>b__1$catch$1 
at MyApp.Collections.ViewModelCollection.<PrependListOfViewModelsAsync>b__24_1(ViewModels.ViewModel nt) 
at MyApp!<BaseAddress>+0x784241 
    - MyApp!$45_System::Collections::Generic::Dictionary$2<$76_Microsoft::CSharp::RuntimeBinder::Syntax::OperatorKind,System::__Canon>.Remove+0x81 
     | (00b84310) MyApp!$45_System::Collections::Generic::Dictionary$2<$76_Microsoft::CSharp::RuntimeBinder::Syntax::OperatorKind,System::__Canon>.Resize 
at MyApp!<BaseAddress>+0x786623 
    - MyApp!$45_System::Collections::Generic::Dictionary$2<$54_Newtonsoft::Json::Serialization::DefaultSerializationBinder::TypeNameKey,System::__Canon>.Remove+0x3 
     | (00b86790) MyApp!$45_System::Collections::Generic::Dictionary$2<$54_Newtonsoft::Json::Serialization::DefaultSerializationBinder::TypeNameKey,System::__Canon>.Resize 
at MyApp!<BaseAddress>+0x7e41af 
    - MyApp!$62_System::Linq::Expressions::ConditionalExpression.Make+0x3f 
     | (00be4250) MyApp!$47_Internal::Reflection::Execution::FoundationTypesImplementation.get_SystemObject 
at System.Collections.Generic.List<System.Object>..ctor(Collections.Generic.IEnumerable<System.Object> collection) 
at MyApp.Collections.ViewModelCollection.<>c__DisplayClass24_0.<PrependListOfViewModelsAsync>b__0() 
at System.Action.Invoke() 
at MyApp!<BaseAddress>+0xcbb04f 
    - MyApp!$121_Type23.ReadArrayOfUrlEntityFromXml+0x1cf 
     | (010bb1a0) MyApp!$121_Type16.ReadArrayOfMediaFromXmlIsGetOnly 
at MyApp!<BaseAddress>+0xdb9c41 --- End of stack trace from previous location where exception was thrown --- 
    - MyApp!$70_System::Xml::XmlConvert.CreateException+0xe1 
     | (011b9d60) MyApp!$70_System::SR.get_Xml_InvalidSurrogateHighChar 
at MyApp!<BaseAddress>+0x819f65 
    - MyApp!$62_System::Linq::Expressions::Interpreter::LightCompiler.CompileNewExpression+0x55 
     | (00c1a190) MyApp!$62_System::Linq::Expressions::Interpreter::InstructionList.EmitNew 
at MyApp!<BaseAddress>+0x81a319 
    - MyApp!$62_System::Linq::Expressions::Interpreter::LightCompiler.CompileMemberInit+0xb9 
     | (00c1a618) MyApp!$62_System::Linq::Expressions::Interpreter::LightCompiler.CompileMemberInit$fin$0 
at MyApp!<BaseAddress>+0x9e9843 --- End of stack trace from previous location where exception was thrown --- 
    - MyApp!_$ILCT$::$ILT$ReflectionDynamicInvoke$.InvokeRetVI<$61_Windows.Foundation.Rect>+0x63 
     | (00de9850) MyApp!$122_Microsoft::Graphics::Canvas::Effects::AtlasEffect.put_SourceRectangle 
at MyApp!<BaseAddress>+0x819f65 
     - MyApp!$62_System::Linq::Expressions::Interpreter::LightCompiler.CompileNewExpression+0x55 
      | (00c1a190) MyApp!$62_System::Linq::Expressions::Interpreter::InstructionList.EmitNew 
at MyApp!<BaseAddress>+0x81a319 
    - MyApp!$62_System::Linq::Expressions::Interpreter::LightCompiler.CompileMemberInit+0xb9 
     | (00c1a618) MyApp!$62_System::Linq::Expressions::Interpreter::LightCompiler.CompileMemberInit$fin$0 
at MyApp!<BaseAddress>+0x9f0481 --- End of stack trace from previous location where exception was thrown --- 
    - MyApp!$122_McgInterop::ForwardComSharedStubs.Func_Microsoft_Graphics_Canvas_CanvasDrawingSession__Numerics_Vector2__float__rg_Microsoft_Graphics_Canvas_Text_CanvasGlyph__bool__uint___Rect__+0x1b1 
     | (00df04f1) MyApp!$122_McgInterop::ForwardComSharedStubs.Func_Microsoft_Graphics_Canvas_CanvasDrawingSession__Numerics_Vector2__float__rg_Microsoft_Graphics_Canvas_Text_CanvasGlyph__bool__uint___Rect__$fin$0 
at MyApp!<BaseAddress>+0x819f65 
    - MyApp!$62_System::Linq::Expressions::Interpreter::LightCompiler.CompileNewExpression+0x55 
    | (00c1a190) MyApp!$62_System::Linq::Expressions::Interpreter::InstructionList.EmitNew 
at MyApp!<BaseAddress>+0x81a17f 
    - MyApp!$62_System::Linq::Expressions::Interpreter::LightCompiler.CompileNewExpression+0x26f 
     | (00c1a190) MyApp!$62_System::Linq::Expressions::Interpreter::InstructionList.EmitNew 
at MyApp!<BaseAddress>+0x8dc247 Stack: InvalidOperation_EnumFailedVersion. For more information, visit http://go.microsoft.com/fwlink/?LinkId=623485 
    - MyApp!$78_System::Runtime::Serialization::CollectionDataContract.IsCollectionOrTryCreate+0x2f7 
     | (00cdc720) MyApp!$78_System::Runtime::Serialization::CollectionDataContract..ctor 

Was ist der empfohlene Weg, um diese übersetzt Stack-Trace nähern Sie die säumige Methodennamen oder zumindest verengen sie zu identifizieren?

+0

Hey Brad, ich arbeite auf dem .NET-Runtime-india und Compiler-Team. Wir arbeiten an einigen Werkzeugen, um mit solchen Szenarien zu helfen, möchten aber Ihr Feedback. Können Sie uns eine E-Mail an [email protected] schicken? Wir können hier posten, wenn wir auf "pay dreck" getroffen haben. :-) –

+0

Haben Sie eine Lösung gefunden? – Felix

Antwort

4

Hier ist ein Update für den Fall, dass jemand anderes auf dieses Problem stößt.

PDBs und Stacks in .NET india

.NET india PDBs sind anders als die PDBs Sie erwarten können. Achten Sie darauf, die richtigen zu speichern! Als Teil der Kompilierung Ihrer Anwendung für nativen Code müssen wir eine neue PDB-Datei generieren, die alle richtigen Zuordnungen zu Ihrer Quelle enthält. Wenn Sie die richtige PDB nicht speichern, haben Sie vollständig nicht umsetzbare Stacks/Dumps. Es gibt keine Möglichkeit, diese Datei neu zu erstellen, wenn Sie sie verlieren.

Für lokale dev baut oder Build-Server es auf Pfaden wie leben:

<projectRoot>\bin\<Architecture>\<Release|Debug>\ilc\YOURAPPLICATIONNAME.pdb 

Sie werden es ist die richtige wissen, weil es gigantisch sein werden (50 + MB). Nachdem Sie in den Store hochgeladen haben, können Sie Ihre Cloud-kompilierte pdb-Datei vom Entwicklungscenter abrufen.

.NET native Stacks nicht menschlich lesbar sind

In dem Bemühen, möglichst schlank zu sein, die .NET india Kompilierungsvorgang abstreift Metadaten, die die Laufzeit erlauben würde, den Menschen lesbaren Stapel zu erzeugen. Heute sehen sie so etwas wie:

at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() 
    at SharedLibrary!<BaseAddress>+0x35d1d7 
    at SharedLibrary!<BaseAddress>+0x35d10d 
    at SharedLibrary!<BaseAddress>+0x35d0dd 
    at FieldMedic!<BaseAddress>+0x13dec5 [2147500037] 

Wenn Sie HockeyApp für Telemetrie verwenden, haben sie zusätzliche Funktionalität Stapeln zu rekonstruieren nützlicher zu sein. Siehe our blog post.

Es klingt jedoch, als ob Sie nicht HockeyApp für die Telemetrie dieser Art verwenden. Vorausgesetzt, dass dies der Fall ist, müssen Sie StackParser verwenden. Klonen Sie dieses Repo, bauen Sie und Sie gehen.

Hier ist die Hilfe, die Ihnen eine Vorstellung davon zu geben, was Sie mit zu tun haben werden:

StackParser [/pdbs {pdbFiles}] [/modules {PE files}] 
      [/keep] [/in inputFile] [/out outputfile] [/symsrv definition] 

All arguments are optional, but at least one pdb file or one PE file need to be defined. 

    /pdb {pdbFiles}  A non empty list of pdb files to be used 
    /modules {PE files} A non empty list of loaded modules used. 
          Symbols are fetched from the symbol store. 
    /keep     Keep the pdb files. 
          (default: all downloaded symbol files are deleted). 
    /in <file>   Input to operate on (default: stdin). 
    /out <file>   Append output to file (default: stdout). 
    /symsrv <definition> "Standard"definition for symbol server cache. 
          (Implies /keep). 

    Examples: 
StackParser /pdbs app.pdb SharedLibrary.pdb < log.txt 
    Uses existing PDB files to convert log.txt and writes result to console. 

StackParser /pdbs app.pdb /modules Lib.dll /in log.txt /out symlog.txt 
    Uses existing PDB (app.pdb) and looks up pdb file for Lib.dll; 
    reads input from log.txt and writes result to symlog.txt. 

StackParser /modules foo.dll /in log.txt /symserver srv*c:\symbols*http://msdl.microsoft.com/download/symbols 
    Converts log.txt by getting symbols from public symbol server 
    (with local cache at c:\symbols). 
0

ich nicht geholfen Stack-Traces mehrere Abstürze im Windows Dev Center hatte. Mit dem Tipp von Matt Whilden habe ich StackParser benutzt. Aber es war ein Schmerz, alle Unfälle manuell zu symbolisieren. Daher habe ich eine Anwendung geschrieben, die die heruntergeladenen .tsv-Stack-Traces vom Dev Center symbolisieren kann und die Windows Dev Center-API verwendet, um Abstürze vollautomatisch zu symbolisieren. Hier

ist ein Link auf die Github des Falles, dass jemand Interesse daran ist: https://github.com/hig-dev/WindowsDevCenterStacktraceSymbolicater

Verwandte Themen