Bug 297020 - Annoying but harmless warning message on startup of every KUniqueApplication: QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
Summary: Annoying but harmless warning message on startup of every KUniqueApplication:...
Status: RESOLVED FIXED
Alias: None
Product: kdelibs
Classification: Frameworks and Libraries
Component: kdecore (show other bugs)
Version: unspecified
Platform: Kubuntu Linux
: NOR minor
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
: 297229 303744 305266 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-03-29 08:41 UTC by Laurent Bonnaud
Modified: 2016-08-05 23:14 UTC (History)
39 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Laurent Bonnaud 2012-03-29 08:41:32 UTC
User-Agent:       Mozilla/5.0 (X11; Linux i686; rv:11.0) Gecko/20100101 Firefox/11.0
Build Identifier: 

Each time I start a konsole, I see the following error messages:

$ konsole
QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.

Other KDE applications display the same error (for instance akregator).


Reproducible: Always

Steps to Reproduce:
1. Start konsole from a terminal
2. Look at what it displays in the terminal
3.
Actual Results:  
error messages

Expected Results:  
no error messages

This happend in KDE 4.8.1 in Ubuntu precise and in the KDE 4.8.1backport for oneiric.  KDE 4.7.x did not have this problem.
Comment 1 Jekyll Wu 2012-03-29 09:34:10 UTC
This is a common problem for all KDE applications using class KUniqueApplication with Qt 4.8. Other examples are klipper,ktorrent, kmix, etc.

See https://git.reviewboard.kde.org/r/103699/
Comment 2 Laurent Bonnaud 2012-03-29 10:51:34 UTC
Thanks for the pointer!

I am looking forward to seeing this patch integrated into a future KDE release...
Comment 3 Jekyll Wu 2012-04-01 12:48:44 UTC
*** Bug 297229 has been marked as a duplicate of this bug. ***
Comment 4 Laurent Bonnaud 2012-04-06 09:34:54 UTC
This bug is still there in KDE 4.8.2.

Could somebody mark this bug as CONFIRMED since there is a duplicate ?
Comment 5 gorn 2012-05-29 00:09:03 UTC
I get the message and the application never starts. It does not happen some time after restart, but only afer some time of using computer. But it happens everyday. I use debian wheezy.
Comment 6 Mikhail 2012-06-13 18:37:58 UTC
Got the same problem. Now I can't start Dolphin. Very very bad problem.
Comment 7 gorn 2012-06-14 08:59:51 UTC
is there a workaroud before the patch get integrated? It renders kde unusable for me.
Comment 8 Jekyll Wu 2012-06-14 13:16:05 UTC
(In reply to comment #6)
> Got the same problem. Now I can't start Dolphin. Very very bad problem.

Dolphin stops using KUniqueApplication since KDE SC 4.7. So :

  * If you are using KDE SC 4.7+, your dolphin problem can't be caused by this KUniqueAplication specific issue.
  * If you are using something older than KDE SC 4.8 together with Qt 4.8, that is not a good idea by itself.

(In reply to comment #7)
> is there a workaroud before the patch get integrated? It renders kde
> unusable for me.

AFAIK, this warning hasn't caused any real bug(at least I haven't heard about any in bugs.kde.org) . If you really think your problem is caused by this warning, open a new bug report, write down specific and detailed information of your problem, and link back to this bug report.
Comment 9 Mikhail 2012-06-14 14:04:33 UTC
I don't know exactly if it related to the bug or not, but I stopped nepomuk and right after that... three instances of Dolphin started, which I was trying to run before.

qdbus org.kde.NepomukServer /nepomukserver org.kde.NepomukServer.quit
Comment 10 Soo-Hyun Choi 2012-06-18 14:12:02 UTC
I still got the same warning with Ubuntu 12.04 32-bit for KDE 4.8.3. It seems that Konsole behaves extremely sluggish due to this warning message. Not satisfied.
Comment 11 Jan-Pieter Jacobs 2012-06-20 13:04:44 UTC
Same for me. Happens with about any Kde application launched.

I can confirm the nepomuk daemon taking 100% CPU, and making other applications unresponsive.
After disabling file indexing things got a bit better, but I still have stability problems, even with desktop effects disabled.

For instance: applications fail to launch (or only launch after a long, long time), the activity bar gets blanked and irresponsive applications crash, etc etc. If I try again, the problem is not reproducible. So it's pretty random. I'm not sure that everything is related, but this DBUS message is there every time...

I'm using Ubuntu 12.04 64 bit, KDE 4.8.4
Comment 12 armando btte. elu 2012-07-02 17:30:56 UTC
Hola, a mí también me ha aparecido este error cuando intentaba echar a andar el kfilebox. He de decir que no estoy seguro de haber hecho bien la instalación de la aplicación, aunque seguí los pasos lo mejor que pude. El sistema operativo es Chakra Archímedes; creo que es la última versión estable, si no me equivoco. Perdón, soy recién llegado a Chakra...
De otro lado, mi Dolphin va perfectamente, como un avión, como siempre. Pero yo también inutilicé Nepomuk y Strigi ayer, creo (se me mezclan los días con tanto ordenador!), no sé si tendrá que ver. Sólo me ha ocurrido con kfilebox, lo demás va bien (cruzo los dedos)
Comment 13 Christoph Feck 2012-07-18 16:19:01 UTC
*** Bug 303744 has been marked as a duplicate of this bug. ***
Comment 14 pclausen 2012-07-19 14:31:06 UTC
I cant open any application right now - getting fustrated. 

Fully updated Kubuntu 12.04 64-bit. It worked quite well yesterday.... :-(
Comment 15 pclausen 2012-07-19 14:47:09 UTC
Maybe it helps others:
in fustration I changed to tty1   Ctrl +Alt F1
then:
<code>
$ sudo stop kdm
$ rm  -rf ~/.kde ~/.kderc /var/tmp/kdecache-<MY USERNAME>
$ sudo start kdm
</code>

I lost all my customizaitons  (~2 days of work), but at least now KDE is working again. The error:
<code>
QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
</code>
remains though...
Comment 16 Laurent Bonnaud 2012-08-06 07:51:42 UTC
I upgraded my Kubuntu system to KDE 4.9 from precise kde backports and this bug is still there.
Comment 17 pclausen 2012-08-12 15:11:19 UTC
I gave up on Kubuntu 12.04 and installed Linux Mint 13 (XFCE) instead. I still want to use kde-apps (kate, kdevelop, konquoror, ...) and they run OK, but also in this setting I get he above message from following apps:
kate
systemsettings
konqouror
kdebugdialog

Interestingly these KDE-apps does NOT display this message at start up (?) 
kdevelop
k4dirstat

-------------------------------------------------------------
Output from Konqouror
-------------------------------------------------------------
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
KDE Daemon (kded) already running.
QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
kbuildsycoca4 running...
kbuildsycoca4(2511) kdemain: Reusing existing ksycoca
...
Comment 18 Jekyll Wu 2012-08-16 15:47:25 UTC
*** Bug 305266 has been marked as a duplicate of this bug. ***
Comment 19 Zefir 2012-09-03 02:00:01 UTC
Same issue on KDE 4.8.4 (Debian/Wheezy 3.2.0-3-amd64 #1 SMP Mon Jul 23 02:45:17 UTC 2012 x86_64 GNU/Linux).

It starts the moment KDM goes up and slowly fills log up to ~50MB after about 50 hrs:
Xsession: X session started for {my-username} at Sun Sep  2 21:23:39 EDT 2012
localuser:{my-username} being added to access control list
startkde: Starting up...
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.

Looks like nepomuk just adds to it, but the message shows with or without it.
Comment 20 Christoph Feck 2012-10-02 22:04:22 UTC
*** Bug 307731 has been marked as a duplicate of this bug. ***
Comment 21 DrHouse 2012-11-14 22:51:04 UTC
Same issue on KDE 4.9.3 with Gentoo Linux x86_64 when amarok is started 
(Linux superb 3.4.9-gentoo #3 SMP PREEMPT Sat Nov 10 02:10:29 ALMT 2012 x86_64 Pentium(R) Dual-Core CPU E6500 @ 2.93GHz GenuineIntel GNU/Linux)

[drhouse123:~]$ amarok
QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
 QUrl( "http://ws.audioscrobbler.com/2.0/?api_key=&lang=ru&method=user.getNeighbours&user=" )  
 QUrl( "http://ws.audioscrobbler.com/2.0/?api_key=&lang=ru&method=user.getFriends&user=" )  
 QUrl( "http://ws.audioscrobbler.com/2.0/?api_key=&lang=ru&method=user.getTopTags&user=" )  
 QUrl( "http://ws.audioscrobbler.com/2.0/?api_key=&lang=ru&method=user.getTopArtists&user=" )
Comment 22 Jekyll Wu 2012-12-19 17:04:07 UTC
*** Bug 311943 has been marked as a duplicate of this bug. ***
Comment 23 Joe 2012-12-19 17:07:22 UTC
So what is the solution?

On Dec 19, 2012, at 12:04 PM, Jekyll Wu <adaptee@gmail.com> wrote:

> https://bugs.kde.org/show_bug.cgi?id=297020
> 
> Jekyll Wu <adaptee@gmail.com> changed:
> 
>           What    |Removed                     |Added
> ----------------------------------------------------------------------------
>                 CC|                            |jdales@otwtechnology.com
> 
> --- Comment #22 from Jekyll Wu <adaptee@gmail.com> ---
> *** Bug 311943 has been marked as a duplicate of this bug. ***
> 
> -- 
> You are receiving this mail because:
> You are on the CC list for the bug.
Comment 24 Joe 2012-12-19 17:12:00 UTC
Its not the error message hat concerns me. Its the inconsistency of the keyboard opening and closing. I need that to be on point. 
On Dec 19, 2012, at 12:04 PM, Jekyll Wu <adaptee@gmail.com> wrote:

> https://bugs.kde.org/show_bug.cgi?id=297020
> 
> Jekyll Wu <adaptee@gmail.com> changed:
> 
>           What    |Removed                     
> ----------------------------------------------------------------------------
>                 CC|                            |jdales@otwtechnology.com
> 
> --- Comment #22 from Jekyll Wu <adaptee@gmail.com> ---
> *** Bug 311943 has been marked as a duplicate of this bug. ***
> 
> -- 
> You are receiving this mail because:
> You are on the CC list for the bug.
Comment 25 tormen 2013-01-14 16:51:21 UTC
For me this often breaks my keyboard shortcuts - none of my 
When I try to access "systemsettings" from the console, I'll see this error message.
When I try to access the "shortcuts and gestures" module, it takes 2-3 /minutes/ to show.
Applying changes within the module often result in a segfault!

If there is anything I can do to help collect more data / do tests, /please/ let me know!
Comment 26 tormen 2013-01-14 16:54:04 UTC
For me this often breaks my keyboard shortcuts (setup in the "shortcuts and gestures" module)!
When they are not working, then:
* When I try to access "systemsettings" from the console, I'll see this error message.
* When I try to access the "shortcuts and gestures" module, it takes 2-3 /minutes/ to show.
* Applying changes within the module often result in a segfault!

If there is anything I can do to help collect more data / do tests, /please/ let me know!
Comment 27 tormen 2013-01-14 17:05:53 UTC
Sorry for the double post earlier :/

~ % systemsettings                                        #12353 me@seven pts/6
QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.

>>>> And when the "shortcuts and gestures" module finally got loaded:
systemsettings(6012)/khotkeys: Unable to start server org.kde.khotkeys (kded module) [ "org.freedesktop.DBus.Error.NoReply" ]: "Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken."

>>>> And when I changed an existing shortcut (by assigning a different keyboard shortcut) and systemsettings crashed:
systemsettings(6012)/khotkeys: Unable to start server org.kde.khotkeys (kded module) [ "org.freedesktop.DBus.Error.NoReply" ]: "Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken." 
KCrash: Application 'systemsettings' crashing...
KCrash: Attempting to start /usr/lib/kde4/libexec/drkonqi from kdeinit
sock_file=/home/me/.kde4/socket-seven/kdeinit4__0

Are these additional error messages I am seeing and I am having with using the "Shortcuts and Gestures" module in systemsettings related and consequences from the first error message "session D-Bus connection created before QCoreApplication." ?
Or should they be reported in a different bug ?

The above is reproducable (once I get the initial error message "QDBusConnection: session D-Bus connection created before QCoreApplication.")!
For me often with a restart of the computer the problems are gone.
... I am not sure yet, but I also think the problems either appear right after login or not at all (until I reboot).
Comment 28 Raul Kde Bugzilla 2013-01-15 23:30:09 UTC
I have this error messages with kde 4.9.5 but it is related to kwalletd.

I need to kill kwalletd before it starts to work again.
Comment 29 David Faure 2013-01-17 18:58:19 UTC
Everyone: this warning from QDBusConnection is HARMLESS, and is not the reason for any bug you might be seeing in the application showing this warning. Do not associate things that are completely unrelated.

I started to look into changing KUniqueApplication so that the warning doesn't get printed, but it turns out to be very difficult due to the forking, see kde-core-devel for more information.
Comment 30 Dmitry Bergstein 2013-12-18 17:38:35 UTC
Unuseful log crap is not harmless.

(In reply to comment #29)
> Everyone: this warning from QDBusConnection is HARMLESS, and is not the
> reason for any bug you might be seeing in the application showing this
> warning. Do not associate things that are completely unrelated.
> 
> I started to look into changing KUniqueApplication so that the warning
> doesn't get printed, but it turns out to be very difficult due to the
> forking, see kde-core-devel for more information.
Comment 31 Valentin Rusu 2014-04-01 21:11:50 UTC
(In reply to comment #28)
> I have this error messages with kde 4.9.5 but it is related to kwalletd.
> 
> I need to kill kwalletd before it starts to work again.

Please update your installation, as that kwalletd version had some lock problems I already solved.
Comment 32 Erik 2014-04-25 06:26:30 UTC
(In reply to comment #30)
> Unuseful log crap is not harmless.

IMO this is not only unuseful, this is harmful since it continuosly leads people spending time with this issue.
Comment 33 Guillaume Debray 2014-07-01 10:34:47 UTC
Same issue here:
$ kate
QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
$ amarok
QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
Comment 34 robert leleu 2014-07-22 09:41:03 UTC
same issue// but my installation is the result of installing a new Mint16 on sda, and then mounting the existing sdb1 on the new home

leleu@leleu-portable ~/Qt $ synaptiks
QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
Comment 35 abrahams 2015-01-16 23:04:04 UTC
I encounter this in KDE 4.14.2, Kubuntu 14.10, whenever I use kstart.
Comment 36 abrahams 2015-01-19 23:04:55 UTC
When I try to use kstart I get this message, and the application opens on the wrong desktop even though I've used the "--desktop" parameter.  Since I can't use kstart without getting this message, I don't know if the kstart problem is related or not.
Comment 37 Laurent Bonnaud 2015-04-28 17:41:58 UTC
For the record, this bug still exists in Konsole 3.0.1 / KF 5.9.0
Comment 38 As Long Ago, Rebirth Has Map (anagram of my real name) 2015-06-08 11:16:53 UTC
This bug is never going to be fixed because it is more or less just stating an obvious fact. It seems that there somehow no real easy way to avoid this message, other than going in and redirecting all your kde apps that use QCoreApplication to 2>/dev/null. I've experienced this message from ~4.8 to present (for me, 5.9.0 now in kf). While looking at all the other bugs out there, it seems futile to even ask at this point. Unless you can get about 10,000 people to post about it (different people with different IPs!! are the only counted!)
Comment 39 Laurent Bonnaud 2015-10-02 11:17:09 UTC
This bug is still there in Kubuntu 15.10 and Konsole Version 15.08.0
Using:
KDE Frameworks 5.14.0
Qt 5.4.2 (built against 5.4.2)
The xcb windowing system
Comment 40 CHESS 2015-11-22 11:43:09 UTC
I have the same BUG in 1 install of Kubuntu 14.04 LTS.
I had never seen it before on 10 different install of Fedora, Mageia 4 (KDE 4.12) or Mageia 5 (KDE 4.14).
              --------------------------
For me DEBIAN / UBUNTU / MINT is for GNOME / UNITY / MATE only.
And KDE is definitly for the planet RED HAT ∕ FEDORA ∕ MAGEIA...
Comment 41 Laurent Bonnaud 2016-03-10 17:00:26 UTC
This bug still exists in neon packages:

Konsole Version 15.08.0
Using:
KDE Frameworks 5.20.0
Qt 5.5.1 (built against 5.5.1)
The xcb windowing system
Comment 42 David Faure 2016-03-26 11:53:51 UTC
This is because konsole needs to be ported from KUniqueApplication (a kdelibs4support class) to KDBusService. Please file a konsole-specific bug about that.
Comment 43 Laurent Bonnaud 2016-03-30 12:44:26 UTC
> This is because konsole needs to be ported from KUniqueApplication (a kdelibs4support class) to KDBusService. 

Thank you for the hint!

> Please file a konsole-specific bug about that.

Done, see bug #361182.
Comment 44 David Faure 2016-08-05 23:14:56 UTC
This has been fixed by deprecating KUniqueApplication in KF 5.0 and porting the apps to KDBusService instead.