By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,937 Members | 1,532 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,937 IT Pros & Developers. It's quick & easy.

Debugging Technique Suggestions

P: n/a
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
Nov 20 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Before you do your application run, addhandler to the
Application.ThreadException event. Sometimes I get errors that sneak in
there...

HTH,
CJ
"Charles Law" <bl***@nowhere.com> wrote in message
news:uZ**************@TK2MSFTNGP10.phx.gbl...
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

Nov 20 '05 #2

P: n/a
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:uB*************@TK2MSFTNGP11.phx.gbl...
Before you do your application run, addhandler to the
Application.ThreadException event. Sometimes I get errors that sneak in
there...

HTH,
CJ
"Charles Law" <bl***@nowhere.com> wrote in message
news:uZ**************@TK2MSFTNGP10.phx.gbl...
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


Nov 20 '05 #3

P: n/a
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:uB*************@TK2MSFTNGP11.phx.gbl...
Before you do your application run, addhandler to the
Application.ThreadException event. Sometimes I get errors that sneak in
there...

HTH,
CJ
"Charles Law" <bl***@nowhere.com> wrote in message
news:uZ**************@TK2MSFTNGP10.phx.gbl...
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


Nov 20 '05 #4

P: n/a
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" <bl***@nowhere.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
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:uB*************@TK2MSFTNGP11.phx.gbl...
Before you do your application run, addhandler to the
Application.ThreadException event. Sometimes I get errors that sneak in
there...

HTH,
CJ
"Charles Law" <bl***@nowhere.com> wrote in message
news:uZ**************@TK2MSFTNGP10.phx.gbl...
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



Nov 20 '05 #5

P: n/a
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" <sa***********@SPAMsympaticoPLEASE.ca> wrote in message
news:uR*************@TK2MSFTNGP12.phx.gbl...
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" <bl***@nowhere.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
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:uB*************@TK2MSFTNGP11.phx.gbl...
Before you do your application run, addhandler to the
Application.ThreadException event. Sometimes I get errors that sneak in there...

HTH,
CJ
"Charles Law" <bl***@nowhere.com> wrote in message
news:uZ**************@TK2MSFTNGP10.phx.gbl...
> 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
>
>



Nov 20 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.