TcpListener.Start() segfaults

  • Thread starter Thread starter Thos
  • Start date Start date
T

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
 
Thos said:
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
 
Thos said:
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
 
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 ....
 
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
 
Back
Top