[yade] 02/03: Fix crash during testing.

Anton Gladky gladk at moszumanska.debian.org
Wed Aug 24 18:21:42 UTC 2016


This is an automated email from the git hooks/post-receive script.

gladk pushed a commit to branch master
in repository yade.

commit 9525172eb64ba10b9d9b74980e498bbe73f97e03
Author: Anton Gladky <gladk at debian.org>
Date:   Wed Aug 24 20:13:51 2016 +0200

    Fix crash during testing.
---
 debian/patches/06_fixCrash.patch | 26 ++++++++++++++++++++++++++
 debian/patches/series            |  1 +
 debian/rules                     |  4 +---
 3 files changed, 28 insertions(+), 3 deletions(-)

diff --git a/debian/patches/06_fixCrash.patch b/debian/patches/06_fixCrash.patch
new file mode 100644
index 0000000..148dcf4
--- /dev/null
+++ b/debian/patches/06_fixCrash.patch
@@ -0,0 +1,26 @@
+From 07940b52ac31597c07d9d98f2891311d7e6d8e0e Mon Sep 17 00:00:00 2001
+From: Anton Gladky <gladky.anton at gmail.com>
+Date: Wed, 24 Aug 2016 18:27:21 +0200
+Subject: [PATCH] Increase the size of force container.
+
+Prevents crashes, when the simulation is loaded
+with O.load, but force container is not large
+enough to keep all bodies.
+---
+ pkg/common/InsertionSortCollider.cpp | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/pkg/common/InsertionSortCollider.cpp b/pkg/common/InsertionSortCollider.cpp
+index 8914b96..4206391 100644
+--- a/pkg/common/InsertionSortCollider.cpp
++++ b/pkg/common/InsertionSortCollider.cpp
+@@ -221,6 +221,9 @@ void InsertionSortCollider::action(){
+ 		}
+ 		if(minima.size()!=(size_t)3*nBodies){ minima.resize(3*nBodies); maxima.resize(3*nBodies); }
+ 		assert((size_t)BB[0].size==2*scene->bodies->size());
++		
++		//Increase the size of force container.
++		scene->forces.addMaxId(2*scene->bodies->size());
+ 
+ 		// update periodicity
+ 		assert(BB[0].axis==0); assert(BB[1].axis==1); assert(BB[2].axis==2);
diff --git a/debian/patches/series b/debian/patches/series
index e58712f..bbfdb86 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 01_remove_google_analytics.patch
 05_reproducible-builds.patch
+06_fixCrash.patch
diff --git a/debian/rules b/debian/rules
index dd5b856..2f6779c 100755
--- a/debian/rules
+++ b/debian/rules
@@ -43,9 +43,7 @@ override_dh_auto_install:
 	help2man $(tmpInstall)/usr/bin/yade > yade.1
 	help2man $(tmpInstall)/usr/bin/yade-batch > yade-batch.1
 	$(tmpInstall)/usr/bin/yade --test
-#ifeq (,$(filter $(DEB_HOST_ARCH), mips mipsel))
-#	$(tmpInstall)/usr/bin/yade --check
-#endif
+	$(tmpInstall)/usr/bin/yade --check
 	dh_numpy
 ifeq ($(BUILD_DOC), yes)
 	#Generate docs

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/yade.git



More information about the debian-science-commits mailing list