473,394 Members | 1,759 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

my program crashes randomly (it seems)

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!

Jul 31 '06 #1
6 1584
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
Jul 31 '06 #2
Carl Daniel [VC++ MVP] wrote:
po****@gmail.com wrote:
Hi All,

I've developed a program that seems to crash randomly, from what I can

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.

Jul 31 '06 #3
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.

Chris Dunaway wrote:
Carl Daniel [VC++ MVP] wrote:
po****@gmail.com wrote:
Hi All,
>
I've developed a program that seems to crash randomly, from what I can
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.
Jul 31 '06 #4
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!
Population One wrote:
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.

Chris Dunaway wrote:
Carl Daniel [VC++ MVP] wrote:
po****@gmail.com wrote:
Hi All,

I've developed a program that seems to crash randomly, from what I can
>
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.
Aug 4 '06 #5
Population One wrote:
No luck at all. ExitThread event never fires. Moving it to a new
What about the ThreadException event??

Aug 4 '06 #6
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.

Chris Dunaway wrote:
Population One wrote:
No luck at all. ExitThread event never fires. Moving it to a new

What about the ThreadException event??
Aug 4 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: a2x | last post by:
Hi, I've fixed this error, but I don't know why it occurs. Do you? Code: #include <stdlib.h> #include <string.h> void another(); int main()
8
by: Paul Bromley | last post by:
I am about to release the second version of a program that I started writing 12 months ago. The first version worked fine on 98 upwards. This version seems to crash on Windows 98. I realise that...
2
by: manuthomas23 | last post by:
Here is the code: #ifndef M3DCAMERA__H__ #define M3DCAMERA__H__ class M3DEngine; /** Micro3D Camera class. */
3
by: wongjoekmeu | last post by:
Hiya all, I have a strange problem. I have compiled a program with g++ compiler. It seems to compile fine. I can even compile it with debug (-g) option. However at the very beginning when I run...
1
by: D'artagnan | last post by:
Dynamically allocated (malloc) memory is returned back to the OS when a program terminates normally. But what if the program crashes? Is its heap also freed? Thanks.
0
by: developer200701 | last post by:
The following code (which is distilled down from a larger application) worked for several years previously. Now, the instant you click on the print icon within the print preview window the...
41
by: z | last post by:
I use Visual C 2005 to develop my programs. One in particular is crashing in very specific and hard to replicate situations, made worse by the fact it only crashes when run -outside- the dev - as...
13
by: Thomas Neubauer | last post by:
Hello, i am learning c# and have created now a simple project that just creates 6 random numbers. My form includes a button and 6 labels for the random numbers. The program seems to work...
3
by: ckkart | last post by:
Hi, on XP when starting a certain external program (plain C calculation program which communicates via stdout/fs) from python 2.5 using subprocess.Popen the external program crashes. It does not...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.