| Issue 113: | Socket fails to connect when there is another thread running | |
| 1 person starred this issue and may be notified of changes. | Back to list |
What steps will reproduce the problem?
1.
public static function main() {
var req1:haxe.Http = new haxe.Http("http://localhost/offline/");
req1.onError = function (error) { trace(error); };
req1.onData = function (data) { trace(data); };
req1.request(false);
cpp.vm.Thread.create(function () { while (true) { cpp.Sys.sleep(0.500); }} );
var req2:haxe.Http = new haxe.Http("http://localhost/offline/");
req2.onError = function (error) { trace(error); };
req2.onData = function (data) { trace(data); };
req2.request(false);
return;
}
2.
3.
What is the expected output? What do you see instead?
Both should trace the error message that they couldn't connect, the second one crashes the program instead (citing problems including, SIGILL, SIGSEGV and unusual termination.
What version of the product are you using? On what operating system?
Win7 x64, haXe 2.07 + hxcpp 2.07
Please provide any additional information below.
I managed to trace it down to the socket it-self failing to connect so it enters Socket.connect() but when the socket_connect() function is called it fails, it never reaches the catch statement after the call. A back-trace is attached.
Aug 14, 2011
Project Member
#1
gameh...@gmail.com
Aug 14, 2011
I was using mingw, I'll check the version when I get back to the computer I was testing on. I'm fairly certain it was 32bit but I'll check that too when I get back. |