Bug 187323 - Akregator sometimes does not quit properly if tray icon disabled
Summary: Akregator sometimes does not quit properly if tray icon disabled
Status: RESOLVED WORKSFORME
Alias: None
Product: akregator
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-16 18:36 UTC by Alec Moskvin
Modified: 2010-06-10 17:24 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Fix (1.23 KB, patch)
2009-03-21 21:44 UTC, Haakon Nilsen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alec Moskvin 2009-03-16 18:36:33 UTC
Version:            (using KDE 4.2.1)
Compiler:          gcc (Gentoo 4.3.3-r1 p1.1, pie-10.1.5) 4.3.3 
OS:                Linux
Installed from:    Gentoo Packages

If the tray icon is disabled, Akregator does not quit when the window is closed. This means that if it is closed and then started, nothing happens.

To reproduce:
1. Disable the tray icon in Settings > Configure Akregator.
2. Exit Akregator.
3. Start Akregator
4. Select a feed and open it in a new tab.
5. Close Akregator with the X button on the titlebar.
6. Run Akregator.

Result:
Nothing happens. This is because the akregator process is running. The only way to open it is by terminating the running process (pkill akregator) and start it over.
Comment 1 Haakon Nilsen 2009-03-21 17:59:04 UTC
This is reproducible on trunk. Disable the tray icon, open an article in a new tab, close the window, and you now have a useless akregator process. This is a gdb backtrace from the process in this state:

#0  0xb80a2430 in __kernel_vsyscall ()
#1  0xb5da0167 in poll () from /lib/tls/i686/cmov/libc.so.6
#2  0xb4da2c52 in ?? () from /usr/lib/libglib-2.0.so.0
#3  0xb4da2f81 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#4  0xb6c465d8 in QEventDispatcherGlib::processEvents (this=0x9339278, flags={i = -1079372440}) at kernel/qeventdispatcher_glib.cpp:323
#5  0xb6148da5 in QGuiEventDispatcherGlib::processEvents (this=0x9339278, flags={i = -1079372392})
    at kernel/qguieventdispatcher_glib.cpp:202
#6  0xb6c1920a in QEventLoop::processEvents (this=0xbfaa1610, flags={i = -1079372328}) at kernel/qeventloop.cpp:149
#7  0xb6c1964a in QEventLoop::exec (this=0xbfaa1610, flags={i = -1079372264}) at kernel/qeventloop.cpp:200
#8  0xb6c1baf9 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:880
#9  0xb60a8a97 in QApplication::exec () at kernel/qapplication.cpp:3553
#10 0x0804efc1 in main (argc=Cannot access memory at address 0xb
) at /home/kde-devel/kde/src/KDE/kdepim/akregator/src/main.cpp:115

MainWindow::queryExit() is called when you close the window, and returns true. 

The problem is only there in sessions when you have made new tabs. If akregator starts with tabs from previous sessions, there is no problem.
Comment 2 Haakon Nilsen 2009-03-21 21:44:03 UTC
Created attachment 32325 [details]
Fix

With this patch, akregator properly exits in the described situation. I'm a newbie and I'm not sure if the patch could have unintended consequences, so please review. Note I had to check for m_part nullness in slotQuit because queryExit is called twice for a reason unknown to me.

This bug also affects Kontact when embedding Akregator. If you open a new Akregator tab and quit Kontact, then there is a kontact process lingering which has to be killed manually. The patch does not fix (or cause) this.
Comment 3 Florian Merz 2009-04-14 11:31:49 UTC
I can confirm this bug.
Comment 4 Alec Moskvin 2009-10-27 17:49:18 UTC
This bug is still present in KDE 4.3.2


Haakon, could you please submit your patch to the Review Board? They usually review/apply them much faster if you put them there rather than on bugzilla.

http://reviewboard.kde.org/groups/kdepim/

Thanks!
Comment 5 Daniel Faust 2010-04-08 15:29:00 UTC
this bug is still valid for kde 4.4.2
Comment 6 Christophe Marin 2010-06-10 17:24:02 UTC
I can't reproduce with the steps mentioned by the bug reporter.

The 'close' button quits akregator.