PC Review


Reply
Thread Tools Rate Thread

Debugging Technique Suggestions

 
 
Charles Law
Guest
Posts: n/a
 
      21st May 2004
I have a VB.NET MDI application that terminates for no reason. Sometimes it
will run for ages, and sometimes it terminates after a few seconds. It
always seems to occur following some user action, usually clicking on a
top-level menu item. I am using Infragistics 2004 Vol 1 for menus and
docking regions.

Can anyone suggest ways of tracking the cause down? The main MDI form is
started with Application.Run(New MyForm), which is inside a Try ... Catch
block. When the application terminates unexpectedly no exception is thrown,
and therefore none caught. I have put a break-point immediately after the
Run statement but it is never reached. The MDI form's OnClosing method is
not called, so I can't find a way of trapping the cause of the error. I have
visited Debug | Exceptions and set all exceptions to break into the
debugger, but still nothing. I am just dumped back into the IDE without any
message or warning.

The problem also occurs outside the IDE, when the application is run
stand-alone.

Does anyone have any ideas about how I can trap the cause of this problem?

TIA

Charles


 
Reply With Quote
 
 
 
 
CJ Taylor
Guest
Posts: n/a
 
      21st May 2004
Before you do your application run, addhandler to the
Application.ThreadException event. Sometimes I get errors that sneak in
there...

HTH,
CJ
"Charles Law" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I have a VB.NET MDI application that terminates for no reason. Sometimes

it
> will run for ages, and sometimes it terminates after a few seconds. It
> always seems to occur following some user action, usually clicking on a
> top-level menu item. I am using Infragistics 2004 Vol 1 for menus and
> docking regions.
>
> Can anyone suggest ways of tracking the cause down? The main MDI form is
> started with Application.Run(New MyForm), which is inside a Try ... Catch
> block. When the application terminates unexpectedly no exception is

thrown,
> and therefore none caught. I have put a break-point immediately after the
> Run statement but it is never reached. The MDI form's OnClosing method is
> not called, so I can't find a way of trapping the cause of the error. I

have
> visited Debug | Exceptions and set all exceptions to break into the
> debugger, but still nothing. I am just dumped back into the IDE without

any
> message or warning.
>
> The problem also occurs outside the IDE, when the application is run
> stand-alone.
>
> Does anyone have any ideas about how I can trap the cause of this problem?
>
> TIA
>
> Charles
>
>



 
Reply With Quote
 
Charles Law
Guest
Posts: n/a
 
      21st May 2004
Thanks for the suggestion CJ. I will try it and see what happens.

Charles


"CJ Taylor" <[cege] at [tavayn] dit commmmm> wrote in message
news:(E-Mail Removed)...
> Before you do your application run, addhandler to the
> Application.ThreadException event. Sometimes I get errors that sneak in
> there...
>
> HTH,
> CJ
> "Charles Law" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > I have a VB.NET MDI application that terminates for no reason. Sometimes

> it
> > will run for ages, and sometimes it terminates after a few seconds. It
> > always seems to occur following some user action, usually clicking on a
> > top-level menu item. I am using Infragistics 2004 Vol 1 for menus and
> > docking regions.
> >
> > Can anyone suggest ways of tracking the cause down? The main MDI form is
> > started with Application.Run(New MyForm), which is inside a Try ...

Catch
> > block. When the application terminates unexpectedly no exception is

> thrown,
> > and therefore none caught. I have put a break-point immediately after

the
> > Run statement but it is never reached. The MDI form's OnClosing method

is
> > not called, so I can't find a way of trapping the cause of the error. I

> have
> > visited Debug | Exceptions and set all exceptions to break into the
> > debugger, but still nothing. I am just dumped back into the IDE without

> any
> > message or warning.
> >
> > The problem also occurs outside the IDE, when the application is run
> > stand-alone.
> >
> > Does anyone have any ideas about how I can trap the cause of this

problem?
> >
> > TIA
> >
> > Charles
> >
> >

>
>



 
Reply With Quote
 
Charles Law
Guest
Posts: n/a
 
      21st May 2004
Hi CJ

I added a handler but have managed to get it to abort in the usual way,
without entering the handler. Any other thoughts? Anyone?

Charles


"CJ Taylor" <[cege] at [tavayn] dit commmmm> wrote in message
news:(E-Mail Removed)...
> Before you do your application run, addhandler to the
> Application.ThreadException event. Sometimes I get errors that sneak in
> there...
>
> HTH,
> CJ
> "Charles Law" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > I have a VB.NET MDI application that terminates for no reason. Sometimes

> it
> > will run for ages, and sometimes it terminates after a few seconds. It
> > always seems to occur following some user action, usually clicking on a
> > top-level menu item. I am using Infragistics 2004 Vol 1 for menus and
> > docking regions.
> >
> > Can anyone suggest ways of tracking the cause down? The main MDI form is
> > started with Application.Run(New MyForm), which is inside a Try ...

Catch
> > block. When the application terminates unexpectedly no exception is

> thrown,
> > and therefore none caught. I have put a break-point immediately after

the
> > Run statement but it is never reached. The MDI form's OnClosing method

is
> > not called, so I can't find a way of trapping the cause of the error. I

> have
> > visited Debug | Exceptions and set all exceptions to break into the
> > debugger, but still nothing. I am just dumped back into the IDE without

> any
> > message or warning.
> >
> > The problem also occurs outside the IDE, when the application is run
> > stand-alone.
> >
> > Does anyone have any ideas about how I can trap the cause of this

problem?
> >
> > TIA
> >
> > Charles
> >
> >

>
>



 
Reply With Quote
 
AlexS
Guest
Posts: n/a
 
      21st May 2004
Hi, Charles

use standard debugging techniques. You can suspect everything - for example
there could by try-catch block, which ends application in case of exception.
So, you have to find sequence of events, which leads to problem, take app
into debugger or insert tracing statements and trace execution until you
find the exact cause.
Because you use 3rd party controls you have to keep in mind that problem
might exist there and not in your code.

Happy bug hunting!
Not much help, huh?
Alex


"Charles Law" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Hi CJ
>
> I added a handler but have managed to get it to abort in the usual way,
> without entering the handler. Any other thoughts? Anyone?
>
> Charles
>
>
> "CJ Taylor" <[cege] at [tavayn] dit commmmm> wrote in message
> news:(E-Mail Removed)...
> > Before you do your application run, addhandler to the
> > Application.ThreadException event. Sometimes I get errors that sneak in
> > there...
> >
> > HTH,
> > CJ
> > "Charles Law" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > I have a VB.NET MDI application that terminates for no reason.

Sometimes
> > it
> > > will run for ages, and sometimes it terminates after a few seconds. It
> > > always seems to occur following some user action, usually clicking on

a
> > > top-level menu item. I am using Infragistics 2004 Vol 1 for menus and
> > > docking regions.
> > >
> > > Can anyone suggest ways of tracking the cause down? The main MDI form

is
> > > started with Application.Run(New MyForm), which is inside a Try ...

> Catch
> > > block. When the application terminates unexpectedly no exception is

> > thrown,
> > > and therefore none caught. I have put a break-point immediately after

> the
> > > Run statement but it is never reached. The MDI form's OnClosing method

> is
> > > not called, so I can't find a way of trapping the cause of the error.

I
> > have
> > > visited Debug | Exceptions and set all exceptions to break into the
> > > debugger, but still nothing. I am just dumped back into the IDE

without
> > any
> > > message or warning.
> > >
> > > The problem also occurs outside the IDE, when the application is run
> > > stand-alone.
> > >
> > > Does anyone have any ideas about how I can trap the cause of this

> problem?
> > >
> > > TIA
> > >
> > > Charles
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
Charles Law
Guest
Posts: n/a
 
      21st May 2004
Thanks Alex, but I have pretty much tried the usual suspects.

I think I have to suspect the Infragistics stuff, because it always seems to
happen when I click on a top-level menu item, and at that point no
application code executes.

Having said that, I have another app using the same Infragistics stuff, and
this never happens. Therefore, I must be doing something that makes the
Infragistics code unstable in some way, or otherwise upsets it. Finding out
what is the hard part!

Charles


"AlexS" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi, Charles
>
> use standard debugging techniques. You can suspect everything - for

example
> there could by try-catch block, which ends application in case of

exception.
> So, you have to find sequence of events, which leads to problem, take app
> into debugger or insert tracing statements and trace execution until you
> find the exact cause.
> Because you use 3rd party controls you have to keep in mind that problem
> might exist there and not in your code.
>
> Happy bug hunting!
> Not much help, huh?
> Alex
>
>
> "Charles Law" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
> > Hi CJ
> >
> > I added a handler but have managed to get it to abort in the usual way,
> > without entering the handler. Any other thoughts? Anyone?
> >
> > Charles
> >
> >
> > "CJ Taylor" <[cege] at [tavayn] dit commmmm> wrote in message
> > news:(E-Mail Removed)...
> > > Before you do your application run, addhandler to the
> > > Application.ThreadException event. Sometimes I get errors that sneak

in
> > > there...
> > >
> > > HTH,
> > > CJ
> > > "Charles Law" <(E-Mail Removed)> wrote in message
> > > news:(E-Mail Removed)...
> > > > I have a VB.NET MDI application that terminates for no reason.

> Sometimes
> > > it
> > > > will run for ages, and sometimes it terminates after a few seconds.

It
> > > > always seems to occur following some user action, usually clicking

on
> a
> > > > top-level menu item. I am using Infragistics 2004 Vol 1 for menus

and
> > > > docking regions.
> > > >
> > > > Can anyone suggest ways of tracking the cause down? The main MDI

form
> is
> > > > started with Application.Run(New MyForm), which is inside a Try ...

> > Catch
> > > > block. When the application terminates unexpectedly no exception is
> > > thrown,
> > > > and therefore none caught. I have put a break-point immediately

after
> > the
> > > > Run statement but it is never reached. The MDI form's OnClosing

method
> > is
> > > > not called, so I can't find a way of trapping the cause of the

error.
> I
> > > have
> > > > visited Debug | Exceptions and set all exceptions to break into the
> > > > debugger, but still nothing. I am just dumped back into the IDE

> without
> > > any
> > > > message or warning.
> > > >
> > > > The problem also occurs outside the IDE, when the application is run
> > > > stand-alone.
> > > >
> > > > Does anyone have any ideas about how I can trap the cause of this

> > problem?
> > > >
> > > > TIA
> > > >
> > > > Charles
> > > >
> > > >
> > >
> > >

> >
> >

>
>



 
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
Re: Suggestions for debugging Winamp Problem VanguardLH Windows XP Help 2 22nd Jul 2009 05:00 AM
comparison reporting -- technique suggestions? matt@mailinator.com Microsoft Dot NET Framework 7 24th Oct 2006 02:31 PM
comparison reporting -- technique suggestions? matt@mailinator.com Microsoft ASP .NET 7 24th Oct 2006 02:31 PM
comparison reporting -- technique suggestions? matt@mailinator.com Microsoft ADO .NET 8 24th Oct 2006 02:31 PM
Suggestions on Proper Technique, Please =?Utf-8?B?S2xhdHV1?= Microsoft Access VBA Modules 6 29th Nov 2005 10:27 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:49 PM.