在某些机器上,我的 C# 应用程序在启动时崩溃。如何找出问题的原因是什么?从哪里开始我的研究?
当我获得托管异常时,我有很好的 StackTrace 和异常消息,因此我有一个良好的起点。但是在AppCrash对话框中有一些奇怪的十六进制数字,我不知道它们是什么意思。
PS 这台机器确实安装了适当的.NET Framework。
更新:我不是在谈论特定的异常,而是在谈论修复这些异常的常见方法。我想学习如何自己做,而不是在论坛上询问我遇到的每个错误。
On some machines my C# app crashes when started. How to find out what is the cause of the problem? Where to start my research?
When I get managed exceptions I have nice StackTrace and exception messages so I have good start point. But in AppCrash dialog there are some weird hex numbers, I don't know what they mean.
P.S. This machines do have appropriate .NET Framework installed.
Update: I'm not talking about specific exceptions, but rather about what are common methods of fixing those. I want to learn how to do it myself and not asking on forums about every error I encounter.
发布评论
评论(4)
在开始查看内存转储等之前,我会先查看事件查看器。很多时候,可能是显卡驱动程序等导致崩溃,然后事件查看器将显示发生了什么。
I would look in the event viewer before starting looking at memory dumps etc. Many times it can be Graphic Cards drivers etc who causes the crash and the event viewer will then show what have happen.
我建议查看
windbg
来分析故障转储。详情请参阅这篇文章:
http://msdn.microsoft.com/en-us/windows/hardware /gg463009.aspx
I would suggest taking a look at
windbg
to analyze the crash dump.See this article for details:
http://msdn.microsoft.com/en-us/windows/hardware/gg463009.aspx
盲目猜测,我会说您出现故障的计算机上没有正确版本的 .NET 框架。例如,您尝试在仅安装了 .net2 的计算机上运行 .net4 应用程序。
发布错误的屏幕截图/文本怎么样?
At a blind guess I'd say you don't have the correct version of the .NET framework on the machine that is failing. Eg, you are trying to run a .net4 application on a machine where .net2 only is installed.
How about posting a screenshot/text of the error?
您是否尝试过使用 crashdump 选项的 Windbg?
所以类似 adplus –crash –sc c:\myfolder\Myapp.exe
您可以在这里找到更多详细信息 http://blogs.msdn.com/b/anandbms/archive/2005/04/20/410225.aspx。
Have you tried windbg with crashdump option ?.
so something like adplus –crash –sc c:\myfolder\Myapp.exe
You can find more details here http://blogs.msdn.com/b/anandbms/archive/2005/04/20/410225.aspx.