Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

accidental crash #88

Closed
JacobMao opened this issue Jul 21, 2016 · 8 comments
Closed

accidental crash #88

JacobMao opened this issue Jul 21, 2016 · 8 comments

Comments

@JacobMao
Copy link

I am using curlcpp in my iOS app, and sometimes it happens crash.
screen shot 2016-07-21 at 10 43 49 am

@JacobMao
Copy link
Author

another attachment
screen shot 2016-07-21 at 10 44 31 am

@JosephP91
Copy link
Owner

hi @JacobMao !
can you report your piece of code? Without knowing how you are using curlcpp's perform() function, I really don't know how to help-

@JacobMao
Copy link
Author

ok.

my piece of code:
try {
easy.perform();
} catch (curl_easy_exception error) {
}

these codes are inside a member function of class, and I create instance of the class in various multithreading.

@JosephP91
Copy link
Owner

@JacobMao without the entire piece of code I can't help you. I can not reproduce the problem. Does xCode reports you a null pointer? What is happening?

@JacobMao
Copy link
Author

I found this function in curl_exception.cpp file:
curl_exception::curl_exception(const std::string &error, const std::string &fun_name) { curl_exception::traceback.insert(curl_exception::traceback.begin(),curlcpp_traceback_object(error,fun_name)); }

because traceback is a static member variable of curl_exception, Is it threadsafe that use function of insert in multithreading environment?

@JacobMao
Copy link
Author

@JosephP91 hello?

@JosephP91
Copy link
Owner

Hi @JacobMao, sorry for the delay in the response. Yes, it couls be, since curlcpp is not thread safe yet. I have accepted your pull request. Is the problem solved? Let me know!

@JacobMao
Copy link
Author

Yes, it's solved. Thanks for your response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants