Bug 74363 - When exiting kde with Kontakt opened, kde starts with kmail opened and sometimes with kontact and kmail opened seperated
Summary: When exiting kde with Kontakt opened, kde starts with kmail opened and someti...
Status: RESOLVED FIXED
Alias: None
Product: kontact
Classification: Applications
Component: mail (show other bugs)
Version: 1.3
Platform: Gentoo Packages Linux
: NOR major
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords: triaged
: 92354 160203 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-02-06 16:22 UTC by Duarte Santos
Modified: 2011-09-15 15:13 UTC (History)
7 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 Duarte Santos 2004-02-06 16:22:48 UTC
Version:            (using KDE KDE 3.2.0)
Installed from:    Gentoo Packages
Compiler:          gcc 3.3.2 
OS:          Linux

When exiting kde with Kontakt opened, kde starts with kmail opened and sometimes with kontact and kmail opened seperated.
Comment 1 Duarte Santos 2004-03-10 20:30:26 UTC
UPDATE!!!!

	This only happends when you select imap-resources as calendar and contacts in control-center...if you use these resources, kmail will always open in kde start, even if it's a clean session.
Comment 2 George Staikos 2004-04-15 23:17:23 UTC
*** Bug has been marked as fixed ***.
Comment 3 George Staikos 2004-05-04 04:03:54 UTC
Your fix did not work.

kmail: KMKernel::~KMKernel
kabc: StdAddressBook::save()
kabc: StdAddressBook::self()
kresources: Factory::self()
kio (KTrader): KServiceTypeProfile::offers( KResources/Plugin, )
kio (KTrader): Returning 19 offers
kresources: ManagerImpl::ManagerImpl()
kresources: Connecting DCOP signals...
kresources: ManagerImpl::readConfig()
kresources: Factory::self()
kresources: ManagerImpl::readResourceConfig() xoT53U1R89
kresources: Factory::resource( imap, config )
kabc: FormatFactory::self()
kresources: ManagerImpl::readResourceConfig() Wn8k32PmrW
kresources: Factory::resource( file, config )
kabc: FormatFactory::self()
kabc: StdAddressBook::StdAddressBook()
kresources: Opening resource imap-resource
kio (KTrader): KServiceTypeProfile::offers( DCOP/ResourceBackend/IMAP,Application )
kio (KTrader): Returning 1 offers
kmail: KDCOPServiceStarter: DCOP service is available now, as kmail
kresources: ManagerImpl::writeConfig()
kresources: Saving resource xoT53U1R89
kresources: Resource::writeConfig()
kresources: Saving resource Wn8k32PmrW
kresources: Resource::writeConfig()
kresources: Saving general info
kresources: ManagerImpl::save() finished
kabc: AddressBook::load()
kmail: ERROR: Communication problem in ResourceIMAP::load()
kmail: ERROR: Unable to load resource 'imap-resource'
kabc: AddressBook::requestSaveTicket()
kabc: AddressBook::save()
kresources: ManagerImpl::~ManagerImpl()
kdecore (KLibLoader): The KLibLoader contains the library /opt/kde3/lib/kde3/libkmail_bodypartformatter_application_octetstream.la (0x1068e2c0)
kdecore (KLibLoader): The KLibLoader contains the library kabc_file (0x1071b5d0)
kdecore (KLibLoader): The KLibLoader contains the library kabc_imap (0x106dabd0)
Comment 4 George Staikos 2004-05-04 04:04:46 UTC
Note: that's a trace from KMail, not kontact, but I think that's the exact reason why kmail starts up when kontact exits.  Somehow it doesn't happen to kmail stand-alone though.
Comment 5 Daniel Molkentin 2004-07-06 00:03:14 UTC
Sorry, I can't to reproduce that. Can you confirm that it still occurs and maybe provide further details?
Comment 6 George Staikos 2004-07-06 05:39:50 UTC
Still happens for me.
Comment 7 Daniel Molkentin 2004-07-19 15:29:13 UTC
Hi George,

neither David nor I can reproduce it.

From your backtrace:
>kresources: ManagerImpl::save() finished 
>kabc: AddressBook::load() 

The load() seems to be the Problem. It simply should not happen. Could you get me a backtrace from that (via kdBacktrace())?
Comment 8 George Staikos 2004-07-19 18:03:21 UTC
On Monday 19 July 2004 09:29, Daniel Molkentin wrote:
> ------- Hi George,
>
> neither David nor I can reproduce it.
>
> From your backtrace:
> >kresources: ManagerImpl::save() finished
> >kabc: AddressBook::load()
>
> The load() seems to be the Problem. It simply should not happen. Could you
> get me a backtrace from that (via kdBacktrace())?

   Recently I can't reproduce it either.  Feel free to close.

Comment 9 David Faure 2004-07-19 18:11:17 UTC
Closing then.

Comment 10 Chris van de Wouw 2004-09-03 13:11:38 UTC
Darn... I experiencing this exact problem. I had this with kde 3.2.x and now with kde 3.3.0 after a clean install (gentoo).

At first I only used kmail with imap and I faced no problems (read: kmail didn't start at kde startup). After using kontakt and setting imap for my addressbook and korganizer, kmail starts at kde startup!

I also tried the following; close kmail, start kontakt, minimize kontakt, save session, restart kde. Now kontakt and kmail both starts seperatly at kde startup.
Comment 11 David Faure 2004-09-03 13:14:28 UTC
Is the korgac daemon running, i.e. do you see the calendar+bell icon in the system tray?
This one has to load the calendar, which when using IMAP, means starting kmail.

Comment 12 Cláudio F. Gil 2004-11-10 10:42:16 UTC
I have the same behaviour with KDE 3.3.1.
I'm using IMAP Groupware and as said above KDE starts KMail an not Kontact when restoring session. Sometimes when I close KMail and start Kontact manually two windows appear. KMail reopens in a separate window.
So I am now doing things like:
  1. Start KDE
  2. Close KMail
  3. Start Kontact
  4. Close KMail
  5. Open KMail inside Kontact
Comment 13 David Faure 2004-11-10 10:59:21 UTC
When using an imap (or kolab) resource, korgac (the korganizer systray icon for alarms) has to load the events - which means loading kmail, or kontact.
Currently it starts kmail. It should be made configurable whether it should start kontact instead. 

Note: with the current design, korgac *has* to start either kmail or kontact, to get the events - don't try arguing against that :)
(This is related to https://intevation.de/roundup/kolab/issue334).

AFAICS this can be done easily with dcopkontact.desktop from proko2 branch (kdepim/kontact/src) and a button in kontact that says "prefer kontact over kmail" [better wording?], which makes dcopkontact.desktop preferred over KMail.desktop (updating the user's profilerc).

Easy workaround meanwhile: 
simply remove ServiceTypes=DCOP/ResourceBackend/IMAP,DCOP/Mailer 
from KMail.desktop and put it in Kontact.desktop
Comment 14 Reinhold Kainhofer 2005-01-03 14:44:08 UTC
*** Bug 92354 has been marked as a duplicate of this bug. ***
Comment 15 agentgates 2005-05-17 22:42:36 UTC
Hi all

I have same trouble (KDE 3.4.0/Gentoo/P4/GCC 3.4.3)
I submit my debug output just for confirmation, maybe it helps either

Using host libthread_db library "/lib/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread 16384 (LWP 22350)]

0xb647b7e8 in waitpid () from /lib/libpthread.so.0
#0  0xb647b7e8 in waitpid () from /lib/libpthread.so.0
#1  0xb711fd88 in ?? () from /usr/kde/3.4/lib/libkdecore.so.4
#2  0xb70306c2 in KCrash::defaultCrashHandler(int) ()
   from /usr/kde/3.4/lib/libkdecore.so.4
#3  0x08618dc0 in ?? ()
#4  0x083d97a0 in ?? ()
#5  0xb6965ac3 in QApplication::internalNotify(QObject*, QEvent*) ()
   from /usr/qt/3/lib/libqt-mt.so.3

My gcc settings:
CXX="${CC}"
CFLAGS="-O3 -march=pentium4 -mtune=pentium4 -pipe -fomit-frame-pointer -ffast-math"
CHOST="i686-pc-linux-gnu"
CXXFLAGS="${CFLAGS}"

Thanks guys

agentgates
Comment 16 Justin Sheckler 2005-06-23 16:20:04 UTC
Just my $.02-- telling Korgac whether to start Kmail or Kontact sounds like a PITA to me.  Non-technical users will be turned off by that.  Can't Kontact/Kmail leave a trace in a config file somwhere when they shut down?  Then Korgac would know which app was most recently run.
Comment 17 David Faure 2005-06-23 16:25:31 UTC
The idea in comment #16 sounds like a sensible solution, actually.
Comment 18 Troy Carpenter 2005-11-17 18:26:20 UTC
This problem is just plain annoying.  Yes, I use IMAP to store my data.  Yes, I have Korgac running at startup.  Still I have to do what others have hinted at:

Start KDE (both kmail and kontact are started)
Quit kmail
Start kmail from within kontact

Every once in a while, due to some freak startup timing issue, kontact is started before kmail is needed and somehow kmail is opened in kontact instead of standalone.  But I think I have only seen that twice ever.
Comment 19 Mathias Homann 2005-11-22 09:21:45 UTC
#18 doesnt even work with me:

- i start kde
- i start kontact (and thus i get kontact, and a standalone kmail)
- i close aforementioned kmail
- i click on the "mail" button in kontacts sidebar, and it starts kmail standalone again.
Comment 20 Mathias Homann 2005-11-22 09:23:33 UTC
...woah. posting comment #19 fixed it for me...
the wonders of bugzilla always strike me dumb.
Comment 21 Alex W 2006-01-02 19:08:50 UTC
Using KDE 3.5.0, Gentoo, gcc 3.4.4

I can report the same problem here. It does seem to be connected with using IMAP resource folders, as the problem only started after I started using them.
Comment 22 Stephen Leaf 2006-08-30 02:50:39 UTC
I am unable to reproduce this in 3.5.4 and 3.5.3
Comment 23 Johan Rutgeerts 2006-08-31 15:42:17 UTC
Just updated my Ubuntu to kde 3.5.4 with official (?) packages as described on
<http://kubuntu.org/announcements/kde-354.php>.

The problem is still there.

I don't really agree with comment #16. Maybe most users won't know what it's about, but then there's no need for them to care about. And at least the problem would be solved for now.

The only real solution probably is to extract the shared functionality from kmail and put it into some common deamon/server program anyway. There's no logic in starting a mail program to have reminders working.
Comment 24 Ingo Klöcker 2006-09-09 08:58:22 UTC
This will be fixed in KDE 4 by our new backend Akonadi.
Comment 25 Thomas McGuire 2007-08-15 13:30:13 UTC
This seems like it will be solved when KMail and KOrganizer are ported to Akonadi.

See also:
bug 121708
bug 126803
bug 110342
bug 74363
bug 148836
Comment 26 Thomas McGuire 2008-04-03 19:45:31 UTC
*** Bug 160203 has been marked as a duplicate of this bug. ***
Comment 27 George Kiagiadakis 2008-09-30 10:36:13 UTC
Still happens in kontact 1.3/kmail 1.10.90 svn trunk r865463 (KDE 4.1.68). Waiting for akonadi...
Comment 28 Stéphane Magnenat 2008-10-25 10:46:37 UTC
This bug is still present in 4.1.2 final (Ubuntu packages). In particular, even if kontact is closed when quitting, if korganizer is setup to load on desktop login it will load kmail (and not kontact) as a side effect on next login.

This bug hinders the usability of KDE PIM, hopefully Akonadi will solve all this in a nice way.
Comment 29 Troy Carpenter 2008-10-25 12:13:15 UTC
Same here on comment #28.  I'm now using KDE 4.1.2, in Kubuntu Intrepid (from a clean install...no upgrade from KDE PIM from 3.5.x), but I still see the problem.  I guess I'm not running Akonadi.
Comment 30 Volker Krause 2011-09-15 15:13:43 UTC
Fixed in 4.7.