Sign in to follow this  

[.net] .net 2.0 C# Program Crashes without error

This topic is 3665 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have written a pretty small and simple C# app that is currently crashing as soon as it opens on one of my machines (it works perfectly on about 5 other machines with varying operating systems and configurations). All that happens is, it opens, the mouse turns to hourglass, then the program closes. There is no error or event shown in windows event log. I have applied try/catch throughout the constructor/loading section of my program (which is quite a small area as not much is required to load up). The software makes use of Excel interop and System.Data.SqlClient, other than that it is a straightforward winform. It is an XP machine with .net 2.0 (which has been uninstalled and reinstalled). Is there any way to derive the error?

Share this post


Link to post
Share on other sites
When I was working on getting CuteGod working on Windows, I found a couple DLL-related problems showed up, but a useless error message on the screen (i.e. the "send data to Microsoft" without a useful exception dump). To get around that, I wrote a short little program that starts up, then dynamically loads the actual executable (via System.Reflection). Interestingly, when doing it this way, I could actually catch the exception and display it in a SWF.MessageBox long enough to tell me what to do to fix it.

Share this post


Link to post
Share on other sites
Yup, borked depenencies is how I acheive that effect :)

The excel interop sounds the most suspicious to me. Using primary interop assemblies? Any unregistered com dependencies? Lots to go wrong.

You might get some indication from fusion debug messages indicating what is being loaded so you could launch from Windbg or dev studio to see the OutputDebugString output.

dMoon's idea of loading by reflection is good or just chop out dependencies until it works.

Share this post


Link to post
Share on other sites

This topic is 3665 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this