libcurl problem~!


#1

Hi, there.
I’m making a game that using networks. So I’m using pthread and libcurl.
But libcurl sometimes crashes…

There’s no problem to get datas from web server using libcurl, but about 5 or 10 minutes later it crashes

I captured a screenshot of crashing message.
Thank you in advance for your help.


screenshot 2012-05-07 pm 3.19.13.png (3.4 KB)


#2

hi there,
i believe i encounter the exact same problem

after some miniutes of using curl to make concurrent multiple connections, curl crashed

Thread 1:
0x167f53: je 0x00167f70 ; Curl_resolv_timeout + 316 at hostip.c:628

any help would be very appreciate!


#3

try http://cocos2d-x.org/boards/18/topics/11703


#4

@小 苏 thank you for your reply.
But I cannot understand why you’re using a mutex in your code.
Each NetworkOperation object has its own mutex instead of shared mutex, so I think it may not synchronize the critical section.


#5

Hi

I am facing the same problem, when I have used libcurl the data from the server is retrieved good, but after some minutes it crash with the same message…

Did you find a solution for this problem?

Thank you!


#6

I solved this problem add a follow line

curl_easy_setopt(curl_handle, CURLOPT_NOSIGNAL, 1);