Bug 363869 - When Kaffeine is started on Plasma menu, It doesn't stop when the main window is closed
Summary: When Kaffeine is started on Plasma menu, It doesn't stop when the main window...
Status: RESOLVED FIXED
Alias: None
Product: kaffeine
Classification: Applications
Component: general (show other bugs)
Version: 2.0.1
Platform: Other Linux
: NOR major
Target Milestone: ---
Assignee: Mauro Carvalho Chehab
URL:
Keywords:
: 363942 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-06-02 23:47 UTC by tuxnix
Modified: 2016-06-09 07:38 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tuxnix 2016-06-02 23:47:58 UTC
Linux (x86_64) release 4.5.4-1-ARCH-Linux
Kaffeine 2.0.1

It is not possible to stop kaffeine aplication nor possible to kill the kaffeine process.
Just a reboot of the system helps.
Comment 1 Mauro Carvalho Chehab 2016-06-03 19:00:43 UTC
Could you please provide more details?

Do you have any Digital TV hardware connected to your machine? Are there any logs when Kaffeine is started?
Comment 2 tuxnix 2016-06-04 16:26:34 UTC
Some more information about:
Behaviour a peered after upgrading kaffeine.
[2016-06-02 12:07] [ALPM] upgraded kaffeine (1.3.1-3 -> 2.0.1-1)

Now if I start kaffeine on the desktop it runs normal.
When I klick to stop kaffeine the kaffeine-window disapers but still kaffeine is running in the background. I can here the audio output and there is still a kaffeine icon in systray.
It is possible to kill kaffeine by konsole by kill [pid] kommand.

If I start kaffeine on konsole, starting or stopping the application is normal :
[tuxnix@arch ~]$ kaffeine
04-06-16 17:51:48.122 [System  ] DvbManager::loadDeviceManager: using built-in dvb device manager
04-06-16 17:51:48.295 [System  ] DvbLinuxDevice::startDevice: found dvb device "" / "Siano Mobile Digital MDTV Receiver"
^C
[[tuxnix@arch ~]$

This behaviour does not make any difference with or without a dvb-t Stick or with or without a recording schedule in kaffeine's sqlite.db.
Although (after learning more about journalctl) I made some logs to investigate the cause wile I was starting and stopping kaffeine on desktop or konsole.  
journalctl --since "now" -f >> watchwhathappens.log

There are other causes which are logged but nothing about kaffeine at all. 
(So I do not want to bother you with sending logs)

I'm not a expert but I thing the little 'x' just closes the window but does not close the application.
Best regards TuxNix
Comment 3 Christoph Feck 2016-06-05 12:23:08 UTC
*** Bug 363942 has been marked as a duplicate of this bug. ***
Comment 4 Burkhard Lück 2016-06-06 06:09:48 UTC
Sami issue for me
kaffeine master build from sources as a seperate user starting kaffeine from konsole

Launching with:
$ kaffeine --dumpdvb
06-06-16 08:04:07.854 [Debug   ] /home/kdeframeworks/src/frameworks/kxmlgui/src/kactioncollection.cpp#264: Registering action  "options_configure_keybinding"  under new name  "settings_keys"
06-06-16 08:04:07.854 [Debug   ] /home/kdeframeworks/src/frameworks/kxmlgui/src/kactioncollection.cpp#264: Registering action  "options_configure"  under new name  "settings_kaffeine"
[00000000020006c8] pulse audio output error: PulseAudio server connection failure: Connection refused
libGL error: failed to open drm device: Permission denied
libGL error: failed to load driver: i965
06-06-16 08:04:07.956 [System  ] src/playlist/playlisttab.cpp#55: PlaylistBrowserModel::PlaylistBrowserModel: cannot open file "/home/kdeframeworks/.local5/kaffeine/playlists"
06-06-16 08:04:07.957 [Debug   ] /home/kdeframeworks/src/frameworks/kxmlgui/src/kactioncollection.cpp#264: Registering action  "file_save"  under new name  "playlist_save"
06-06-16 08:04:07.957 [Debug   ] /home/kdeframeworks/src/frameworks/kxmlgui/src/kactioncollection.cpp#264: Registering action  "file_save_as"  under new name  "playlist_save_as"
06-06-16 08:04:07.959 [System  ] src/dvb/dvbepg.cpp#97: DvbEpgModel::DvbEpgModel: cannot open "/home/kdeframeworks/.local5/kaffeine/epgdata.dvb"
06-06-16 08:04:07.959 [System  ] src/dvb/dvbmanager.cpp#634: DvbManager::readDeviceConfigs: cannot open "/home/kdeframeworks/.local5/kaffeine/config.dvb"
06-06-16 08:04:07.959 [System  ] src/dvb/dvbmanager.cpp#620: DvbManager::loadDeviceManager: using built-in dvb device manager
06-06-16 08:04:08.101 [Debug   ] /home/kdeframeworks/src/frameworks/knotifications/src/kstatusnotifieritemdbus_p.cpp#158: service is "org.kde.StatusNotifierItem-30243-1"
06-06-16 08:04:08.101 [Debug   ] /home/kdeframeworks/src/frameworks/knotifications/src/kstatusnotifieritem.cpp#727: Registering a client interface to the KStatusNotifierWatcher
06-06-16 08:04:33.615 [Debug   ] /home/kdeframeworks/src/frameworks/kio/src/core/kcoredirlister.cpp#2129: +KCoreDirLister
06-06-16 08:04:33.615 [Debug   ] /home/kdeframeworks/src/frameworks/kio/src/core/kcoredirlister.cpp#58: 
06-06-16 08:04:33.615 [Debug   ] /home/kdeframeworks/src/frameworks/kio/src/core/kcoredirlister.cpp#2129: +KCoreDirLister
06-06-16 08:04:33.615 [Debug   ] /home/kdeframeworks/src/frameworks/kio/src/core/kcoredirlister.cpp#2140: ~KCoreDirLister KCoreDirLister(0x234dd30)
06-06-16 08:04:33.616 [Debug   ] /home/kdeframeworks/src/frameworks/kio/src/core/kcoredirlister.cpp#421: lister: KCoreDirLister(0x234dd30) silent= false
06-06-16 08:04:33.616 [Debug   ] /home/kdeframeworks/src/frameworks/kio/src/core/kcoredirlister.cpp#519: KCoreDirLister(0x234dd30)
06-06-16 08:04:33.616 [Debug   ] /home/kdeframeworks/src/frameworks/kio/src/core/kcoredirlister.cpp#529: Iterating over dirs ()
06-06-16 08:04:33.677 [Warning ] QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-kdeframeworks'
06-06-16 08:04:33.689 [Debug   ] /home/kdeframeworks/src/frameworks/kservice/src/sycoca/ksycoca.cpp#251: Opening ksycoca from "/home/kdeframeworks/.cache5/ksycoca5_zu_nMEPxjBgelJfu1cXvx9zAwshZ2w="
06-06-16 08:04:33.689 [Debug   ] /home/kdeframeworks/src/frameworks/kservice/src/sycoca/ksycoca.cpp#634: checking file timestamps

I get the kaffeine start window after ~ 20 seconds
Comment 5 David Geiger 2016-06-06 08:39:47 UTC
Same issue here on Mageia with latest 2.0.1 release from:

http://download.kde.org/stable/kaffeine/2.0.1/src/kaffeine-2.0.1-1.tar.bz2
Comment 6 Burkhard Lück 2016-06-06 09:02:31 UTC
(In reply to Burkhard Lueck from comment #4)
> Same issue for me
> kaffeine master build from sources as a seperate user starting kaffeine from
> konsole
> 
I have no Digital TV hardware connected to my computer
Comment 7 David Geiger 2016-06-06 09:14:59 UTC
Also another issue with 2.0.1-1 release, kaffeine systray icon is completely unusable.

have you the same symptom?
Comment 8 Mauro Carvalho Chehab 2016-06-06 09:49:23 UTC
(In reply to Burkhard Lueck from comment #4)
> Sami issue for me
> kaffeine master build from sources as a seperate user starting kaffeine from
> konsole
> 
> Launching with:
> $ kaffeine --dumpdvb
> 06-06-16 08:04:07.854 [Debug   ]
> /home/kdeframeworks/src/frameworks/kxmlgui/src/kactioncollection.cpp#264:
> Registering action  "options_configure_keybinding"  under new name 
> "settings_keys"
> 06-06-16 08:04:07.854 [Debug   ]
> /home/kdeframeworks/src/frameworks/kxmlgui/src/kactioncollection.cpp#264:
> Registering action  "options_configure"  under new name  "settings_kaffeine"
> [00000000020006c8] pulse audio output error: PulseAudio server connection
> failure: Connection refused
> libGL error: failed to open drm device: Permission denied
> libGL error: failed to load driver: i965

Your issue seems to be unrelated to this BZ: both pulseaudio and the DRM driver are returning permission denied. It seems your issue is actually related to a bad configuration: your user doesn't seem to have permissions to open /dev/dri/card0, and pulseaudio is likely running as another user.
Comment 9 Mauro Carvalho Chehab 2016-06-06 10:51:10 UTC
(In reply to David Geiger from comment #7)
> Also another issue with 2.0.1-1 release, kaffeine systray icon is completely
> unusable.
> 
> have you the same symptom?

This is also unrelated to this BZ. The systray icon didn't have any menu. I just added one that will match the functionality of the "Start" window. It will also de-minimize the window if it was minimized.
Comment 10 David Geiger 2016-06-06 11:04:00 UTC
(In reply to Mauro Carvalho Chehab from comment #9)
> (In reply to David Geiger from comment #7)
> > Also another issue with 2.0.1-1 release, kaffeine systray icon is completely
> > unusable.
> > 
> > have you the same symptom?
> 
> This is also unrelated to this BZ. The systray icon didn't have any menu. I
> just added one that will match the functionality of the "Start" window. It
> will also de-minimize the window if it was minimized.

Yeah sorry I'll open a new one for this issue :)
Comment 11 Mauro Carvalho Chehab 2016-06-06 17:26:49 UTC
Git commit a8c0d4f81fad1777835d5dbd29b98824c60204cc by Mauro Carvalho Chehab.
Committed on 06/06/2016 at 17:25.
Pushed by mauroc into branch 'master'.

mainwindow: be sure to finish Kaffeine when the main window closes

Somehow, sometimes closing the main window is not exiting Kaffeine.

Fix that, by hooking the close() signal.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>

M  +10   -0    src/mainwindow.cpp
M  +1    -0    src/mainwindow.h

http://commits.kde.org/kaffeine/a8c0d4f81fad1777835d5dbd29b98824c60204cc
Comment 12 David Geiger 2016-06-07 12:19:59 UTC
I confirm this issue is now fixed!

Thanks!
Comment 13 tuxnix 2016-06-09 07:38:50 UTC
Bug is fixed. Thank you.
Tested with Kaffeine 2.0.2-1, plasma-desktop 5.6.4-1 on archlinux 4.6.1-2