Re: wx.Yield() during socket timeout




Kiran wrote:
Hello All,
I am creating a socket connection in order to read and write to a
location. My problem is,the gui becomes unresponsive if the socket
times out.
I know that a good solution is to have the socket read and write with
a thread. However, I have tried this and have a problem where ONLY on
linux does the program crash, it DOES NOT crash on windows xp. I have
been trying to figure out why for about a week and have just given up.

You must have a bug in your threading code. I am doing something
similar to what you describe, and it works perfectly, on Windows and on
Linux.

Threading *is* the correct approach for what you are attempting. Don't
give up. Try to isolate where the crash happens, and post the relevant
section of code here. If I can't spot the error, there is a good chance
someone else will.

Frank Millman

.



Relevant Pages

  • Re: How do I define the Source port value when creating a socket
    ... I have the crash log from the event viewer listed below. ... I am using the WSAcalls, are they the MFC ... Or are there other socket calls in MFC. ...
    (microsoft.public.win32.programmer.networks)
  • Re: Threaded app using sockets closes
    ... You can use DEBUGMSGor OutputDebugStringto send messages indicating the thread's progress to the Output window in eVC. ... When you closesocket(), unless you've configured the socket for immediate close, it goes through a process to try to close the socket in a clean way, so that might take some time and I'm unsure whether closesocketwaits for that before returning or not. ... Now I'm trying to reproduce my error, but a new one occured. ... It's in totally new place where normally the app doesn't crash but I didn't notice it's not doing what it's expected to do. ...
    (microsoft.public.windowsce.embedded.vc)
  • TCP sockets -- accept() returns -1
    ... While debugging a mysterious crash in our application, the strace output ... The segmentation fault is because the program assumes a socket being ... then there is a connection pending to be ...
    (comp.os.linux.development.apps)
  • Re: How do I define the Source port value when creating a socket
    ... > Thanks so much for your advice. ... > But if I may ask, I tried to just do the Bindon the same socket I ... When you have a crash you need to record the location of it, ... another advice would be to stay away from MFC sockets wrappers and use plain ...
    (microsoft.public.win32.programmer.networks)
  • Datagram Socket Crashes when too much data to send!
    ... I have already started a topic on a problem related to Datagram Socket Speed ... If the Thread.Sleepline is commented, the application will crash almost ... an internal buffer, and stupidly crashes when this buffer is full. ...
    (microsoft.public.dotnet.framework.compactframework)