Skip to main content


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 SivaramanFriend
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: Thu Apr 25 20:13:16 GMT 2024

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

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

Back to the top