po****@gmail.com wrote:
Hi All,
I've developed a program that seems to crash randomly, from what I can
tell it's after some user action. If it just sat there, it wouldn't
crash. It's not an exception either, it's the error message that asks
if you want to send a report to microsoft. I have no clue where to
start hunting for the problem. I only use Interop to hide the start
menu, i don't think that is causing the problem. Also, on the
development machine, i have never seen this problem. Only when I
installed it on a new machine did i see the crashing issue. I know
this is vague, but i just really need advice on how to start finding
this bug, any help would be greatly appreciated. Thanks!
I'm assuming that this is a C# Winforms app, since you've chosen to post
here, yes?
The first thing I'd do is click on the "show me what the report contains"
link on the error reporting dialog and examine the details of the error
report closely. What you see there is basically a Dr Watson dump of the
application state at the time of the crash. You may even find a complete
managed stack trace in there.
The second thing is to work diligently on figuring out how to reproduce the
problem. You can't fix what you can't reproduce, so concentrate your
efforts there.
The third thing is to try running a debug build of the application on your
development machine but NOT under visual studio or any other debugger - just
run it stand-alone and see if you can reproduce the failure. If you can
repro it, you should be able to attach a debugger to the crashed application
and examine it's state. Sometimes simply having a debugger attached changes
the behavior of the program enough to make a bug not occur, so it's always a
good idea to do testing outside the Visual Studio environment.
Plug on - there are few magic bullets when it comes to debugging.
-cd