vb.net 在生产中调试 CLR20r3 System.InvalidOperationException

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/17310023/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-17 14:02:30  来源:igfitidea点击:

Debugging a CLR20r3 System.InvalidOperationException in production

vb.netdebugging

提问by Sally S

We have a production VS2008 VB.Net application that's installed on many (hundreds) of client computers. A customer recently installed the application on his Win 7 desktop. The installation completed without errors. However, when he tries to run the application, he receives the following error "Application Name has stopped working". I've included the contents of the event log file below. In my research, it seems this type of error can be caused by a number of things - bad or missing dependency, missing .net framework, permissions, a faulty icon, missing font.

我们有一个生产 VS2008 VB.Net 应用程序,它安装在许多(数百)台客户端计算机上。一位客户最近在他的 Win 7 桌面上安装了该应用程序。安装完成,没有错误。但是,当他尝试运行该应用程序时,他收到以下错误“应用程序名称已停止工作”。我在下面包含了事件日志文件的内容。在我的研究中,似乎这种类型的错误可能是由多种原因引起的 - 不良或缺少依赖项、缺少 .net 框架、权限、错误图标、缺少字体。

My question is this: Is there a way we can effectively troubleshoot this problem in a production environment? I know the application installation is good; even this customer can run the application on another computer. The appropriate .net framework shows as being installed. I could have him reinstall the .net framework but would like to get a better handle on what's going on.

我的问题是:有没有办法可以在生产环境中有效地解决这个问题?我知道应用安装很好;即使该客户也可以在另一台计算机上运行该应用程序。相应的 .net 框架显示为已安装。我可以让他重新安装 .net 框架,但希望更好地处理正在发生的事情。

Here is the contents of the event log file:

以下是事件日志文件的内容:

Version=1  
EventType=CLR20r3  
EventTime=130163188478462012  
ReportType=2  
Consent=1  
ReportIdentifier=31c14aab-daae-11e2-b34f-d48564179a03  
WOW64=1  
Response.type=4  
Sig[0].Name=Problem Signature 01  
Sig[0].Value=planguru2013.exe
Sig[1].Name=Problem Signature 02
Sig[1].Value=3.0.0.2
Sig[2].Name=Problem Signature 03
Sig[2].Value=51b6342b
Sig[3].Name=Problem Signature 04
Sig[3].Value=PlanGuru2013
Sig[4].Name=Problem Signature 05
Sig[4].Value=3.0.0.2
Sig[5].Name=Problem Signature 06
Sig[5].Value=51b6342b
Sig[6].Name=Problem Signature 07
Sig[6].Value=a0
Sig[7].Name=Problem Signature 08
Sig[7].Value=c6
Sig[8].Name=Problem Signature 09
Sig[8].Value=System.InvalidOperationException
DynamicSig[1].Name=OS Version
DynamicSig[1].Value=6.1.7601.2.1.0.768.3
DynamicSig[2].Name=Locale ID
DynamicSig[2].Value=1033
UI[2]=C:\Program Files (x86)\New Horizon\PlanGuru 2013\PlanGuru2013.exe
UI[3]=PlanGuru 2013 has stopped working
UI[4]=Windows can check online for a solution to the problem.
UI[5]=Check online for a solution and close the program
UI[6]=Check online for a solution later and close the program
UI[7]=Close the program
LoadedModule[0]=C:\Program Files (x86)\New Horizon\PlanGuru 2013\PlanGuru2013.exe
LoadedModule[1]=C:\Windows\SysWOW64\ntdll.dll
LoadedModule[2]=C:\Windows\SYSTEM32\MSCOREE.DLL
LoadedModule[3]=C:\Windows\syswow64\KERNEL32.dll
LoadedModule[4]=C:\Windows\syswow64\KERNELBASE.dll
LoadedModule[5]=C:\Windows\system32\apphelp.dll
LoadedModule[6]=C:\Windows\AppPatch\AcGenral.DLL
LoadedModule[7]=C:\Windows\SysWOW64\sechost.dll
LoadedModule[8]=C:\Windows\syswow64\msvcrt.dll
LoadedModule[9]=C:\Windows\syswow64\RPCRT4.dll
LoadedModule[10]=C:\Windows\syswow64\SspiCli.dll
LoadedModule[11]=C:\Windows\syswow64\CRYPTBASE.dll
LoadedModule[12]=C:\Windows\syswow64\SHLWAPI.dll
LoadedModule[13]=C:\Windows\syswow64\GDI32.dll
LoadedModule[14]=C:\Windows\syswow64\USER32.dll
LoadedModule[15]=C:\Windows\syswow64\ADVAPI32.dll
LoadedModule[16]=C:\Windows\syswow64\LPK.dll
LoadedModule[17]=C:\Windows\syswow64\USP10.dll
LoadedModule[18]=C:\Windows\system32\UxTheme.dll
LoadedModule[19]=C:\Windows\system32\WINMM.dll
LoadedModule[20]=C:\Windows\system32\samcli.dll
LoadedModule[21]=C:\Windows\syswow64\ole32.dll
LoadedModule[22]=C:\Windows\syswow64\OLEAUT32.dll
LoadedModule[23]=C:\Windows\system32\MSACM32.dll
LoadedModule[24]=C:\Windows\system32\VERSION.dll
LoadedModule[25]=C:\Windows\syswow64\SHELL32.dll
LoadedModule[26]=C:\Windows\system32\sfc.dll
LoadedModule[27]=C:\Windows\system32\sfc_os.DLL
LoadedModule[28]=C:\Windows\system32\USERENV.dll
LoadedModule[29]=C:\Windows\system32\profapi.dll
LoadedModule[30]=C:\Windows\system32\dwmapi.dll
LoadedModule[31]=C:\Windows\syswow64\SETUPAPI.dll
LoadedModule[32]=C:\Windows\syswow64\CFGMGR32.dll
LoadedModule[33]=C:\Windows\syswow64\DEVOBJ.dll
LoadedModule[34]=C:\Windows\syswow64\urlmon.dll
LoadedModule[35]=C:\Windows\syswow64\WININET.dll
LoadedModule[36]=C:\Windows\syswow64\iertutil.dll
LoadedModule[37]=C:\Windows\syswow64\CRYPT32.dll
LoadedModule[38]=C:\Windows\syswow64\MSASN1.dll
LoadedModule[39]=C:\Windows\system32\MPR.dll
LoadedModule[40]=C:\Windows\system32\IMM32.DLL
LoadedModule[41]=C:\Windows\syswow64\MSCTF.dll
LoadedModule[42]=C:\Windows\Microsoft.NET\Framework\v4.0.30319\mscoreei.dll
LoadedModule[43]=C:\Windows\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll
LoadedModule[44]=C:\Windows\WinSxS   \x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.6195_none_d09154e044272b9a\MSVCR80.dll
LoadedModule[45]=C:\Windows\assembly\NativeImages_v2.0.50727_32\mscorlib50b9136fad5b79e88f6c7f9d3d2c39\mscorlib.ni.dll
LoadedModule[46]=C:\Windows\Microsoft.NET\Framework\v2.0.50727\mscorsec.dll
LoadedModule[47]=C:\Windows\syswow64\WINTRUST.dll
LoadedModule[48]=C:\Windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.7601.17514_none_ec83dffa859149af\COMCTL32.dll
LoadedModule[49]=C:\Windows\system32\CRYPTSP.dll
LoadedModule[50]=C:\Windows\system32\rsaenh.dll
LoadedModule[51]=C:\Windows\syswow64\imagehlp.dll
LoadedModule[52]=C:\Windows\system32\ncrypt.dll
LoadedModule[53]=C:\Windows\system32\bcrypt.dll
LoadedModule[54]=C:\Windows\SysWOW64\bcryptprimitives.dll
LoadedModule[55]=C:\Windows\system32\GPAPI.dll
LoadedModule[56]=C:\Windows\system32\cryptnet.dll
LoadedModule[57]=C:\Windows\syswow64\WLDAP32.dll
LoadedModule[58]=C:\Windows\system32\SensApi.dll
LoadedModule[59]=C:\Windows\assembly\NativeImages_v2.0.50727_32\System 9f8bdca364e2b4936d18dea582912c\System.ni.dll
LoadedModule[60]=C:\Windows\assembly\NativeImages_v2.0.50727_32\Microsoft.VisualBas#66a39c36523a084bc11c230929ff92\Microsoft.VisualBasic.ni.dll
LoadedModule[61]=C:\Windows\Microsoft.NET\Framework\v2.0.50727\mscorjit.dll
LoadedModule[62]=C:\Windows\assembly\NativeImages_v2.0.50727_32\System.Drawing\eead6629e384a5b69f9ae35284b7eeed\System.Drawing.ni.dll
LoadedModule[63]=C:\Windows\assembly\NativeImages_v2.0.50727_32\System.Windows.Formse3a21202000677d0a9270572251477\System.Windows.Forms.ni.dll
LoadedModule[64]=C:\Windows\assembly\NativeImages_v2.0.50727_32\System.Runtime.Remo#b89f6e8032310e9ac72a309fd49e83\System.Runtime.Remoting.ni.dll
LoadedModule[65]=C:\Windows\syswow64\ws2_32.dll
LoadedModule[66]=C:\Windows\syswow64\NSI.dll
LoadedModule[67]=C:\Windows\system32\mswsock.dll
LoadedModule[68]=C:\Windows\System32\wshtcpip.dll
LoadedModule[69]=C:\Windows\System32\wship6.dll
LoadedModule[70]=C:\Windows\assembly\NativeImages_v2.0.50727_32\System.Configuration4f15e86c82662e977bd418bd6318c1\System.Configuration.ni.dll
LoadedModule[71]=C:\Windows\assembly\NativeImages_v2.0.50727_32\System.Xml\f687c43e9fdec031988b33ae722c4613\System.Xml.ni.dll
LoadedModule[72]=C:\Windows\system32\RpcRtRemote.dll
LoadedModule[73]=C:\Program Files (x86)\New Horizon\PlanGuru 2013\FarPoint.Win.Spread.dll
LoadedModule[74]=C:\Program Files (x86)\New Horizon\PlanGuru 2013\FarPoint.Win.dll
LoadedModule[75]=C:\Windows\assembly\NativeImages_v2.0.50727_32\System.Data\dd20416f723ee13ffb4173ec1afc4ec4\System.Data.ni.dll
LoadedModule[76]=C:\Windows\assembly\GAC_32\System.Data.0.0.0__b77a5c561934e089\System.Data.dll
LoadedModule[77]=C:\Windows\WinSxS\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.7601.17825_none_72d273598668a06b\gdiplus.dll
LoadedModule[78]=C:\Windows\system32\WindowsCodecs.dll
LoadedModule[79]=C:\Program Files (x86)\New Horizon\PlanGuru 2013\FarPoint.Win.TextRenderer.dll
LoadedModule[80]=C:\Program Files (x86)\New Horizon\PlanGuru 2013\FarPoint.CalcEngine.dll
FriendlyEventName=Stopped working
ConsentKey=CLR20r3
AppName=PlanGuru 2013
AppPath=C:\Program Files (x86)\New Horizon\PlanGuru 2013\PlanGuru2013.exe
ReportDescription=Stopped working

采纳答案by Steven Edouard

To get the memory crash dump of the exception you can set the following registry keys to tell windows error reporting to keep the crash dump on the pc.

要获取异常的内存故障转储,您可以设置以下注册表项来告诉 Windows 错误报告将故障转储保留在 PC 上。

HKLM\SOFTWARE\Microsoft\Windows\Windows Error Reporting\ForceQueue = 0x1 HKLM\SOFTWARE\Microsoft\Windows\Windows Error Reporting\Consent\DefaultConsent = 0x1

HKLM\SOFTWARE\Microsoft\Windows\Windows 错误报告\ForceQueue = 0x1 HKLM\SOFTWARE\Microsoft\Windows\Windows 错误报告\Consent\DefaultConsent = 0x1

Now, look in:

现在,看看:

C:\ProgramData\Microsoft\Windows\WER\ReportQueue

C:\ProgramData\Microsoft\Windows\WER\ReportQueue

Your crash should be there with a managed dump. Visual Studio should be able to open the crash dump. If not use WinDbg + SOS.dll (which is located in the .net framework installation folder). This will give you the callstack of the exception.

您的崩溃应该存在托管转储。Visual Studio 应该能够打开故障转储。如果不使用 WinDbg + SOS.dll(位于 .net framework 安装文件夹中)。这将为您提供异常的调用堆栈。

回答by capsch

Sig[6].Name=Problem Signature 07 Sig[6].Value=a0

Sig[6].Name=问题签名 07 Sig[6].Value=a0

ildasm /tokens "PlanGuru2013.exe" /out=libcode.il

ildasm /tokens "PlanGuru2013.exe" /out=libcode.il

lookup failing method in IL 060000+ val above

上面 IL 060000+ val 中的查找失败方法

.method /060000a0/ private hidebysig

.method / 060000a0/ 私人隐藏