mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 18:31:55 -04:00
added pdb-on-leak-detect
This commit is contained in:
parent
f82ac8cfde
commit
dfcf899a23
@ -709,14 +709,16 @@ class CheckContainers(Job):
|
|||||||
# TODO
|
# TODO
|
||||||
self.notify.debug('caught exception in getContainerByIdGen (3)')
|
self.notify.debug('caught exception in getContainerByIdGen (3)')
|
||||||
else:
|
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)' %
|
'5 periods (%s items at last measurement, current contents: %s)' %
|
||||||
(name, itype(container), idx2id2len[self._index][objId],
|
(name, itype(container), idx2id2len[self._index][objId],
|
||||||
fastRepr(container, maxLen=CheckContainers.ReprItems)))
|
fastRepr(container, maxLen=CheckContainers.ReprItems)))
|
||||||
self.notify.warning(msg)
|
self.notify.warning(msg)
|
||||||
self.notify.info('sending notification...')
|
|
||||||
yield None
|
yield None
|
||||||
messenger.send(self._leakDetector.getLeakEvent(), [container, name])
|
messenger.send(self._leakDetector.getLeakEvent(), [container, name])
|
||||||
|
if config.GetBool('pdb-on-leak-detect', 0):
|
||||||
|
import pdb;pdb.set_trace()
|
||||||
|
pass
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
print 'CheckContainers job caught exception: %s' % e
|
print 'CheckContainers job caught exception: %s' % e
|
||||||
if __dev__:
|
if __dev__:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user