Version: (using KDE KDE 3.5.0) Installed from: Gentoo Packages OS: Linux Steps to reproduce: 1. open kontact 2. open new mail message 3. type anything i.e. "test@hotmail.com" into the To field 4. change to contacts view (leaving the composer open) 5. close kontact Result: There is no crash, everthing seems ok, BUT .kde/share/apps/kabc/std.vcf (the addressbook resource) instantly becomes size 0 bytes! This is very annoying, I'd really apreciate fixing this!
Same thing on a Kubuntu 5.10 box with KDE 3.5.0. In step 3, I confirm _any_ text will reproduce the bug (not only email addresses). Very annoying indeed :(
Here is the Kontact trace when I run these steps (## are comments) : ## checking std.vcf isabelle@isabelle:~/Desktop$ ls -l ~/.kde/share/apps/kabc/ ... -rw-r--r-- 1 isabelle isabelle 33817 2006-01-02 12:56 std.vcf ... ## opening kontact isabelle@isabelle:~/Desktop$ kontact kdecore (KAction): WARNING: KAction::plugAccel(): call to deprecated action. kdecore (KAction): WARNING: KAction::plugAccel(): call to deprecated action. kdecore (KAction): WARNING: KAction::plugAccel(): call to deprecated action. QLayout::addChildLayout: layout already has a parent WeaverThreadLogger: thread (ID: 1) suspended. WeaverThreadLogger: thread (ID: 2) suspended. WeaverThreadLogger: thread (ID: 3) suspended. WeaverThreadLogger: thread (ID: 4) suspended. kabc: WARNING: address format database incomplete (no format for locale C found). Using default address formatting. ## Kontact started, creating new email message now && switching to contacts view ## Exiting Kontact QWidget::setMaximumSize: (unnamed/RecipientComboBox) The largest allowed size is (32767,32767) kabc: WARNING: address format database incomplete (no format for locale C found). Using default address formatting. Weaver dtor: destroying inventory. WeaverThreadLogger: thread (ID: 1) destroyed. WeaverThreadLogger: thread (ID: 2) destroyed. WeaverThreadLogger: thread (ID: 3) destroyed. WeaverThreadLogger: thread (ID: 4) destroyed. Weaver dtor: done ## checking for std.vcf presence isabelle@isabelle:~/Desktop$ ls -l ~/.kde/share/apps/kabc/ ... -rw-r--r-- 1 isabelle isabelle 0 2006-01-02 12:53 std.vcf ...
This big bug seems to be still around on KDE 3.5.1 ...
*** This bug has been confirmed by popular vote. ***
I can confirm this too on kubuntu 6.04, kde 3.5.1. I only performed steps 1,2,3,5 to reproduce. No need for set 4 in my case.
This sound like #120093. http://bugs.kde.org/120093 Whenever I have unfinished mail open on exit and start kontact again, addressbook is truncated to size zero too :( Happend today again :( Kubuntu/Dapper with KDE 3.5.1. Achim
*** Bug 120093 has been marked as a duplicate of this bug. ***
Did the following commit fix this or is it unrelated? ----------- SVN commit 512375 by pfeiffer: No news (feedback) is good news, I guess. Nobody complained and I haven't lost any addresses anymore. So let's get some more testers. Can somebody merge this into trunk? M +146 -35 file/resourcefile.cpp M +13 -5 file/resourcefile.h M +155 -52 net/resourcenet.cpp M +12 -4 net/resourcenet.h
I built kdelibs with this patch again, didn't solve the issue. I rebuilt kdepim on top of the new kdelibs obtained with this patch and didn't solve the bug even after restarting KDE. So for me this patch doesn't fix this bug.
SVN commit 516587 by tilladam: Don't attempt to (synchronously) save if we are still async loading, because otherwise the following fascinating chain of events is possible: - Kontact shutdown unloads parts, which destructs the addressbook part - StdAddressbook is deleted, which clears the addressbook - before the clear the composer in KMail finds a closed addressbook, thus opens it again, triggering an asyncLoad. - that asyncLoad triggers a KIO::Job, which starts, but never finishes - KApplication's static deletion of the newly opened addressbook leads to a saveAll, which leads to a save() of the file resource, which iterates over the StdAddressbook which has already been cleared, but not re-loaded yet, since we are waiting for the KIO copy job of the temp file to finish, thus writing out a 0 byte file The reason why the kio job doesn't finish is that it has already been killed, at this point (we are in static deletion of the application, after all). I'm suspecting that StdAddressbook should not call saveAll() from the destructor. A wise man (David Faure) once told me "Intelligent dtors are bad", and I've since painfully learned a few times how right he was. I'm afraid to change that in branch, though, no telling what relies on it. Also KMail's composer auto-save should not hit the KeyResolver, which loads the addressbook, but that's only marginally related. This fixed the 0-file issue described in the bug, but it's still writing out spurious empty entries, sometimes, to the file resource. Will debug that next. BUG: 118924 CCMAIL: tokoe@kde.org M +4 -0 resourcefile.cpp --- branches/KDE/3.5/kdelibs/kabc/plugins/file/resourcefile.cpp #516586:516587 @@ -302,6 +302,10 @@ if (d->mIsSaving) { abortAsyncSaving(); } + if ( d->mIsLoading ) { + kdWarning(5700) << "Aborted save() because we're still asyncLoad()ing!" << endl; + return false; + } // create backup file QString extension = "_" + QString::number( QDate::currentDate().dayOfWeek() );
This works :) Thank you so much Till. Adding the patch to kdelibs in Kubuntu. Hopefully it'll be up soon :)
*** Bug 121023 has been marked as a duplicate of this bug. ***
*** Bug 121078 has been marked as a duplicate of this bug. ***
Op woensdag 8 maart 2006 10:09, schreef Till Adam: > On Wednesday 08 March 2006 09:34, Tobias Koenig wrote: > > On Wed, Mar 08, 2006 at 09:23:24AM +0100, Till Adam wrote: > > Hi Till, > > > > > Yeah, those are nice, but I think they should actually be used by > > > the software, not just disgruntled humans. When we detect a 0 byte > > > addressbook during loading, we could restore the newest backup on > > > loading, maybe? Tobias? > > > > I don't know... it would be nice for the user indeed. Do you have a > > patch available? > > No, but it should not be hard to do. Any JuniorJob volunteers reading > this? :) I can have a look, but not before mid next week probably. Toma
AFAIK, this commit didn't affect KDE-3.5.2 - is this right? Could you also provide a fix for KDE-3.5.2 of this nasty bug? - Thank you a lot!
Bug shows up in Boxed SuSE 10.1 also. Kontact Version 1.2 on KDE 3.5.1 Level "a". Attempted to restore backup copy of ~/.kde/share/apps/kabc/std.vcf This worked when a backup of the std.vcf was copied into a newly created user's home. ( i.e. Kontact's addressbook then correctly showed all the addresses ) This didn't work when the file is restored to the original user's home. Presume there are further files that need to be restored or repaired. Has anyone done a Howto on restoring the addressbook from a backup?
Neil: upstream at https://bugzilla.novell.com/show_bug.cgi?id=200177 . An update is in the works.
I meant https://bugzilla.novell.com/show_bug.cgi?id=212203 .