所以我在 Release模式下收到了来 self 的 UWP Windows 应用程序的堆栈跟踪。 我现在已经使用 windbg 将所有地址翻译成它们的方法名称。
我现在有这个输出:
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
处理此翻译后的堆栈跟踪以识别有问题的方法名称或至少缩小范围的推荐方法是什么?
最佳答案
这是一个更新,以防其他人遇到此问题。
.NET Native 中的 Pdb 和堆栈
.NET Native PDB 与您可能期望的 PDB 不同。确保保存正确的!作为将您的应用程序编译为 native 代码的一部分,我们需要生成一个新的 PDB 文件,其中包含所有正确的映射回您的源代码。如果您不保存正确的 PDB,您将拥有完全不可操作的堆栈/转储。如果丢失此文件,则无法重新生成它。
对于本地开发构建或您的构建服务器,它将位于如下路径:
<projectRoot>\bin\<Architecture>\<Release|Debug>\ilc\YOURAPPLICATIONNAME.pdb
您会知道它是正确的,因为它会非常大 (50+MB)。上传到商店后,您可以从开发中心获取云编译的 pdb。
.NET Native 堆栈不是人类可读的
为了最大限度地精简,.NET Native 编译过程去除了允许运行时生成人类可读堆栈的元数据。今天他们看起来像:
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at SharedLibrary!<BaseAddress>+0x35d1d7
at SharedLibrary!<BaseAddress>+0x35d10d
at SharedLibrary!<BaseAddress>+0x35d0dd
at FieldMedic!<BaseAddress>+0x13dec5 [2147500037]
如果您使用 HockeyApp 进行遥测,它们已经添加了重建堆栈的功能以使其更有用。参见 our blog post .
但是,听起来您并没有使用 HockeyApp 进行此类遥测。假设是这种情况,您需要使用 StackParser .克隆那个 repo,构建,然后就可以了。
以下帮助可让您了解将要处理的内容:
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).
关于c# - 诊断已翻译 UWP 堆栈跟踪的步骤,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34019714/
我正在使用i18n从头开始构建一个多语言网络应用程序,虽然我自己可以处理一大堆yml文件,但我说的语言(非常)有限,最终我想寻求外部帮助帮助。我想知道这里是否有人在使用UI插件/gem(与django上的django-rosetta不同)来处理多个翻译器,其中一些翻译器不愿意或无法处理存储库中的100多个文件,处理语言数据。谢谢&问候,安德拉斯(如果您已经在rubyonrails-talk上遇到了这个问题,我们深表歉意) 最佳答案 有一个rails3branchofthetolkgem在github上。您可以通过在Gemfi
如何在ruby中调用C#dll? 最佳答案 我能想到几种可能性:为您的DLL编写(或找人编写)一个COM包装器,如果它还没有,则使用Ruby的WIN32OLE库来调用它;看看RubyCLR,其中一位作者是JohnLam,他继续在Microsoft从事IronRuby方面的工作。(估计不会再维护了,可能不支持.Net2.0以上的版本);正如其他地方已经提到的,看看使用IronRuby,如果这是您的技术选择。有一个主题是here.请注意,最后一篇文章实际上来自JohnLam(看起来像是2009年3月),他似乎很自在地断言RubyCL
我正在尝试在Ruby中复制Convert.ToBase64String()行为。这是我的C#代码:varsha1=newSHA1CryptoServiceProvider();varpasswordBytes=Encoding.UTF8.GetBytes("password");varpasswordHash=sha1.ComputeHash(passwordBytes);returnConvert.ToBase64String(passwordHash);//returns"W6ph5Mm5Pz8GgiULbPgzG37mj9g="当我在Ruby中尝试同样的事情时,我得到了相同sha
C#实现简易绘图工具一.引言实验目的:通过制作窗体应用程序(C#画图软件),熟悉基本的窗体设计过程以及控件设计,事件处理等,熟悉使用C#的winform窗体进行绘图的基本步骤,对于面向对象编程有更加深刻的体会.Tutorial任务设计一个具有基本功能的画图软件**·包括简单的新建文件,保存,重新绘图等功能**·实现一些基本图形的绘制,包括铅笔和基本形状等,学习橡皮工具的创建**·设计一个合理舒适的UI界面**注明:你可能需要先了解一些关于winform窗体应用程序绘图的基本知识,以及关于GDI+类和结构的知识二.实验环境Windows系统下的visualstudio2017C#窗体应用程序三.
我是Cucumber测试的新手。我创建了两个特征文件:events.featurepartner.feature并将我的步骤定义放在step_definitions文件夹中:./step_definitions/events.rbpartner.rbCucumber似乎在所有.rb文件中查找步骤信息。有没有办法限制该功能查看特定的步骤定义文件?我之所以要这样做,是因为即使我使用了--guess标志,我也会遇到不明确的匹配错误。我之所以要这样做,有以下几个原因。我正在测试CMS,并希望在不同的功能中测试每种不同的内容类型(事件和合作伙伴)。事件.特征Feature:AddpartnerA
我在下面有一个步骤定义,它执行我想要它执行的操作,即它根据“PAGES”哈希的“page”元素检查页面的url。Then(/^Ishould(still)?beatthe"(.*)"page$/)do|still,page|BROWSER.url.should==PAGES[page]end步骤定义用于两者我应该在...页面我应该还在...页面但是,我不需要将“still”传递到block中。我只需要它是可选的以匹配步骤但不传递到block中。我该怎么做?谢谢。 最佳答案 您想将“静止”组标记为非捕获。这是通过使用?:启动组来完成的
很高兴看到google代码:google-api-ruby-client项目,因为这对我来说意味着Ruby人员可以使用GoogleAPI-s来完善代码。虽然我现在很困惑,因为给出的唯一示例使用Buzz,并且根据我的实验,Google翻译(v2)api的行为必须与google-api-ruby-client中的Buzz完全不同。.我对“Explorer”演示示例很感兴趣——但据我所知,它并不是一个探索器。它所做的只是调用一个Buzz服务,然后浏览它已经知道的关于Buzz服务的事情。对我来说,Explorer应该让您“发现”所公开的服务和方法/功能,而不一定已经知道它们。我很想听听使用这个
如果特定语言环境中缺少翻译,如何配置i18n以使用en语言环境翻译?当前已插入翻译缺失消息。我正在使用RoR3.1。 最佳答案 找到相似的question这里是答案:#application.rb#railswillfallbacktoconfig.i18n.default_localetranslationconfig.i18n.fallbacks=true#railswillfallbacktoen,nomatterwhatissetasconfig.i18n.default_localeconfig.i18n.fallback
在使用rails4和https://github.com/globalize/globalize的情况下,我应该如何为我的模型编写表单?用于翻译。我想以一种形式显示所有翻译,如下例所示。我在这里找到了解决方案https://github.com/rilla/batch_translations但我不知道如何实现它。这个“批量翻译”是一个gem还是什么?以及如何安装它。EditingpostEnglish(defaultlocale)SpanishtranslationFrenchtranslation 最佳答案 批处理翻译gem很旧
我如何做Ruby方法"Flatten"RubyMethod在C#中。此方法将锯齿状数组展平为一维数组。例如:s=[1,2,3]#=>[1,2,3]t=[4,5,6,[7,8]]#=>[4,5,6,[7,8]]a=[s,t,9,10]#=>[[1,2,3],[4,5,6,[7,8]],9,10]a.flatten#=>[1,2,3,4,5,6,7,8,9,10 最佳答案 递归解决方案:IEnumerableFlatten(IEnumerablearray){foreach(variteminarray){if(itemisIEnume