|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
debugger deadlocks when tcplistener startsVS.NET 2005, the debugger deadlocks (uses 100% of one of my CPUs) when the code runs the tcplistener.Start(). method. I am having the same problem in a sample socket server app that uses socket.Bind(). Both deadlock at this point. Both of them worked normally a week ago on a fresh system (windows xp pro sp2. I have already completely reinstalled my OS to get rid of this problem before, and now it's occurring again. Any ideas why? When I stop debugging, it takes it several minutes to get out of the debugging session and close the app. Here's the area of code where the problem occurs: listener = new TcpListener(IPAddress.Any, details.Port); ***> listener.Start(backLog); <*** listener.BeginAcceptTcpClient(BeginConnection, listener); OR FSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); ***> FSocket.Bind(LocalEndPoint); <*** FSocket.Listen(FBackLog); T How is this a deadlock? What errors are you seeing? That is a rather strong
term to be throwing around. -- Show quoteRegards, Alvin Bruney ------------------------------------------------------ Shameless author plug Excel Services for .NET is coming... OWC Black book on Amazon and www.lulu.com/owc Professional VSTO 2005 - Wrox/Wiley "Thos" <thos37n***@gmail.com> wrote in message news:1174114481.467472.211140@e1g2000hsg.googlegroups.com... > When I debug a standard socket server app that has a tcplistener using > VS.NET 2005, the debugger deadlocks (uses 100% of one of my CPUs) when > the code runs the tcplistener.Start(). method. I am having the same > problem in a sample socket server app that uses socket.Bind(). Both > deadlock at this point. Both of them worked normally a week ago on a > fresh system (windows xp pro sp2. I have already completely > reinstalled my OS to get rid of this problem before, and now it's > occurring again. Any ideas why? When I stop debugging, it takes it > several minutes to get out of the debugging session and close the app. > > Here's the area of code where the problem occurs: > > listener = new TcpListener(IPAddress.Any, > details.Port); > ***> listener.Start(backLog); <*** > listener.BeginAcceptTcpClient(BeginConnection, > listener); > > OR > > FSocket = new Socket(AddressFamily.InterNetwork, > SocketType.Stream, ProtocolType.Tcp); > ***> FSocket.Bind(LocalEndPoint); <*** > FSocket.Listen(FBackLog); > > T > > ***> listener.Start(backLog); <*** Do you know what is the value of backLog?You may want to run process explorer (www.sysinternals.com) to lower the priority of your problem app and then find out the number of TCP connections created by the app and their states as well. HTH, Alex |
|||||||||||||||||||||||