[KDev3.4] BlockingKProcess should be fixed.

Andras Mantia amantia at kde.org
Mon Apr 23 19:05:04 UTC 2007


On Monday 23 April 2007, dukju ahn wrote:
> Attached file is stacktrace. At stacknumber #33, BKProc::enter_loop()
> called. In that event loop, SVNFileInfoProvider:;status() is called,
> which calls NetAccess::syncRun().
> In short, syncRun()'s enter_loop() is called on the top of the
> BKProc::enter_loop().

Let's try to solve the problem in another way: change 
parts/fileview/fileviewpart.cpp line 72 from
QTimer::singleShot( 1000, this, SLOT(init()) );
to
QTimer::singleShot( 0, this, SLOT(init()) );

If doesn't help, replace it with a simple
init();

As I see the problem is that there is a timer running (the one above) 
when the BKProcess code is executed, which is fired during this 
execution of the external application in blocking mode. Unfortunately 
this time executes code which runs KIO::NetAccess and messes up the 
event loops. 
 Yes, this is a general problem and can happen anytime you use 
KIO::NetAccess (and is not BKProcess specific). If you have a timer, a 
KIO::NetAccess call, and this call takes some time and the timer is 
fired meantime and the timer's slot executes another KIO::NetAccess 
call, you're at the same situation.
 Using a 0 ms timer (which is anyway suggested, I have no idea why there 
is a 1second timer there) might reduce the chance of running in this 
bug, altough executing directly should be the safest. Other solution 
might be to suspend existing timers, if this is possible (e.g you know 
the pointers to the timers).

Andras

-- 
Quanta Plus developer - http://quanta.kdewebdev.org
K Desktop Environment - http://www.kde.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20070423/9b312089/attachment.sig>


More information about the KDevelop-devel mailing list