views:

34

answers:

1

I have written a console application in .Net 3.5 to test a component that seems to be erroring randomly (The best kind). The interesting thing is that it seems to die regularly when I double click the exe, but when I open a command prompt and execute the same application from there with the same parameter selection (I.E. non, because you can't pass them in my double clicking the exe) it runs for hours on end without diying once.

What is the difference in these two scenarios?

Any ideas?

Thanks

Ps. I am catching the exceptions and I know what they are, since this was the errors I was trying to replicate. My question was around why it throughs exceptions much more regularly when executed directly while it seems to run happily when executed from the command prompt. Note that I run multiple instances of the application in either scenario.

+1  A: 

Make sure you working directory is correct.

Also a mention of the type of exception you are getting when it crashes will be helpful.

leppie
Unfortunately, you generally don't get to see the error in such conditions. Some kind of logging will have to be added to the code to identify why it crashed.
Russ
Unfortunately, you seemed to have forgotten to turn off Windows Error Reporting...
leppie