From dfcf899a23cdd6f8536ead97e1ca114b2eba1b49 Mon Sep 17 00:00:00 2001 From: Darren Ranalli Date: Fri, 20 Apr 2007 00:25:55 +0000 Subject: [PATCH] added pdb-on-leak-detect --- direct/src/showbase/ContainerLeakDetector.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/direct/src/showbase/ContainerLeakDetector.py b/direct/src/showbase/ContainerLeakDetector.py index 0b456a0b01..15f2c94765 100755 --- a/direct/src/showbase/ContainerLeakDetector.py +++ b/direct/src/showbase/ContainerLeakDetector.py @@ -709,14 +709,16 @@ class CheckContainers(Job): # TODO self.notify.debug('caught exception in getContainerByIdGen (3)') else: - msg = ('%s (%s) consistently increased in size over the last ' + msg = ('leak detected: %s (%s) consistently increased in size over the last ' '5 periods (%s items at last measurement, current contents: %s)' % (name, itype(container), idx2id2len[self._index][objId], fastRepr(container, maxLen=CheckContainers.ReprItems))) self.notify.warning(msg) - self.notify.info('sending notification...') yield None messenger.send(self._leakDetector.getLeakEvent(), [container, name]) + if config.GetBool('pdb-on-leak-detect', 0): + import pdb;pdb.set_trace() + pass except Exception, e: print 'CheckContainers job caught exception: %s' % e if __dev__: