Commit 9525172e authored by Anton Gladky's avatar Anton Gladky

Fix crash during testing.

parent c982cf07
From 07940b52ac31597c07d9d98f2891311d7e6d8e0e Mon Sep 17 00:00:00 2001
From: Anton Gladky <gladky.anton@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);
01_remove_google_analytics.patch
05_reproducible-builds.patch
06_fixCrash.patch
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment