temporary freezing in my application.

  • Thread starter Thread starter Tony Ho
  • Start date Start date
T

Tony Ho

I had a very strange problem with my application (using dotNet
remoting). It is a client-server application. The server started first
and is avaiable for access from an icon in the Windows task tray. The
client is a GUI application which accesses the objects in the server
via remoting. Most of time the access to the server is done in a
separate thread other than the GUI main thread. At some point both
client and server freeze; after checking the client call stack, it
stops at the follwoing line, which is from system.runtime.remoting. It
seems the client is waiting for something from server.

system.dll!System.Net.Sockets.Socket::Receive(unsigned char[] buffer =
{Length=0x1000}, __int32 offset = 0x0, __int32 size = 0x1000,
System.Net.Sockets.SocketFlags socketFlags = None) + 0x143 bytes

But if I right click on the server icon and then the client and the
server will be back running again. This happens very randomly.

Anyone has an idea? Thanks in advance.
Tony.
 
Thank you Wiktor for your feedback.

Yes, the access to the GUI from any worker thread is done in a
threadsafe manner by using Invoke. The only thing I don't understand is
that how come the client worker thread all the sudden gets the data from
System.Net.Sockets.Socket::Receive when a menuitem selected event is
triggered from the popup menu associated with the server icon on the
task tray.

Tony.
 
Back
Top