|
From: Bastian M. <bma...@we...> - 2014-02-15 08:37:26
|
Am 14.02.2014 21:35, schrieb Mojca Miklavec:
> On Fri, Feb 14, 2014 at 9:05 PM, Bastian Märkisch wrote:
>> The workaround for a non-functional call to QLocalSocket.waitForBytesWritten
>> in qt_flushOutBuffer seems to have a timing problem - on Windows at least.
>>
>> The sequence of flush and waitForBytesWritten(-1) dead locks and stalls
>> gnuplot. This is easy to trigger when e.g. rotating 3d graphs rapidly with
>> the mouse.
>>
>> Just using waitForBytesWritten(-1) directly seems to work just fine, though.
>> This is to be also indicated by a comment ("update: seems to work with Qt
>> 4.5.") there. The patch attached is conditional on Qt >= 4.5. Could somebody
>> please test if that also works on Linux/Mac?
>
> No, it doesn't. I get
> QAbstractSocket::waitForBytesWritten() is not allowed in UnconnectedState
> printed to the terminal and then I'm unable to do any interaction with
> the mouse at all. Some plots from demos are not even displayed.
>
> Mojca
>
Thanks for the feedback. So I kept the loop but added another check for
bytesToWrite > 0 which should do no harm in any case, but prevents
stalling on Windows. Code is in CVS.
Bastian
|