Home All Groups Group Topic Archive Search About

TcpListener.Start() segfaults

Author
13 Feb 2007 7:39 AM
Thos
I have a TcpListener that gets started from a GUI button event
handler:

TcpListener listener;
listener = new TcpListener(IPAddress.Any, 1234);
listener.Start(backLog);

As soon as the third line runs, the app freezes, the CPU goes to 100%
on that CPU (Core Duo) and debugging can't break out of it.  I can't
even stop the process with the Task Manager but have to reboot to get
it to stop.

Any ideas what's wrong?  This is with Visual Studio 2005.  I had .Net
3.0 and the newest Windows SDK installed, but just uninstalled them
and it's still a problem.

T

Author
13 Feb 2007 10:13 AM
Mubashir Khan
Show quote
"Thos" <thos37n***@gmail.com> wrote in message
news:1171352343.927734.196610@h3g2000cwc.googlegroups.com...
>I have a TcpListener that gets started from a GUI button event
> handler:
>
> TcpListener listener;
> listener = new TcpListener(IPAddress.Any, 1234);
> listener.Start(backLog);
>
> As soon as the third line runs, the app freezes, the CPU goes to 100%
> on that CPU (Core Duo) and debugging can't break out of it.  I can't
> even stop the process with the Task Manager but have to reboot to get
> it to stop.
>
> Any ideas what's wrong?  This is with Visual Studio 2005.  I had .Net
> 3.0 and the newest Windows SDK installed, but just uninstalled them
> and it's still a problem.
>
> T
>
Author
13 Feb 2007 10:13 AM
Mubashir Khan
Show quote
"Thos" <thos37n***@gmail.com> wrote in message
news:1171352343.927734.196610@h3g2000cwc.googlegroups.com...
>I have a TcpListener that gets started from a GUI button event
> handler:
>
> TcpListener listener;
> listener = new TcpListener(IPAddress.Any, 1234);
> listener.Start(backLog);
>
> As soon as the third line runs, the app freezes, the CPU goes to 100%
> on that CPU (Core Duo) and debugging can't break out of it.  I can't
> even stop the process with the Task Manager but have to reboot to get
> it to stop.
>
> Any ideas what's wrong?  This is with Visual Studio 2005.  I had .Net
> 3.0 and the newest Windows SDK installed, but just uninstalled them
> and it's still a problem.
>
> T
>
Author
13 Feb 2007 10:15 AM
Mubashir Khan
it seems like a synchronous call ....... your thread is waiting ... thus not
dispatching the UI messages .... either use secondry thread for listening
....... or use asynchronous methods of socket ....
Show quote
"Thos" <thos37n***@gmail.com> wrote in message
news:1171352343.927734.196610@h3g2000cwc.googlegroups.com...
>I have a TcpListener that gets started from a GUI button event
> handler:
>
> TcpListener listener;
> listener = new TcpListener(IPAddress.Any, 1234);
> listener.Start(backLog);
>
> As soon as the third line runs, the app freezes, the CPU goes to 100%
> on that CPU (Core Duo) and debugging can't break out of it.  I can't
> even stop the process with the Task Manager but have to reboot to get
> it to stop.
>
> Any ideas what's wrong?  This is with Visual Studio 2005.  I had .Net
> 3.0 and the newest Windows SDK installed, but just uninstalled them
> and it's still a problem.
>
> T
>
Author
17 Mar 2007 6:52 AM
Thos
It runs fine when it is not run in debugging mode, and it also ran
fine in debugging in the past (I think before I installed .Net 3.0).
Any workarounds?  I should have to do a tcplistener.start on a
background thread just to make the VS debugger happy.

T

Show quote
On Feb 13, 3:15 am, "Mubashir Khan" <m***@yahoo.com> wrote:
> it seems like a synchronous call ....... your thread is waiting ... thus not
> dispatching the UI messages .... either use secondry thread for listening
> ...... or use asynchronous methods of socket ...."Thos" <thos37n***@gmail.com> wrote in message
>
> news:1171352343.927734.196610@h3g2000cwc.googlegroups.com...
>
> >I have a TcpListener that gets started from a GUI button event
> > handler:
>
> > TcpListener listener;
> > listener = new TcpListener(IPAddress.Any, 1234);
> > listener.Start(backLog);
>
> > As soon as the third line runs, the app freezes, the CPU goes to 100%
> > on that CPU (Core Duo) and debugging can't break out of it.  I can't
> > even stop the process with the Task Manager but have to reboot to get
> > it to stop.
>
> > Any ideas what's wrong?  This is with Visual Studio 2005.  I had .Net
> > 3.0 and the newest Windows SDK installed, but just uninstalled them
> > and it's still a problem.
>
> > T

AddThis Social Bookmark Button