Hang when loading a project

Jens Dagerbo jens.dagerbo at gmail.com
Wed Nov 29 09:23:23 UTC 2006


On 11/29/06, Andras Mantia <amantia at kde.org> wrote:
> On Wednesday 29 November 2006 03:21, Jens Dagerbo wrote:
> > C++ language support uses QProcess with header file preprocessing
> > these days, and konsolepart uses KProcess. I suspect it's a bad idea
> > to mix them.
>
> Good catch, the problem is in kdevdriver.cpp, KDevDriver::setup(). Read
> the funny part:
> #if KDE_VERSION <= 305
>                 return; /// \FIXME Roberto, please review! ;-)
>         // If the QProcess from below is executed,
>         // it somehow breaks the gcc call in
> parts/outputviews/makewidget.cpp. :-(
>         // It then has the effect that KProcess will never exit, at least on
> KDE-3.0
> #endif // KDE_VERSION
>                 QProcess proc;
>                 proc.addArgument( "gcc" );
>                 proc.addArgument( "-print-file-name=include" );
>                 if ( !proc.start() ) {
>                         qWarning( "Couldn't start gcc" );
>                         return;
>                 }
>                 while ( proc.isRunning() )
>                         usleep( 1 );
>
>
> So the problem is known but the check is for KDe <= 3.0.5 ! I have a
> SUSE build of KDE 3.5.5 and KDevelop 3.3.5 and there is no problem, but
> there is with my self compiled KDE 3.5.5 and KDevelop 3.4. Enabling the
> #if for my version  "fixes" the hang. I think I have to rewrite that
> QProcess stuff to use KProcess or something else instead.

The difference between your 3.4 build and the old 3.3 is that this
code wasn't used until David Nolden enabled it in 3.4. The code is
several years old, but it hasn't been in any codepath until now...


// jens




More information about the KDevelop-devel mailing list