SVN commit 1214946 by mpyne: Backport "Fully clear cache metadata in clearInternal()" to 4.6.
KSharedDataCache uses the clearInternal() method to reset the cache, which is used if corruption is detected, and when directed through KSharedDataCache::clear(). For whatever reason I thought that simply setting the "first page" pointer for each possible index entry would be sufficient, but that is not the case at all, as various methods which go through the cache entries also check things such as the use count, last access time, etc. Assuming no other errors (:-/) this should be the cause of bug 260309. (The exact sequence would be a KSharedDataCache user runs ::clear(), later adds some entries that invoke removeUsedPages(), and removeUsedPages() goes through *all* index entries, including ones that appear to be in use since their use count is >0, but their first page is still invalid). Easiest way to invoke this bug I've found is to simply run "plasmoidviewer clock" at a konsole. This should fix the annoying bug 260309 just in time for KDE Platform 4.6. I'm CC-ing release team so that there are no surprises, but I have hopefully demonstrated enough of the issue to prove that this patch is at least "more correct" than previous behavior. It is possible that this was also the proximate cause of the Plasma crashes when changing the system time for Daylight Savings (which I worked around with the error message you've been seeing for months), bug 253795. FIXED-IN:4.6 BUG:260309 CCBUG:253795 CCMAIL:release-team@kde.org M +5 -0 kshareddatacache.cpp --- branches/KDE/4.6/kdelibs/kdecore/util/kshareddatacache.cpp #1214945:1214946 @@ -437,6 +437,11 @@ IndexTableEntry *indices = indexTable(); for (uint i = 0; i < indexTableSize(); ++i) { indices[i].firstPage = -1; + indices[i].useCount = 0; + indices[i].fileNameHash = 0; + indices[i].totalItemSize = 0; + indices[i].addTime = 0; + indices[i].lastUsedTime = 0; } } _______________________________________________ release-team mailing list release-team@kde.org https://mail.kde.org/mailman/listinfo/release-team