Most commonly this happens when
winscp.com has redirected output to a stream with limited buffer. If the stream is not being read from, the buffer gets eventually filled and
winscp.com hangs, when trying to write into it.
In turn the above most commonly happens when
winscp.com is run from another program (such as .NET code), which redirect its output into stream. If the program then e.g. waits for
winscp.com to finish without reading from the stream, the
winscp.com eventually hangs, never finishing.
When using WinSCP .NET assembly, this problem should not happen, as the assembly already takes care of continuous reading of the output.