sirikata/sirikata — Issue #462: Delayed unloading of objects from Ogre is broken
Author: ewencp
Created: 2011-12-20 02:00:59+00:00
State: open

Currently because of the way the download planner responds to "destruction" of ProxyObjects (i.e. their removal from the parent ProxyManager), objects are removed from the scene immediately. This leads to flickering when objects are quickly removed and added.

This stacktrace demonstrates the source of the problem:

```
#0 Sirikata::Graphics::DistanceDownloadPlanner::removeObject (this=0x1928780, name="2269eefd-7894-453f-adb4-2be5a9d53166:12345678-1111-1111-1111-defa01759ace") at /home/ewencp/sirikata.sirikata/libogre/src/DistanceDownloadPlanner.cpp:117
#1 0x00007ffff4ea8f5e in Sirikata::Graphics::DistanceDownloadPlanner::removeObject (this=0x1928780, p=std::tr1::shared_ptr (count 8) 0x900e840) at /home/ewencp/sirikata.sirikata/libogre/src/DistanceDownloadPlanner.cpp:159
#2 0x00007ffff686f1a6 in Sirikata::Graphics::OgreSystem::onDestroyProxy (this=0x1b58680, p=std::tr1::shared_ptr (count 8) 0x900e840) at /home/ewencp/sirikata.sirikata/libproxyobject/plugins/ogre/OgreSystem.cpp:332
#3 0x00007ffff6cf8626 in Sirikata::Provider::notify), std::tr1::shared_ptr > (this=0x19ef000, func=&virtual table offset 24, newA=std::tr1::shared_ptr (count 8) 0x900e840) at /home/ewencp/sirikata.sirikata/libcore/incl
ude/sirikata/core/util/ListenerProvider.hpp:79
#4 0x00007ffff6cf7970 in Sirikata::ObjectHostProxyManager::destroyObject (this=0x19ef000, delObj=std::tr1::shared_ptr (count 8) 0x900e840) at /home/ewencp/sirikata.sirikata/liboh/src/ObjectHostProxyManager.cpp:71
#5 0x00007ffff6cd01a0 in Sirikata::HostedObject::handleProximityUpdate (this=0x92e7e0, spaceobj=..., update=...) at /home/ewencp/sirikata.sirikata/liboh/src/HostedObject.cpp:848
#6 0x00007ffff6d09c93 in Sirikata::OH::ObjectQueryProcessor::deliverProximityUpdate (this=0x944d20, ho=std::tr1::shared_ptr (count 34) 0x92e7e0, sporef=..., update=...) at /home/ewencp/sirikata.sirikata/liboh/src/ObjectQueryProcessor.cpp:34
#7 0x00007fffdc600ac5 in Sirikata::OH::Simple::SimpleObjectQueryProcessor::handleProximityMessage (this=0x944d20, self=std::tr1::shared_ptr (count 34) 0x92e7e0, spaceobj=..., payload="\t\326\330\343(\000\000\000\000\022\034\022\032\n\020\"i\356\375x\224E?\255\264+\345\251\325\061f\020\225\243\223\201\005\030\001") at /home/ewencp/sirikata.sirikata/liboh/plugi
ns/simple_query/SimpleObjectQueryProcessor.cpp:127
#8 0x00007fffdc60011d in Sirikata::OH::Simple::SimpleObjectQueryProcessor::handleProximitySubstreamRead (this=0x944d20, weakHO=std::tr1::weak_ptr (count 34) 0x92e7e0, spaceobj=..., s=std::tr1::shared_ptr (count 8) 0x7618c80, prevdata=0x1a58118, buffer=0x8964000 "", length=43) at /home/ewencp/sirikata.sirikata/liboh/plugins/simple_query/SimpleObjectQueryProces
sor.cpp:88
```