Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / January 2006

Tip: Looking for answers? Try searching our database.

application crash

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
barbutz - 08 Jan 2006 09:24 GMT
Hi,

I wrote an application that is basically http loader. It loads 1030
concurrent threads and start to send http requests to a web server.
The problem is that sometimes when i get in the morning to check the
results, the application is not running!! There is no alert and no crash
notification whatsoever!
Maybe i have a bug in my code but if my application crash there should be
some error message by .net framework or unhandled execption. I'm very
frustrated and i tried everything to catch every exception but no luck.
It doesn't happens all the time and it happens when the application is
running for few hours.
I also run a performance monitor on the process and there was no memory leak
or unusuall behaviour before the process was terminated. It's like someone is
killing the process like from task manager.
My application is compiled in framework 2.0 and i have to say that in former
versions when the application was compiled in framework 1.1 i had no such
problem!
Is there a known problem in framework 2.0? If not, please tell me what i can
do in order to find the problem.

Thanks!
barbutz - 08 Jan 2006 09:42 GMT
I've also checked the event log but there is nothing there.

> Hi,
>
[quoted text clipped - 18 lines]
>
> Thanks!
Lloyd Dupont - 08 Jan 2006 13:52 GMT
The .NET Framework 2.0 don't handle the exception the same way as 1.1.
Basically the process is more likely to terminate after an exception than in
1.1.

All the quirk of exception handling is smoething somewhat obscure.
Exception event method don't always work as expected, if at all.
It's hard to find clear and complete documentation on the topic.

Anyway you could always try to register an event handler on
AppDomain.CurrentDomain.UnhandledException

I think it would be too late to save the application, but at least you
should get the information you need, I believe.

> Hi,
>
[quoted text clipped - 22 lines]
>
> Thanks!
barbutz - 09 Jan 2006 10:00 GMT
Thanks for the reply.
I will try the AppDomain.CurrentDomain.UnhandledException. But is it work
also for WindowsForms application? my application is console+windows Forms.
Also, can you please tell me if this is enough?

AppDomain.CurrentDomain.UnhandledException += new
UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);

private static void CurrentDomain_UnhandledException(object sender,
UnhandledExceptionEventArgs e)
       {
           Exception ex = (Exception)e.ExceptionObject;
           MessageBox.Show("Unhandled Exception");
           MessageBox.Show(ex.GetType().ToString()+"\r\n"+ex.StackTrace);
       }

Thanks

> The .NET Framework 2.0 don't handle the exception the same way as 1.1.
> Basically the process is more likely to terminate after an exception than in
[quoted text clipped - 36 lines]
> >
> > Thanks!
Lloyd Dupont - 09 Jan 2006 11:48 GMT
looks alright to me!

> Thanks for the reply.
> I will try the AppDomain.CurrentDomain.UnhandledException. But is it work
[quoted text clipped - 61 lines]
>> >
>> > Thanks!

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.