I have a WindowsForm application that I developed on my XP workstation.
It is a nulti-threaded socket application that sends and receives
messages. On my workstation I can close and restart the application
normally with no ill effects.

Now when I put the application on a Windows 2000 Server it runs
perfectly fine the first time around. However, when I close the
application and try to restart it the second time it won't show the UI,
minimizes itself to the taskbar and Task Manager shows it as Not
Responding.

Is this a Framework issue? XP vs 2000? Any ideas where to start?
Thanks
Bigreddog

Re: WindowsForm freezes on second launch by cody

cody
Fri Feb 18 08:08:19 CST 2005

Maybe the socket is not closed properly when closing the application so the
next time it starts the socket is still in the background and blocks itself.

"bigreddog" <bigreddog@hotmail.com> schrieb im Newsbeitrag
news:1108732749.755315.191370@o13g2000cwo.googlegroups.com...
> I have a WindowsForm application that I developed on my XP workstation.
> It is a nulti-threaded socket application that sends and receives
> messages. On my workstation I can close and restart the application
> normally with no ill effects.
>
> Now when I put the application on a Windows 2000 Server it runs
> perfectly fine the first time around. However, when I close the
> application and try to restart it the second time it won't show the UI,
> minimizes itself to the taskbar and Task Manager shows it as Not
> Responding.
>
> Is this a Framework issue? XP vs 2000? Any ideas where to start?
> Thanks
> Bigreddog
>



Re: WindowsForm freezes on second launch by bigreddog

bigreddog
Fri Feb 18 08:49:40 CST 2005

Update - I tried the same application on my co-worker's XP workstation
and it behaved exactly like it did on Win2K Server; It started up but
the UI never appeared and the Task Manager stated "Not Responding." So
there has to be a configuration on my workstation that is missing on
others. Could this be Framework SP 1?

Any ideas?

cody wrote:
> Maybe the socket is not closed properly when closing the application
so the
> next time it starts the socket is still in the background and blocks
itself.
>
> "bigreddog" <bigreddog@hotmail.com> schrieb im Newsbeitrag
> news:1108732749.755315.191370@o13g2000cwo.googlegroups.com...
> > I have a WindowsForm application that I developed on my XP
workstation.
> > It is a nulti-threaded socket application that sends and receives
> > messages. On my workstation I can close and restart the application
> > normally with no ill effects.
> >
> > Now when I put the application on a Windows 2000 Server it runs
> > perfectly fine the first time around. However, when I close the
> > application and try to restart it the second time it won't show the
UI,
> > minimizes itself to the taskbar and Task Manager shows it as Not
> > Responding.
> >
> > Is this a Framework issue? XP vs 2000? Any ideas where to start?
> > Thanks
> > Bigreddog
> >


Re: WindowsForm freezes on second launch by Elp

Elp
Fri Feb 18 13:56:08 CST 2005

On 18 Feb 2005 05:19:09 -0800, bigreddog wrote:

> I have a WindowsForm application that I developed on my XP workstation.
> It is a nulti-threaded socket application that sends and receives
> messages. On my workstation I can close and restart the application
> normally with no ill effects.
>
> Now when I put the application on a Windows 2000 Server it runs
> perfectly fine the first time around. However, when I close the
> application and try to restart it the second time it won't show the UI,
> minimizes itself to the taskbar and Task Manager shows it as Not
> Responding.

The first thing i would do, as it is a multi-threaded application, is to
make sure that, each time you are accessing a UI element, you are doing it
from the UI thread. You may simply have forgot an Invoke somewhere where
you were accessing a UI control from a worker thread.

Also, check your code to make sure that you never swallow exceptions (ie
catch an exception and hide it by doing nothing) and that you never catch
all exceptions with a catch(Exception ex) statement instead of catching a
particular exception type. Doing this kind of things may hide the reason of
the problem.

Re: WindowsForm freezes on second launch by bigreddog

bigreddog
Mon Feb 21 07:52:51 CST 2005

Elp,

Thanks for your feedback. I have a couple places in my code where I
catch an Exception and do nothing. I also do a couple of Try Catch
statements where there is no specific Exception caught.

What should I be doing differently with the Exceptions? Send them to
the Event Viewer?

Elp wrote:
> On 18 Feb 2005 05:19:09 -0800, bigreddog wrote:
>
> > I have a WindowsForm application that I developed on my XP
workstation.
> > It is a nulti-threaded socket application that sends and receives
> > messages. On my workstation I can close and restart the application
> > normally with no ill effects.
> >
> > Now when I put the application on a Windows 2000 Server it runs
> > perfectly fine the first time around. However, when I close the
> > application and try to restart it the second time it won't show the
UI,
> > minimizes itself to the taskbar and Task Manager shows it as Not
> > Responding.
>
> The first thing i would do, as it is a multi-threaded application, is
to
> make sure that, each time you are accessing a UI element, you are
doing it
> from the UI thread. You may simply have forgot an Invoke somewhere
where
> you were accessing a UI control from a worker thread.
>
> Also, check your code to make sure that you never swallow exceptions
(ie
> catch an exception and hide it by doing nothing) and that you never
catch
> all exceptions with a catch(Exception ex) statement instead of
catching a
> particular exception type. Doing this kind of things may hide the
reason of
> the problem.