← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-pkg/yade/git-trunk] Rev 4143: Fix crash after removal of the whole clump.

 

------------------------------------------------------------
revno: 4143
committer: Anton Gladky <gladky.anton@xxxxxxxxx>
timestamp: Tue 2014-08-19 00:44:44 +0200
message:
  Fix crash after removal of the whole clump.
  
  This is one more fix for LP:1354433.
  Added regression test to checkClumpHopper.
  
  Thanks to Medack for pointing this out.
modified:
  core/BodyContainer.cpp
  scripts/checks-and-tests/checks/checkClumpHopper.py


--
lp:yade
https://code.launchpad.net/~yade-pkg/yade/git-trunk

Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-pkg/yade/git-trunk/+edit-subscription
=== modified file 'core/BodyContainer.cpp'
--- core/BodyContainer.cpp	2014-08-11 18:27:43 +0000
+++ core/BodyContainer.cpp	2014-08-18 22:44:44 +0000
@@ -50,6 +50,8 @@
 				Body::byId(memberId)->clumpId=Body::ID_NONE; // make members standalones
 			}
 		}
+		body[id].reset();
+		return true;
 	}
 	const shared_ptr<Scene>& scene=Omega::instance().getScene();
 	for(Body::MapId2IntrT::iterator it=b->intrs.begin(),end=b->intrs.end(); it!=end; ++it) {  //Iterate over all body's interactions

=== modified file 'scripts/checks-and-tests/checks/checkClumpHopper.py'
--- scripts/checks-and-tests/checks/checkClumpHopper.py	2014-08-12 19:46:58 +0000
+++ scripts/checks-and-tests/checks/checkClumpHopper.py	2014-08-18 22:44:44 +0000
@@ -74,4 +74,7 @@
 		O.pause()
 
 addBodies()
+O.run(10, True)
+O.bodies.erase(64, True)
+
 O.run(50002, True)