>Submitter-Id:  current-users
>Originator:    Mel
>Organization:  
>Confidential:  no 
>Synopsis:      [PATCH] Fix automoc4 hangs cosmetically.
>Severity:      serious
>Priority:      medium
>Category:      ports
>Class:         sw-bug
>Release:       FreeBSD 8.2-STABLE amd64
>Environment:
System: FreeBSD datakitty.lan.rachie.is-a-geek.net 8.2-STABLE FreeBSD 
8.2-STABLE #5: Fri Nov 11 11:35:54 AKST 2011 
m...@datakitty.lan.rachie.is-a-geek.net:/data/obj/data/RELENG_8/src/sys/GENERIC 
amd64


        
>Description:
Automoc4 unpredictably hangs when calling cmake to print colored text.
The root cause lies in QProcess calling async unsafe functions in a thread
as analyzed here:
http://lists.freebsd.org/pipermail/freebsd-stable/2011-May/062603.html

The symptom is however easily mitigated by attached patch.
>How-To-Repeat:
Build one of the larger kde4 ports to increase chances of bug showing up.
Confirmed candidates (2 cores builds):
- x11/kde4-runtime
- x11/kdelibs4
- x11/kde4-baseapps
- deskutils/kdepimlibs4

>Fix:

Patch below uses a conservative 2 seconds for the QProcess to realize the
command has already finished.

--- patch-kde4automoc.cpp begins here ---
--- kde4automoc.cpp.orig        2009-01-22 09:50:09.000000000 -0900
+++ kde4automoc.cpp     2011-11-28 08:49:56.000000000 -0900
@@ -71,7 +71,7 @@
             QStringList args(cmakeEchoColorArgs);
             args << msg;
             cmakeEcho.start(cmakeExecutable, args, QIODevice::NotOpen);
-            cmakeEcho.waitForFinished(-1);
+            cmakeEcho.waitForFinished(2000);
         }
 
         QString builddir;
--- patch-kde4automoc.cpp ends here ---


_______________________________________________
kde-freebsd mailing list
kde-freebsd@kde.org
https://mail.kde.org/mailman/listinfo/kde-freebsd
See also http://freebsd.kde.org/ for latest information

Reply via email to