Jump to content
  • Advertisement
Sign in to follow this  
ferr

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

This topic is 3969 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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!