> First off, I'm a hardware/OS guy. I just write code on the side and I'm
> completely self taught - so bear in mind my total lack of expertise.
[quoted text clipped - 23 lines]
> Can somebody recommend an article or website (or even a book) that gives a
> general debugging process for something like this?
Ken,
As I mentioned, I'm a hardware guy. I don't even know what "update the user
interface from a background thread" means.
I'm not deliberately creating seperate threads. Basically there is a startup
module that sets some global parameters and structures then displays frmMain.
Any threads that are created are dotnet's doing.
What part of the code would you find useful? I'm clueless here :)
As far as I know, my code should be doing absolutely nothing when the
program is minimized. There IS a timer that does an API call every few
seconds to check for dropped RAS connections, but it always worked under
vb2003 and I've gone so far as to remove the timer control and associated
timer1_tick procedure from the vb2005 version with no effect.
Here's an overview. The main form has two main sections. A tree view on the
left side and a panel area on the right side. Different panels are displayed
depending on where you are in the tree.
The tree contains a list of our clients and under each client a list of
their systems. Each client has a RAS (VPN) phonebook entry associated with
them.
Basically you select a system from the tree view and click a "connect"
button. The program makes the VPN connection then starts an RDP session to
the selected system. When the RDP session terminates, it disconnects the VPN
and adds and entry to a logbook file.
Most of the code involves adding and deleting clients and systems to/from
the tree and setting various connection options. The core of the program is
just a wrapper around API calls that do the real work.
> Doug,
>
[quoted text clipped - 33 lines]
> > Can somebody recommend an article or website (or even a book) that gives a
> > general debugging process for something like this?
rowe_newsgroups - 20 Nov 2006 19:14 GMT
> Obviously no one can tell me exactly what's happening, my problem is that I
> don't have even the vaguest idea how to start debugging something like this.
> How do you troubleshoot a program that just hangs without causing an error?
You might create a simple log system. Whenever you're about to perform
an action you could write to a file (or database or something else)
that says what the action is and what the current time is. You could
even start out vague, like writing a line whenever you enter a method
or property, and then after finding which sub has the problem, use this
same method for each line in the sub. The bad part is that this will
tell you where you had a problem (or at least what the last command to
execute was) but it won't tell you what the problem was.
> As I mentioned, I'm a hardware guy. I don't even know what "update the user
> interface from a background thread" means.
Basically, the User Interface (UI) thread creates all the controls on
your form. It is the only thread that is allowed to change any of the
properties of the controls it created. If any other thread tries to
change those properties the program will throw a cross-thread
exception. The article Ken mentioned describes the "proper" way to get
around this. If you need to know more please let us know and we'll try
to explain.
Thanks,
Seth Rowe
> Ken,
>
[quoted text clipped - 67 lines]
> > > Can somebody recommend an article or website (or even a book) that gives a
> > > general debugging process for something like this?
Doug Robertson - 20 Nov 2006 19:50 GMT
I like the log file idea. At least it might point me to the right procedure.
Thanks.
> > Obviously no one can tell me exactly what's happening, my problem is that I
> > don't have even the vaguest idea how to start debugging something like this.
[quoted text clipped - 95 lines]
> > > > Can somebody recommend an article or website (or even a book) that gives a
> > > > general debugging process for something like this?
Robert - 21 Nov 2006 04:48 GMT
> The tree contains a list of our clients and under each client a list of
> their systems. Each client has a RAS (VPN) phonebook entry associated with
[quoted text clipped - 10 lines]
> is
> just a wrapper around API calls that do the real work.
Could it be a network timeout issue? I have seen big delays when domain
servers get bogged down.
Are you checking the API hResults properly? There are many differences
between them. Some <> 0, sometimes negative numbers are bad, sometimes <32
is bad, etc.
Is the problem intermittant? or does it lock up every time?
Get ProcessExplorer from SysInternals.Com. Be sure you are not leaking
connections,
threads, handles, or anything else. Also, get TCP view from there, and
check your
process.
Maybe it is a client problem on one of the workstations.
Can you test this locally? IE two machines in arms reach, where this can be
replicated?
With no other connections.
And you are sure the ONLY difference is VS2005?