开发者

How do you determine the cause of crashes when it runs fine on your machines?

开发者 https://www.devze.com 2022-12-14 06:48 出处:网络
I wrote an application for Windows 7 using C# and VS2008 and it runs perfectly on the machine I developed it on and my laptop (doesn\'t have VS*). How can one determine the cause of these crashes? Is

I wrote an application for Windows 7 using C# and VS2008 and it runs perfectly on the machine I developed it on and my laptop (doesn't have VS*). How can one determine the cause of these crashes? Is there a way to check for dependencies of a program? The error it gives has zero information in i开发者_如何学编程t and I've tried installing the latest .NET distro.

Edit: It crashes immediately, and give zero information "A problem caused the program to stop working correctly. Please close the program." with a button to close the program.

I am a little knew to developing desktop applications. What I am distributing, which is crashing, is simply the debug folder and its contents. Could this be a problem?

Also, two possibly significant things that my program does are editing the registry and modifying contents of the system32 directory, both of which need elevated permission, which i granted through the manifest with the following line.

<requestedExecutionLevel level="highestAvailable" uiAccess="false" />

I hope that is helpful.


Can you give any more hints as to the error? One thing that you could do is add logging (using System.Diagonstics.Trace class, log4net or similar, or roll your own) to track program execution and see where it is occurring.

If you believe it is a problem with references/dependencies you can use Fusion Viewer to view the dependency loading that occurs for your app.


I rather collect relevant data to see what's up there.

http://blogs.msdn.com/lexli/archive/2009/08/23/when-the-application-program-crashes-on-windows.aspx.


add a crash dump when your application fails. see here for instructions on how to do it

once you analyze the dump (you can use windbg) you'll have a better understaing of the crash cause

0

精彩评论

暂无评论...
验证码 换一张
取 消