This forum has been archived. All content is frozen. Please use KDE Discuss instead.

How to stop "QDBusConnection" & other "Q..." error messages?

Tags: None
(comma "," separated)
User avatar
Joseppi
Registered Member
Posts
79
Karma
0
OS
I have attempted to disable and get rid of all nepomuk, akonadi, soprano, etc. related processes and it seems that one residual problem is that I now get all kinds of error messages when I start certain applications from the command line. For example, when I invoke 'kate filename' from the command line, I see these messages below. What changes do I need to make to stop getting these messages?

$ kate filename <E>
QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
QInotifyFileSystemWatcherEngine::addPaths: inotify_add_watch failed: No such file or directory
QFileSystemWatcher: failed to add paths: /home/joe/.config/ibus/bus
Sundance Kid
Registered Member
Posts
103
Karma
0
OS
If you use the forum search and search for "QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave" you'll see it's a standard generated Qt error message that means nothing to the end user and apparently it's complicated to fix. There is actually a Kate bug report for it.
User avatar
Joseppi
Registered Member
Posts
79
Karma
0
OS
This is not only a 'kate' error message as I also see the same error message on several other applications, i.e. kwrite, and some various graphic image viewers, and other applications.
User avatar
šumski
Registered Member
Posts
106
Karma
1
OS
That is a qWarning message, and can only be removed by rebuilding Qt with a patch:
Code: Select all
--- src/dbus/qdbusconnection.cpp
+++ src/dbus/qdbusconnection.cpp
@@ -1109,8 +1109,10 @@
         // make sure this connection is running on the main thread
         QCoreApplication *instance = QCoreApplication::instance();
         if (!instance) {
+#ifndef QT_NO_DEBUG
             qWarning("QDBusConnection: %s D-Bus connection created before QCoreApplication. Application may misbehave.",
                      type == SessionBus ? "session" : type == SystemBus ? "system" : "generic");
+#endif
         } else if (QDBusConnectionPrivate::d(*this)) {
             QDBusConnectionPrivate::d(*this)->moveToThread(instance->thread());
         }

It's a harmless message
User avatar
Joseppi
Registered Member
Posts
79
Karma
0
OS
Thank you. What is the procedure for implementing this patch?
Is that something that anyone can easily do?
Why isn't that patch implemented in a regular update?
User avatar
šumski
Registered Member
Posts
106
Karma
1
OS
Joseppi wrote:Thank you. What is the procedure for implementing this patch?
Is that something that anyone can easily do?

Procedure is to apply* it :)

Joseppi wrote:Why isn't that patch implemented in a regular update?

We have it at openSUSE, and i think also Fedora and Mageia are including it in their Qt packages

* http://www.cyberciti.biz/faq/appy-patch ... h-command/
User avatar
einar
Administrator
Posts
3402
Karma
7
OS
It must be noted that the fixing the cause of that warning is a lot more complex than it seems: there's been some discussion on the KDE maling lists already.


"Violence is the last refuge of the incompetent."
Image
Plasma FAQ maintainer - Plasma programming with Python
Sundance Kid
Registered Member
Posts
103
Karma
0
OS
He's got a wider problem, einar and probably the root cause of most of his errors: viewtopic.php?f=154&t=109766
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Unfortunately the only way to silence the file system watcher message is by removing the ibus support for Qt - this is usually a separate package in most distributions.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]