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

Daniel Calviño Sánchez danxuliu at gmail.com
Tue Jan 19 20:52:49 UTC 2010


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).




More information about the KDevelop-devel mailing list