Summary: | data loss: Incidence to localdir resource not written after 2 deletes before | ||
---|---|---|---|
Product: | [Applications] korganizer | Reporter: | Martin Koller <kollix> |
Component: | general | Assignee: | kdepim bugs <kdepim-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | grave | CC: | finex, smartins |
Priority: | NOR | ||
Version: | 3.5 | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Martin Koller
2006-03-04 23:22:16 UTC
Looking for the bug in the code, I found something: When an Incidence is deleted, beginChange() is called before deleteEvent() and then endChange(). In beginChange() a change counter (associated with the Resource the incidence is in) is increased, but in endChange(), the resource the now deleted incidence was in, is no longer found (which is obvious) which leads to the fact, that the changeCounter can not be decreased anymore. Which further leads to the fact that with the next creation of an incidence the change counter is not set to 0 in endChange() which then does not trigger the save() method. Adding additional debug outputs shows: libkcal: CalendarResources::beginChange() 0x8605590 libkcal: int KCal::CalendarResources::incrementChangeCount(KCal::ResourceCalendar*) change count=1 libkcal: CalendarResources::requestSaveTicket() libkcal: CalendarResources::deleteEvent libkcal: ResourceLocalDir::deleteEvent libkcal: CalendarResource::endChange() 0x8605590 libkcal: CalendarResources::beginChange() 0x82bef48 libkcal: int KCal::CalendarResources::incrementChangeCount(KCal::ResourceCalendar*) change count=2 libkcal: CalendarResources::deleteEvent libkcal: ResourceLocalDir::deleteEvent libkcal: CalendarResource::endChange() 0x82bef48 As I don't know what is the concept behind the changeCounter, I can't quickly create a solution. Probably someone can do it with my findings ... Reassigning all KOrganizer bug reports and wishes to the newly created korganizer-devel mailing list. I confirm frequent data loss (event and todos) with KOrganizer. Items are ok on the screen, but if I quit and start kontact those items are gone... I use a localdir resource too. Hope that this will be fixed in KDE4. I tried to reproduce this, but when I tried to add an event after deleting 2 I was given an popup error saying 'unable to save'. @Brian: which version did you used? 3.5? Anyway I cannot reproduce using korganizer in KDE 3.5.10. I've tested current trunk too, which saves correctly events (even if the display is not ever refreshed). I can still reproduce using KDE 3.5.10. Just add 2 events, e.g. called 1 and 2, then delete 1 and 2. Create a new one called 3. Quit korganizer, start it again -> 3 is not there (It would really make me wonder if the bug is solved in a 3.5.x release, as nobody is working on this anymore ...) This bug was fixed in trunk 3 days ago - commit 926668 |