Well, if it fixes your problem, at least prevents a crash, I am ok to
commit it. I don't see any regressions here.
Please, let me know.
Anton
2012/7/15 Chiara Modenese <email address hidden>:
> I found one solution but I think is a temporary fix. The problem is that
> somehow interactions are not deleted properly. Below is a modified
> version of postLoad__calledFromScene - I am checking whether both bodies
> in contact actually exist before the interaction is inserted, otherwise
> return - but is not the core solution to the bug so I will post it here
> although not commit.
>
> Chiara
>
> void InteractionContainer::postLoad__calledFromScene(const shared_ptr<BodyContainer>& bb){
> bodies=&bb->body; // update the internal pointer
> clear();
> FOREACH(const shared_ptr<Interaction>& I, interaction){
> Body::id_t id1=I->getId1(), id2=I->getId2();
> if (!(*bodies)[id1] || !(*bodies)[id2]) return;
> else insert(I);}
> interaction.clear();
> }
>
Well, if it fixes your problem, at least prevents a crash, I am ok to
commit it. I don't see any regressions here.
Please, let me know.
Anton
2012/7/15 Chiara Modenese <email address hidden>: _calledFromScen e - I am checking whether both bodies ainer:: postLoad_ _calledFromScen e(const shared_ ptr<BodyContain er>& bb){ ptr<Interaction >& I, interaction){ clear() ;
> I found one solution but I think is a temporary fix. The problem is that
> somehow interactions are not deleted properly. Below is a modified
> version of postLoad_
> in contact actually exist before the interaction is inserted, otherwise
> return - but is not the core solution to the bug so I will post it here
> although not commit.
>
> Chiara
>
> void InteractionCont
> bodies=&bb->body; // update the internal pointer
> clear();
> FOREACH(const shared_
> Body::id_t id1=I->getId1(), id2=I->getId2();
> if (!(*bodies)[id1] || !(*bodies)[id2]) return;
> else insert(I);}
> interaction.
> }
>