app crashes when instanciating a form

  • Thread starter Thread starter Benoit Martin
  • Start date Start date
B

Benoit Martin

Hello,

I am not expecting to get THE fix for my problem but I need help to get
started in the right direction

In one of my classes, I instantiate an object inherited from the
System.Windows.Forms.Form class. Most of the time this works good but every
once in a while, the application crashes and goes back to the VS.net or
Desktop depending if I'm running from VS or not.
I don't get any error message before the crash and the Try Catch block
doesn't catch any error.
I narrowed down my search to the constructor of this inherited class but now
I don't anything that could create that.
I am using threads for other functions but this form is not part of any
other thread than the main app thread.

Does anybody have any idea what would be the possible causes of such a
crash?
Once again I am not expecting a fix but more suggestions of things to look
at.

Thanks a lot for your help
 
Hello,

Benoit Martin said:
I am not expecting to get THE fix for my problem but I need help to get
started in the right direction
[...]

Does the problem occur on other machines too?

Regards,
Herfried K. Wagner
 
The problem is happening on all the machines I tried the app on. That would
be over 20 computers. Those machines were running Windows 2000 Pro and
Windows XP Pro

Herfried K. Wagner said:
Hello,

Benoit Martin said:
I am not expecting to get THE fix for my problem but I need help to get
started in the right direction
[...]

Does the problem occur on other machines too?

Regards,
Herfried K. Wagner
 
sorry, I think I confused you talking about the COM port and the threading.
The device hooked up to the COM port is a card swiper and I am not swiping
any card when the app crashes. I mentioned this COM port thing as a
potential problem with multithreading. I did it with a thread controller and
delegates etc.. to avoid any problems with the GUI so I don't think this is
the problem but I thought it might be worth mentioning.

Anyways, I've been trying to narrow down the crash and the closest I got to
it is:
I call ShowDialog for the dialog I just instantiated and the next thing to
appear is in the VS output window is

The program '[2324] Startup.exe' has exited with code 0 (0x0)

this is the exact same message that I get when closing the application.
It looks like when I do a ShowDialog, it randomly exists the application

Any ideas?
 
Hi Benoit,

Your program exits normally (code 0) in an abnormal way!! Sorry, but I've
got to echo the first response.

Post some code.

Preferably something that can be tested in VS. Certainly in the form of a
zip. But not too big. Can you prepare a drastically cut down version of your
application but which <definitely> exhibits the problem?

Regards,
Fergus
 
Back
Top