lime
lime copied to clipboard
CURL is freezing the application
I found a bug that froze the application. https://github.com/openfl/lime/blob/1c8ecd30eab3f2b5840a9f8abf3887d8be35aa2d/project/src/net/curl/CURLBindings.cpp#L2506 in this line, curl_multi_perform some times takes too many times due to curl_getaddrinfo. If you resize the window (or collect gc) while the application is in mutex lock, the application freezes until curl_multi_perform is completed!
Reproduce:
- Change this class like this.
- Make http request from OpenFL (or Lime?) with HxCPP target.
- Resize window (or collect GC).
- See result, in this example the app will freeze forever, normally the app freezes until getaddr happens.
Here is real world callstack grabbed from testflight user: Main Thread:
Curl Thread:
Another example of main thread for garbage collection problem:
I also tried on Windows, iOS and confirmed the problem.