From 20dff539a5bbe3d68f18462249357cfa67442471 Mon Sep 17 00:00:00 2001 From: cim Date: Tue, 21 Jan 2014 18:20:19 +0000 Subject: [PATCH] More extra logging for the cache problems --- src/Core/OOCache.m | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/src/Core/OOCache.m b/src/Core/OOCache.m index 10e1c39c..97014d78 100644 --- a/src/Core/OOCache.m +++ b/src/Core/OOCache.m @@ -964,7 +964,40 @@ static void AgeListCheckIntegrity(OOCacheImpl *cache, NSString *context) { // This is especially bad since this function is called just after verifying that the count field reflects the number of objects in the tree. OOLog(kOOLogCacheIntegrityCheck, @"Integrity check (%@ for \"%@\"): expected %u nodes, found %u. Cannot repair; clearing cache.", context, cache->name, cache->count, seenCount); - OOLog(kOOLogCacheIntegrityCheck, @"Age list seems to be: %@",CacheArrayOfNodesByAge(cache)); + + /* Start of temporary extra logging */ + node = cache->youngest; + + if (node) + { + for (;;) + { + next = node->older; + ++seenCount; + if (next == NULL) break; + + if (node->key != NULL) + { + OOLog(kOOLogCacheIntegrityCheck,@"Key is: %@",node->key); + } + else + { + OOLog(kOOLogCacheIntegrityCheck,@"Key is: NULL"); + } + + if (node->value != NULL) + { + OOLog(kOOLogCacheIntegrityCheck,@"Value is: %@",node->value); + } + else + { + OOLog(kOOLogCacheIntegrityCheck,@"Value is: NULL"); + } + + node = next; + } + } + /* End of temporary extra logging */ cache->count = 0; CacheNodeFree(cache, cache->root);