views:

68

answers:

3

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 it 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.

+2  A: 

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.

GrayWizardx
+1  A: 

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.

Lex Li
+1  A: 

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

Alon