mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
add temp code to help track down client crash
This commit is contained in:
parent
855e639471
commit
5b7e57a9da
@ -3,6 +3,7 @@
|
|||||||
from pandac.PandaModules import *
|
from pandac.PandaModules import *
|
||||||
from direct.directnotify.DirectNotifyGlobal import directNotify
|
from direct.directnotify.DirectNotifyGlobal import directNotify
|
||||||
from direct.distributed.DistributedObjectBase import DistributedObjectBase
|
from direct.distributed.DistributedObjectBase import DistributedObjectBase
|
||||||
|
from direct.showbase.PythonUtil import StackTrace
|
||||||
#from PyDatagram import PyDatagram
|
#from PyDatagram import PyDatagram
|
||||||
#from PyDatagramIterator import PyDatagramIterator
|
#from PyDatagramIterator import PyDatagramIterator
|
||||||
|
|
||||||
@ -257,6 +258,11 @@ class DistributedObject(DistributedObjectBase):
|
|||||||
def _deactivate(self):
|
def _deactivate(self):
|
||||||
# after this is called, the object is no longer an active DistributedObject
|
# after this is called, the object is no longer an active DistributedObject
|
||||||
# and it may be placed in the cache
|
# and it may be placed in the cache
|
||||||
|
if not self.cr:
|
||||||
|
# we are going to crash, output the destroyDo stacktrace
|
||||||
|
self.notify.warning('self.cr is none in _deactivate %d' % self.doId)
|
||||||
|
if hasattr(self, 'destroyDoStackTrace'):
|
||||||
|
print self.destroyDoStackTrace
|
||||||
self.__callbacks = {}
|
self.__callbacks = {}
|
||||||
self.cr.closeAutoInterests(self)
|
self.cr.closeAutoInterests(self)
|
||||||
self.setLocation(0,0)
|
self.setLocation(0,0)
|
||||||
@ -265,6 +271,7 @@ class DistributedObject(DistributedObjectBase):
|
|||||||
def _destroyDO(self):
|
def _destroyDO(self):
|
||||||
# after this is called, the object is no longer a DistributedObject
|
# after this is called, the object is no longer a DistributedObject
|
||||||
# but may still be used as a DelayDeleted object
|
# but may still be used as a DelayDeleted object
|
||||||
|
self.destroyDoStackTrace = StackTrace()
|
||||||
self.cr = None
|
self.cr = None
|
||||||
self.dclass = None
|
self.dclass = None
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user