Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9614 in orxonox.OLD


Ignore:
Timestamp:
Jul 30, 2006, 12:31:11 PM (18 years ago)
Author:
bensch
Message:

get segfault when changing the team

the turret is reparenting:
PNode::checkIntegrity (this=0x932a408, checkParent=0x90bfd50) at p_node.h:164
164 inline PNode* getParent () const { return this→parent; };
(gdb) bt
#0 PNode::checkIntegrity (this=0x932a408, checkParent=0x90bfd50)

at p_node.h:164

#1 0x082925d5 in PNode::addChild (this=0x932a408) at p_node.cc:493
#2 0x0808a05e in TargetingTurret::fire (this=0x8ed75f8)

at targeting_turret.cc:144

#3 0x0815f2d9 in Weapon::fireW (this=0x8ed75f8) at weapon.cc:511
#4 0x0815f0d5 in Weapon::execute (this=0x102) at weapon.cc:411
#5 0x0815f182 in Weapon::tickW (this=0x1, dt=0) at weapon.cc:597
#6 0x08089b9e in TargetingTurret::tick (this=0x8ed75f8, dt=0.104750276)

at targeting_turret.cc:116

#7 0x080f7b04 in GameWorld::tick (this=0x85ada60, entityList=

{<std::_List_base<WorldEntity*,std::allocator<WorldEntity*> >> = {_M_impl = {<std::allocator<std::_List_node<WorldEntity*> >> = {<gnu_cxx::new_allocator<std::_List_node<WorldEntity*> >> = {<No data fields>}, <No data fields>}, _M_node = {_M_next = 0x90063c8, _M_prev = 0x93a9c28}}}, <No data fields>},

dt=0.104750276) at stl_list.h:131

#8 0x080f8c73 in GameWorld::tick (this=0x85ada60) at new_allocator.h:69
#9 0x080f731e in GameWorld::run (this=0x85ada60) at game_world.cc:318
#10 0x080f7245 in GameWorld::start (this=0x102) at game_world.cc:252
#11 0x080f57d8 in Campaign::run (this=0x85ad1e8) at campaign.cc:152
#12 0x080f56e1 in Campaign::start (this=0x85ad1e8) at campaign.cc:83
#13 0x0817fd98 in GameLoader::start (this=0x102) at game_loader.cc:170
#14 0x0810fb53 in Orxonox::start (this=0x8382f68) at orxonox.cc:417
#15 0x0811266b in startOrxonox (argc=4, argv=0xbf8e0894, name=@0x102, port=258)

at orxonox.cc:573

#16 0x081136e0 in startNetworkOrxonox (argc=4, argv=0xbf8e0894)

at basic_string.h:1458

#17 0x081140af in main (argc=4, argv=0xbf8e0894) at orxonox.cc:479

this manly comes from the idea, that entities are not deleted during runtime, which obviously they do :/

so the bug is in PNode and is being traced

Location:
branches/proxy/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/proxy/src/lib/coord/p_node.cc

    r9406 r9614  
    9090      if (this == PNode::nullParent && (*deleteNode)->parentMode & PNODE_REPARENT_TO_NULL)
    9191      {
    92         PRINTF(4)("%s::%s deletes %s::%s\n",
     92        PRINTF(1)("%s::%s deletes %s::%s\n",
    9393                  this->getClassCName(), this->getCName(),
    9494                  (*deleteNode)->getClassCName(), (*deleteNode)->getCName());
     
    9797      else
    9898      {
    99         PRINTF(4)("%s::%s reparents %s::%s\n",
     99        PRINTF(1)("%s::%s reparents %s::%s\n",
    100100                  this->getClassCName(), this->getCName(),
    101101                  (*deleteNode)->getClassCName(), (*deleteNode)->getCName());
     
    105105    else
    106106    {
    107       PRINTF(4)("%s::%s deletes PNode: %s::%s\n",
     107      PRINTF(1)("%s::%s deletes PNode: %s::%s\n",
    108108                this->getClassCName(), this->getCName(),
    109109                (*deleteNode)->getClassCName(), (*deleteNode)->getCName());
     
    487487void PNode::addChild (PNode* child)
    488488{
     489  if (unlikely(child->parent == this))
     490    return;
    489491  if( likely(child->parent != NULL))
    490492    child->parent->eraseChild(child);
     
    749751{
    750752  const PNode* parent = this;
     753  if (this == NULL)
     754    return true;
    751755  while ( (parent = parent->getParent()) != NULL)
    752756    if (unlikely(parent == checkParent))
  • branches/proxy/src/world_entities/weapons/targeting_turret.cc

    r9516 r9614  
    147147  pj->setAbsDir(this->getAbsDir());
    148148  pj->activate();
    149 
    150149}
    151150
Note: See TracChangeset for help on using the changeset viewer.