Is anyone else getting crashes in some kdevplatform unit tests? (Second try)

Andreas Pakulat apaku at gmx.de
Wed Jan 20 23:07:39 UTC 2010


On 20.01.10 21:02:47, Daniel Calviño Sánchez wrote:
> 2010/1/20 Andreas Pakulat <apaku at gmx.de>:
> > On 19.01.10 21:52:49, Daniel Calviño Sánchez wrote:
> >> Some weeks ago I sent a mail to know if someone else was getting
> >> crashes related to Konsole in some KDevPlatform tests. As I got no
> >> response, I suppose that the mail didn't reach the list or something
> >> like that. However, if you received the previous mail, sorry for
> >> spamming you again ;)
> >>
> >> Maybe something is badly broken in my system, but I have seen that
> >> unit tests that need to create a kdevplatform shell and core crash
> >> when konsole is installed.
> >>
> >> If I have konsole from kdebase/apps/konsole installed (from trunk),
> >> the unit tests crash when initializing the core. If I uninstall it, no
> >> crash happens in the tests. As some time ago I didn't have this
> >> problem, I made a regression check and found that the crash happens
> >> since Konsole commit 1017600
> >> (http://websvn.kde.org/?view=revision&revision=1017600).
> >>
> >> At first I thought that it was a problem in my test (I was updating
> >> the patch in http://reviewboard.kde.org/r/1534/), but then I saw that
> >> there are some tests in kdevplatform that show the same crash:
> >> -kdevplatform/shell/tests/shell-documentoperationtest
> >> -kdevplatform/plugins/subversion/tests/svnimport
> >> -kdevplatform/plugins/subversion/tests/svnrecursiveadd
> >>
> >> I debugged the crash and the offending line is
> >> kdebase/apps/konsole/src/SessionController.cpp:1230. If I modify that
> >> line and check first whether there is a kapp or not, the crash is
> >> gone:
> >> Index: kdebase/apps/konsole/src/SessionController.cpp
> >> ===================================================================
> >> --- kdebase/apps/konsole/src/SessionController.cpp      (revision 1077249)
> >> +++ kdebase/apps/konsole/src/SessionController.cpp      (working copy)
> >> @@ -1227,7 +1227,7 @@
> >>  bool SessionController::isKonsolePart() const
> >>  {
> >>      // Check to see if we are being called from Konsole or a KPart
> >> -    if (QString(kapp->metaObject()->className()) == "Konsole::Application")
> >> +    if (kapp && QString(kapp->metaObject()->className()) ==
> >> "Konsole::Application")
> >>          return false;
> >>      else
> >>          return true;
> >>
> >> So I don't know if this is a bug in Konsole assumption that there is a
> >> KApplication, a bug in KDevPlatform test classes not creating a
> >> KApplication, or some strange bug in my system (as I don't remember
> >> seeing anything about this problem in the mailing list nor in
> >> Bugzilla, and the Konsole commit was made almost 5 months ago).
> >
> > Yeap, this is definetly a bug in konsole. And that line actually doesn't
> > even need a kapp, accessing qApp is enough for that check. And the
> > best check would actually be KGlobal::mainComponent().componentName().
> >
> > Andreas
> 
> Could you please report the problem to the Konsole developers
> yourself? You are clearly way more knowledgeable than me in this
> stuff, so you would provide more valuable feedback about this problem.

Or.... I could just fix it. Comitted to trunk in r1077812. I'll backport
it to 4.4 too.

Andreas

-- 
You have a strong appeal for members of your own sex.




More information about the KDevelop-devel mailing list