my program crashes randomly (it seems)

  • Thread starter Thread starter popone
  • Start date Start date
P

popone

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!
 
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
 
Carl said:
I'm assuming that this is a C# Winforms app, since you've chosen to post
here, yes?

In addition, make sure you have attached a handler to the
Application.ThreadException event. When it crashes, you should be able
to get exception and stack trace information.
 
Thanks Carl for your help. I attached the EventHandler, and I'll wait
for the next time the app crashes. I also installed in on another
production machine, just in case it has something to do with the
computer itself. Unfortunately error report doesn't have a stack
message. One question though, how do attach a debugger if it doesn't
give me a memory address? I've seen crashes where it'll tell u to
cordbg.exe and a memory address, but this message doesn't.
 
No luck at all. ExitThread event never fires. Moving it to a new
machine didn't help. I'm going to disable my ColumnChanging events to
see if that helps. Anybody have any ideas? Thanks in advance!
 
i'm sorry. that's what I meant. I attached it to the
Application.ThreadException event and it never fires. The first line
of the error report has an exception number, google'd it and it had 3
results which didn't help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top