Bug 339094 - Dolphin hangs up when opening a file in Kate from it. Only happen when using a already open kate session.
Summary: Dolphin hangs up when opening a file in Kate from it. Only happen when using ...
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kwindowsystem
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Martin Flöser
URL:
Keywords:
: 340909 341377 343613 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-09-15 13:44 UTC by Joao Carreira
Modified: 2015-04-29 06:54 UTC (History)
21 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Register with dbus to wake up KRun, and unregister then (2.99 KB, patch)
2015-01-25 13:05 UTC, Liu Zhe
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joao Carreira 2014-09-15 13:44:24 UTC
Dolphin hangs up when opening a file using kate (e.g. open with -> kate)
Only happen when using am already open kate session. 
After open the second file the dolphin freezes, like it is waiting for kate to open.
Then, when the kate closes the file that is making the error the followiing message error "KDEInit could not launch '/usr/bin/kate'"

Reproducible: Always

Steps to Reproduce:
1. From dolphin open a file with kate (e.g. open with -> kate)
2. From the same dolphin window repeat the process (1.)
3. Close the last open file to see the error message

Actual Results:  
Dolphin freezes after step 2 and an error message appears after step 3: "KDEInit could not launch '/usr/bin/kate"

Expected Results:  
Normally opened Kate from Dolphin every time
Comment 1 Christoph Cullmann 2014-09-23 19:19:59 UTC
IMHO is that a frameworks issue, I looked at it a bit, and this is the reason I traced and wrote to frameworks-devel:

Hi,

for Kate, the startup info doesn't work atm in frameworks.

If you launch dolphin KF5 version and open one file => fine,
second file => dolphin blocks and startup info doesn't happen.

If you look at the logs, you see:

 (1975)/(default) KXMessages::broadcastMessageX: KXMessages used on non-X11 platform! This is an application bug.

Which is on my machine the kdeinit5 process that can't use KXMessages as the guard
there seems not to work (there is a isX11....() check).

Might it be, that this check in QX11Info needs a application instance which is not there in the kdeinit5 process?

Greetings
Christoph 

Perhaps thats wrong, but thats all I see ATM.
Comment 2 Arjun AK 2014-11-29 06:55:08 UTC
*** Bug 341377 has been marked as a duplicate of this bug. ***
Comment 3 Arjun AK 2014-11-29 07:29:15 UTC
*** Bug 340909 has been marked as a duplicate of this bug. ***
Comment 4 Hrvoje Senjan 2014-12-01 20:24:36 UTC
dup of bug 337889 ?
Comment 5 Ragnar Thomsen 2014-12-18 22:08:25 UTC
I also see this bug with KF5.5, plasma 5.1.2 and dolphin-frameworks-git...
Comment 6 fademind 2015-01-20 06:23:39 UTC
Distro: Arch x64
KDE: 4.14.4 with parts of KF5 5.6.0

[tomasz@arch ~]$ pacman -Q|grep kdelib
kdelibs 4.14.4-1
kdelibs4support 5.6.0-1

FS#43513 [kdebase-dolphin] [kate] kdeinit could not launch '/usr/bin/kate'

[tomasz@arch ~]$ pacman -Q|grep kate
kate 14.12.1-2
katepart4 4.14.3-2
libkate 0.4.1-5
[tomasz@arch ~]$ pacman -Q|grep dolphin
kdebase-dolphin 14.12.1-2
[tomasz@arch ~]$ 



Steps:
Open Dolphin
Open in Kate any text File. 
Switch to Dolhin Window and try any action. For example open next tab.
Window freeze. After some time content is not visible:
http://i.imgur.com/PQktkVX.png

Console output:
[tomasz@arch ~]$ dolphin 
dolphin(3471) Baloo::XattrDetector::Private::init: supportedPaths: ("/home/tomasz")
dolphin(3471) Baloo::XattrDetector::Private::init: UnsupportedPaths: ("/", "/tmp", "/proc")
dolphin(3471) KMimeTypeRepository::parents: "/usr/share/mime/subclasses" refers to unknown mimetype "application/vnd.ms-excel.sheet.binary.macroEnabled.12" 
dolphin(3471) KMimeTypeRepository::parents: "/usr/share/mime/subclasses" refers to unknown mimetype "application/vnd.ms-excel.sheet.binary.macroEnabled.12" 
dolphin(3471) KMimeTypeRepository::parents: "/usr/share/mime/subclasses" refers to unknown mimetype "application/vnd.ms-excel.addin.macroEnabled.12" 
dolphin(3471) KMimeTypeRepository::parents: "/usr/share/mime/subclasses" refers to unknown mimetype "application/vnd.ms-powerpoint.slideshow.macroEnabled.12" 
dolphin(3471) KMimeTypeRepository::parents: "/usr/share/mime/subclasses" refers to unknown mimetype "application/vnd.ms-powerpoint.slideshow.macroEnabled.12" 
dolphin(3471) KMimeTypeRepository::parents: "/usr/share/mime/subclasses" refers to unknown mimetype "application/vnd.ms-excel.sheet.macroEnabled.12" 
dolphin(3471) KMimeTypeRepository::parents: "/usr/share/mime/subclasses" refers to unknown mimetype "application/vnd.ms-excel.sheet.macroEnabled.12" 
dolphin(3471) KMimeTypeRepository::parents: "/usr/share/mime/subclasses" refers to unknown mimetype "application/vnd.ms-powerpoint.presentation.macroEnabled.12" 
dolphin(3471) KMimeTypeRepository::parents: "/usr/share/mime/subclasses" refers to unknown mimetype "application/vnd.ms-powerpoint.presentation.macroEnabled.12" 
dolphin(3471) KMimeTypeRepository::parents: "/usr/share/mime/subclasses" refers to unknown mimetype "application/vnd.ms-word.template.macroEnabled.12" 
dolphin(3471) KMimeTypeRepository::parents: "/usr/share/mime/subclasses" refers to unknown mimetype "application/vnd.ms-word.template.macroEnabled.12" 
dolphin(3471) KMimeTypeRepository::parents: "/usr/share/mime/subclasses" refers to unknown mimetype "application/vnd.ms-excel.template.macroEnabled.12" 
dolphin(3471) KMimeTypeRepository::parents: "/usr/share/mime/subclasses" refers to unknown mimetype "application/vnd.ms-excel.template.macroEnabled.12" 
dolphin(3471) KMimeTypeRepository::parents: "/usr/share/mime/subclasses" refers to unknown mimetype "application/vnd.ms-powerpoint.template.macroEnabled.12" 
dolphin(3471) KMimeTypeRepository::parents: "/usr/share/mime/subclasses" refers to unknown mimetype "application/vnd.ms-powerpoint.template.macroEnabled.12" 
dolphin(3471) KMimeTypeRepository::parents: "/usr/share/mime/subclasses" refers to unknown mimetype "application/vnd.ms-word.document.macroEnabled.12" 
dolphin(3471) KMimeTypeRepository::parents: "/usr/share/mime/subclasses" refers to unknown mimetype "application/vnd.ms-word.document.macroEnabled.12" 
dolphin(3471) KMimeTypeRepository::parents: "/usr/share/mime/subclasses" refers to unknown mimetype "application/vnd.ms-powerpoint.slide.macroEnabled.12" 
dolphin(3471) KSambaSharePrivate::isSambaInstalled: Samba is not installed! 
dolphin(3471) KSambaSharePrivate::findSmbConf: KSambaShare: Could not find smb.conf! 
dolphin(3471) KSambaSharePrivate::isSambaInstalled: Samba is not installed! 
QInotifyFileSystemWatcherEngine::addPaths: inotify_add_watch failed: Brak dostępu 
QFileSystemWatcher: failed to add paths: /lost+found 
QInotifyFileSystemWatcherEngine::addPaths: inotify_add_watch failed: Brak dostępu
QFileSystemWatcher: failed to add paths: /root
dolphin(3471) Baloo::FileFetchJob::doStart: No file index information found "/home/tomasz/kadu"
dolphin(3471) Baloo::FileFetchJob::doStart: No file index information found "/home/tomasz/kadu/kadu.install"
dolphin(3471) Baloo::FileFetchJob::doStart: No file index information found "/home/tomasz/kadu/kadu.install"
dolphin(3471) Baloo::FileFetchJob::doStart: No file index information found "/home/tomasz/kadu/PKGBUILD"

Console Output of kate:
[tomasz@arch ~]$ kate
kate: openURL

AFTER close kate window I see prompt:
http://i.imgur.com/T1BcyjY.png (Translation: kdeinit could not launch '/usr/bin/kate')
AFTER close prompt Dolphin window is good and working fine again:
http://i.imgur.com/Bz3qmZd.png
Comment 7 Liu Zhe 2015-01-24 12:06:51 UTC
Hey, I found a walk-around.
Remove "-b" option of kate with kmenuedit will prevent dolphin from hanging up, although it will keep telling you "KDEInit could not launch '/usr/bin/kate'" (which is not true).
Comment 8 fademind 2015-01-24 18:57:36 UTC
 Comment by Antonio Rojas (arojas) - Saturday, 24 January 2015, 19:33 GMT+1
Removing X-DBUS-StartupType=Multi from the .desktop file fixes this for me. Can this be implemented as a workaround while this is fixed upstream? This is a really bad bug IMO, it makes kate useless for any advanced use.
  Comment by Tomasz (FadeMind) - Saturday, 24 January 2015, 19:49 GMT+1 — Edit
One more issue:
looping loading animation on kate icon after open several files. This feature can be disabe by adding value:

StartupNotify=false

in to the file /usr/share/applications/org.kde.kate.desktop
I confirm:
Disabling/removing X-DBUS-StartupType=Multi line in org.kde.kate.desktop file fixed issue kdeinit could not launch '/usr/bin/kate'
  Comment by Andrea Scarpino (BaSh) - Saturday, 24 January 2015, 19:51 GMT+1
Great. Please report those informations in the upstream bug report.

https://bugs.archlinux.org/task/43513
Comment 9 Liu Zhe 2015-01-25 13:05:33 UTC
Created attachment 90643 [details]
Register with dbus to wake up KRun, and unregister then

Documentation of KToolInvocation (called by KRun when click a file in dolphin) said "Multi" means "Always start a new service, wait until the service has registered with D-Bus". But when the second text file is opened, kate just starts a QApplication and waits, without registering with DBus.
In KDE 4, the second instance of kate launchs an empty KApplication to do this job, but the author said "it's too bad" to register a service. Maybe we can register to make KService happy and unregister at once.
Another problem is that the kate icon will jump quite a few seconds after clicking the second file. I thought the reason was KStartupInfo::appStarted() not called as it requires Q_WS_X11 macro, which is not defined in Qt 5. But the bug still exists after I fixed this.
Comment 10 Hrvoje Senjan 2015-01-29 15:13:45 UTC
(In reply to Liu Zhe from comment #9)
> Created attachment 90643 [details]
> Register with dbus to wake up KRun, and unregister then

FWIW, the patch fixes the problem here!

@Christoph,
i guess Liu should open a review request @ reviewboard.kde.org ? or can be reviewed this way?
Comment 11 Arjun AK 2015-02-02 16:28:12 UTC
*** Bug 343613 has been marked as a duplicate of this bug. ***
Comment 12 Martin Flöser 2015-02-16 07:20:43 UTC
err why got this bug assigned to me?
Comment 13 Christoph Cullmann 2015-02-16 07:22:13 UTC
Look at Comment 1, perhaps I am wrong, but KWindowSystem seems to have some problem in KXMessages sending the events. But perhaps I am wrong.
Comment 14 Martin Flöser 2015-02-16 07:27:34 UTC
(In reply to Christoph Cullmann from comment #13)
> Look at Comment 1, perhaps I am wrong, but KWindowSystem seems to have some
> problem in KXMessages sending the events. But perhaps I am wrong.

please check again. The warning printed in comment #1 got fixed in KWindowSystem quite some time ago. See http://commits.kde.org/kwindowsystem/837f1ccc0af5b53dcd394d5cce535ee54a857933
Comment 15 Martin Klapetek 2015-03-10 11:59:59 UTC
Git commit 5207e49a84145e21060f3b5beff302a437cfeccd by Martin Klapetek, on behalf of Liu Zhe.
Committed on 10/03/2015 at 11:58.
Pushed by mklapetek into branch 'Applications/15.04'.

Register with dbus to wake up KRun, and unregister then

This fixes the "KDEInit could not launch Kate" error
when opening second file with Kate

REVIEW: 122498
Related: bug 343673

M  +2    -6    kate/src/kateapp.cpp
M  +5    -2    kate/src/main.cpp

http://commits.kde.org/kate/5207e49a84145e21060f3b5beff302a437cfeccd