Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » SDLNet_CheckSockets segmentation fault(SDLNet_CheckSockets segmentation fault)
SDLNet_CheckSockets segmentation fault [message #872231] Tue, 15 May 2012 18:02
Ramkumar Sivaraman is currently offline Ramkumar Sivaraman
Messages: 3
Registered: May 2012
Junior Member
Hello

I am using SDLNet_Library 1,2 to make TCP connections on the client side. Everything works fine. Client able to make connections successfully, and send and receive packets.
But as soon as server disconnects, i receive segmentation fault from this function,

SDLNet_CheckSockets(g_SocketSet,0);

I open TCP port using SDLNet_TCP_Open() in a seperate worker thread where as I use SDLNet_CheckSockets() in the main thread. All my sockets and socketsets are global variables, so they are accessible in both threads. Please let me know why the segmentation fault occurs.

However, when I open TCP ports and check sockets in the main thread and when I close server, this fault does not occur. But I have to use a seperate thread for TCP open as SDLNet_TCP_Open() waits for couple of minutes before timeouts if remote host not found.
I can provide more information on this.
Thanks in advance.


Previous Topic:custom toolchain / configuration missing
Next Topic:Using CDT to debug non-eclipse binary
Goto Forum:
  


Current Time: Sun Sep 21 12:06:43 GMT 2014

Powered by FUDForum. Page generated in 0.01566 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software