[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-bugs-dist
Subject:    [Bug 123099] data loss: Incidence to localdir resource not written
From:       Martin Koller <m.koller () surfeu ! at>
Date:       2006-03-04 23:21:40
Message-ID: 20060304232140.10888.qmail () ktown ! kde ! org
[Download RAW message or body]

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
         
http://bugs.kde.org/show_bug.cgi?id=123099         




------- Additional Comments From m.koller surfeu at  2006-03-05 00:21 -------
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 ...


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic