← Back to team overview

yade-dev team mailing list archive

[SCM] Yet Another Dynamic Engine. Platform for discrete element modeling. branch, master, updated. upstream/0.60.2-39-gbee4e48

 

The following commit has been merged in the master branch:
commit bee4e48717f6ece44559cfc8f6231bf4b3a50754
Author: Anton Gladky <gladky.anton@xxxxxxxxx>
Date:   Wed Apr 13 08:15:34 2011 +0200

    Add forgotten patch

diff --git a/debian/patches/fix_memory_wrong_accces_after_body_erase.patch b/debian/patches/fix_memory_wrong_accces_after_body_erase.patch
new file mode 100644
index 0000000..8fd9192
--- /dev/null
+++ b/debian/patches/fix_memory_wrong_accces_after_body_erase.patch
@@ -0,0 +1,23 @@
+Description: fix "wrong memory access" in CpmStateUpdater after body erase
+Author: Jan Stránský <_honzik@xxxxxxxxxx>
+Applied-Upstream: http://bazaar.launchpad.net/~yade-dev/yade/0.60/revision/2569
+Last-Update: 2011-04-13
+
+--- a/pkg/dem/ConcretePM.cpp
++++ b/pkg/dem/ConcretePM.cpp
+@@ -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());

-- 
Yet Another Dynamic Engine. Platform for discrete element modeling.