PC Review


Reply
Thread Tools Rate Thread

app crashes when instanciating a form

 
 
Benoit Martin
Guest
Posts: n/a
 
      28th Aug 2003
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


 
Reply With Quote
 
 
 
 
CJ Taylor
Guest
Posts: n/a
 
      28th Aug 2003
post some code.

"Benoit Martin" <(E-Mail Removed)> wrote in message
news:#(E-Mail Removed)...
> 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
>
>



 
Reply With Quote
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      28th Aug 2003
Hello,

"Benoit Martin" <(E-Mail Removed)> schrieb:
> 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
--
MVP · VB Classic, VB .NET
http://www.mvps.org/dotnet


 
Reply With Quote
 
Benoit Martin
Guest
Posts: n/a
 
      28th Aug 2003
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 [MVP]" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Hello,
>
> "Benoit Martin" <(E-Mail Removed)> schrieb:
> > 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
> --
> MVP · VB Classic, VB .NET
> http://www.mvps.org/dotnet
>
>



 
Reply With Quote
 
Benoit Martin
Guest
Posts: n/a
 
      30th Aug 2003
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?



"Fergus Cooney" <filter-(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi Benoit,
>
> Here's a suggestion:
>
> Write a class to simulate the COM port. This would read its data
> from a disk file and pass it back with approximately the same flow).
> If your program can handle it, this could be random or made up. If
> not, use your existing port reader to make a time-stamped copy of
> incoming data in the data file.*
>
> Replace the existing COM port reader with your simulation.
>
> Run and see whether/when it crashes. If it does, run it again and
> again to see if it crashes on a certain item of data (which suggests
> bad data), or after approximately the same time (which suggests an
> accumulation error of some sort)
>
> This will either eliminate the reader from the enquiry or point
> the finger at it.
>
> Let us know how it goes, eh?
>
> Regards,
> Fergus
>
> * Simulated data flows are useful in any case because you can repeated
> check a program's performance (correctness and/or speed) with the same
> data.
>
>



 
Reply With Quote
 
Fergus Cooney
Guest
Posts: n/a
 
      30th Aug 2003
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


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem instanciating my newest class module Max Moor Microsoft Access 3 10th May 2008 07:27 AM
Creating a method that will be availlable to other classes without instanciating the class Guillaume BRAUX Microsoft C# .NET 7 6th Sep 2006 09:44 PM
Trouble Instanciating Structures =?Utf-8?B?cmVkZWFnbGU=?= Microsoft VB .NET 2 22nd Aug 2006 08:22 PM
Error when Instanciating the Clerk object in a CRM Worker Derived class Chamith Microsoft C# .NET 1 9th Jun 2004 04:37 PM
Re: Using Class, WithEvents and auto-instanciating Tetsuya Oguma Microsoft Excel Programming 0 5th Sep 2003 03:22 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:00 PM.