|Ah! My bad! :-)|
Thanks Riccardo and Daniel, that was the point!!!
On Jan 10, 2014, at 6:38 PM, Daniel Russel wrote:
Good point :-)
As a key note, always run your code through a build with checks turned on. It probably would have told you immediately that you are walking off the end of an array.
On Fri, Jan 10, 2014 at 4:49 AM, Davide Baù <" target="_blank">> wrote:
it occurs inside the loop. The loop is run inside a function:
def setup_angles(m, ps, particles):
i = 0
while (i <= particles-3):
p1 = ps.get_particle(i)
p2 = ps.get_particle(i+2)
p3 = ps.get_particle(i+3)
ar = IMP.core.AngleRestraint(IMP.core.Harmonic(0, 1), p1, p2, p3)
i += 3
As for the stack trace, I'm not totally sure about how to do it. I've done the following:
$ gdb python
(gdb) run model.py
Starting program: /usr/bin/python model.py
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff5dd5eb0 in IMP::kernel::Particle::get_index() const () from /usr/src/imp/imp-r2.1.1/lib/libimp_kernel.so
IMP-dev mailing list