As for me, it is ok. We have already fixed some similar bugs in different parts of code. But they still persist and should be fixed.
Anton 2011/4/8 Jan Stránský <[email protected]>: > > Hello, > > when erasing bodies by function O.bodies.erase(id) I got errors (wrong memory > access). So I added if(!interaction) continue; and if(!body) continue; to > FOREACH loops in CpmStateUpdater, then it was OK. Is there some more generic > fix? > thanks > Jan > > ______________________________________________________________ >> Od: [email protected] >> Komu: Yade developers <[email protected]> >> Datum: 08.04.2011 08:33 >> Předmět: [Yade-dev] [Branch ~yade-dev/yade/trunk] Rev 2809: Little >> changesinCpmStateUpdater >> >>------------------------------------------------------------ >>revno: 2809 >>committer: Jan Stransky <[email protected]> >>branch nick: yade >>timestamp: Fri 2011-04-08 08:31:21 +0200 >>message: >> Little changes in CpmStateUpdater >>modified: >> pkg/dem/ConcretePM.cpp >> >> >>-- >>lp:yade >>https://code.launchpad.net/~yade-dev/yade/trunk >> >>Your team Yade developers is subscribed to branch lp:yade. >>To unsubscribe from this branch go to >>https://code.launchpad.net/~yade-dev/yade/trunk/+edit-subscription >> >>=== modified file 'pkg/dem/ConcretePM.cpp' >>--- pkg/dem/ConcretePM.cpp 2010-12-21 12:19:50 +0000 >>+++ pkg/dem/ConcretePM.cpp 2011-04-08 06:31:21 +0000 >>@@ -394,6 +394,7 @@ >> assert(bodyStats[0].nCohLinks==0); // should be initialized by dfault >> ctor >> avgRelResidual=0; Real nAvgRelResidual=0; >> FOREACH(const shared_ptr<Interaction>& I, *scene->interactions){ >>+ if(!I) continue; >> if(!I->isReal()) continue; >> shared_ptr<CpmPhys> >> phys=dynamic_pointer_cast<CpmPhys>(I->phys); >> if(!phys) continue; >>@@ -421,6 +422,7 @@ >> nAvgRelResidual+=1; >> } >> FOREACH(shared_ptr<Body> B, *scene->bodies){ >>+ if (!B) continue; >> const Body::id_t& id=B->getId(); >> // add damaged contacts that have already been deleted >> CpmState* state=dynamic_cast<CpmState*>(B->state.get()); >> >> >>_______________________________________________ >>Mailing list: https://launchpad.net/~yade-dev >>Post to : [email protected] >>Unsubscribe : https://launchpad.net/~yade-dev >>More help : https://help.launchpad.net/ListHelp >> >> > > _______________________________________________ > Mailing list: https://launchpad.net/~yade-dev > Post to : [email protected] > Unsubscribe : https://launchpad.net/~yade-dev > More help : https://help.launchpad.net/ListHelp > _______________________________________________ Mailing list: https://launchpad.net/~yade-dev Post to : [email protected] Unsubscribe : https://launchpad.net/~yade-dev More help : https://help.launchpad.net/ListHelp

