Deadlock in socket communication

It looks like the SocketManager having a deadlock during a http-request. The UI hangs until the request times out… Screenshot from Instrument: http://screencast.com/t/tthieanoZfFj

This is 100% repeatable in the Flare code which you have access to, tested on multiple iOS devices. Works in DotNetExe/Android/CMake. Present in latest release, 0.1.1828.

Find the trace file from Instruments here: https://cortexproduction.blob.core.windows.net/cortex-uploads/1acae539-0af9-4ee1-bfd3-8f50aa1c478drunclean.false.trace.zip

Thanks for reporting, we will investigate.

In my opinion CMake also has deadlock issues. I get hanging and the spinning pinwheel at the same place where iOS hangs.

Thanks for the extra info Bjørn-Olav! We will start looking into this and another http bug tomorrow morning.

I had a look at your trace and, as it also shows on the screenshot you posted, a socket manager spends 1.0 ms on a thread. That doesn’t explain the almost 20 s with no recorded activity or why the other threads don’t show up at all in the trace during that period. It might still be that the UI thread is waiting for some result coming from this socket manager.

Are you able to pause the application in a debugger when the UI hangs and get a stacktrace for all threads?

In the meantime, I’ll keep looking at this and a couple of other networking issues.

Today’s release includes a new Uno.Net.Http package (moved out of Experimental), including new iOS and Android backends. I believe it fixes the issues you were seeing earlier with UI hangs.