# HG changeset patch # User sirebral # Date 1248572172 18000 # Node ID 88cea66228d6b168a808b120e218a12d786aa1fa # Parent fdd70f11bc7e5ace9a5318c5a649226db9c4c874 Should fix Image Chache problem, does not fix memory leak. diff -r fdd70f11bc7e -r 88cea66228d6 orpg/mapper/images.py --- a/orpg/mapper/images.py Sat Jul 25 19:28:21 2009 -0500 +++ b/orpg/mapper/images.py Sat Jul 25 20:36:12 2009 -0500 @@ -122,23 +122,23 @@ finally: self.__lock.release() def __loadCacheThread(self, path, image_type, imageId): - try: - st = time.time() - while self.__fetching.has_key(path) and self.__fetching[path] is not False: - time.sleep(0.025) - if (time.time()-st) > 120: - open_rpg.get_component('log').log("Timeout: " + path, ORPG_GENERAL, True) - break - except: - self.__fetching[path] = False - open_rpg.get_component('log').log("Unable to resolve/open the specified URI; image was NOT loaded: " + path, - ORPG_GENERAL, True) - return - self.__lock.acquire() - try: - open_rpg.get_component('log').log("Adding Image to Queue from Cache: " + str(self.__cache[path]), ORPG_DEBUG) - self.__queue.put((self.__cache[path], image_type, imageId)) - finally: self.__lock.release() + if self.__cache.has_key(path): + try: + st = time.time() + while self.__fetching.has_key(path) and self.__fetching[path] is not False: + time.sleep(0.025) + if (time.time()-st) > 120: + open_rpg.get_component('log').log("Timeout: " + path, ORPG_GENERAL, True) + break + except: + del self.__fetching[path] + open_rpg.get_component('log').log("Unable to resolve/open the specified URI; image was NOT loaded: " + path, ORPG_GENERAL, True) + return + self.__lock.acquire() + try: + open_rpg.get_component('log').log("Adding Image to Queue from Cache: " + str(self.__cache[path]), ORPG_DEBUG) + self.__queue.put((self.__cache[path], image_type, imageId)) + finally: self.__lock.release() #Property Methods def _getCache(self): diff -r fdd70f11bc7e -r 88cea66228d6 orpg/orpg_version.py --- a/orpg/orpg_version.py Sat Jul 25 19:28:21 2009 -0500 +++ b/orpg/orpg_version.py Sat Jul 25 20:36:12 2009 -0500 @@ -4,7 +4,7 @@ #BUILD NUMBER FORMAT: "YYMMDD-##" where ## is the incremental daily build index (if needed) DISTRO = "Traipse Dev" DIS_VER = "Grumpy Goblin" -BUILD = "090725-02" +BUILD = "090725-03" # This version is for network capability. PROTOCOL_VERSION = "1.2"