yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #03978
[Bug 528509] Re: genCylLSM.py calls a crash
Ok, I found the cause by compiling without optimization:
#4 <signal handler called>
#5 0x00007f4ec5c0e800 in std::_List_base<boost::shared_ptr<Archive>, std::allocator<boost::shared_ptr<Archive> > >::_M_clear (this=0x7fffcde8adb8) at /usr/include/c++/4.4/bits/list.tcc:72
#6 0x00007f4ec5be0af1 in ~_List_base (this=0x7fffcde8adb8, __in_chrg=<value optimized out>) at /usr/include/c++/4.4/bits/stl_list.h:360
#7 0x00007f4ec5bbbb08 in ~list (this=0x7fffcde8adb8, __in_chrg=<value optimized out>) at /usr/include/c++/4.4/bits/stl_list.h:418
#8 0x00007f4ec5bbbc0b in ~Serializable (this=0x7fffcde8adb0, __in_chrg=<value optimized out>) at /home/vaclav/yade/build-trunk-dbg/include/yade-trunk/yade/lib-serialization/Serializable.hpp:261
#9 0x00007f4ec5bb2ad8 in ~Shape (this=0x7fffcde8adb0, __in_chrg=<value optimized out>) at /home/vaclav/yade/trunk/core/Shape.cpp:2
#10 0x00007f4eb614c6e2 in ~Sphere (this=0x7fffcde8adb0, __in_chrg=<value optimized out>) at pkg/common/DataClass/Shape/Sphere.cpp:13
#11 0x00007f4ea43ea258 in InsertGenerator3D::seedParticles (this=0x327bee0, vol=0x313daa0, ntable=0x313dbb0, gid=0, tag=0) at ../src/InsertGenerator3D.cc:200
[...]
Now relevant part of code at InsertGenerator3D.cc is
Sphere S(Vec3(px,py,pz),r);
/* stuff that is not important */
// line 200 is here
}
It means that the crash happens (line 200) when scope is being left.
Destructor for the S object (of type Sphere) is called. But:
#10 0x00007f4eb614c6e2 in ~Sphere (this=0x7fffcde8adb0,
__in_chrg=<value optimized out>) at
pkg/common/DataClass/Shape/Sphere.cpp:13
Dtor of _yade's_ Sphere is called instead, leading obviously to crash!
There seems to be no way to avoid that, as we have to load libs with
RTLD_GLOBAL (see py/__init__.py.in for comment on that); that also means
that even if new module (gengeo) is loaded, already existing symbol for
~Sphere will be used.
Proper solution would be to put all yade classes inside yade::
namespace, avoiding the clash. It works if done for Sphere only (hack).
I will commit that soon.
--
genCylLSM.py calls a crash
https://bugs.launchpad.net/bugs/528509
You received this bug notification because you are a member of Yade
developers, which is subscribed to Yade.
Status in Yet Another Dynamic Engine: New
Bug description:
It seems, that the function packer.generatePacking () calls a crash.
.....
InsertGenerator3D::seedParticles
bbx: -25 -25 -25 - 25 25 225
SIGSEGV/SIGABRT handler called; gdb batch file is `/tmp/yade-7ZdmxQ/tmp-0'
GNU gdb (GDB) 7.0-ubuntu
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
[Thread debugging using libthread_db enabled]
[New Thread 0x7fe71a8e4910 (LWP 30782)]
[New Thread 0x7fe71c1c4910 (LWP 30781)]
[New Thread 0x7fe71c9c5910 (LWP 30780)]
0x00007fe73308db4d in __libc_waitpid (pid=30783, stat_loc=<value optimized out>,
options=0) at ../sysdeps/unix/sysv/linux/waitpid.c:41
41 ../sysdeps/unix/sysv/linux/waitpid.c: No such file or directory.
in ../sysdeps/unix/sysv/linux/waitpid.c
No symbol "info" in current context.
Thread 4 (Thread 0x7fe71c9c5910 (LWP 30780)):
#0 sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
#1 0x00000000004cd598 in PyThread_acquire_lock (lock=0x23f3710, waitflag=128) at ../Python/thread_pthread.h:349
#2 0x000000000049c85a in PyEval_AcquireThread (tstate=0x2b41c50) at ../Python/ceval.c:253
#3 0x00000000004d0bdc in t_bootstrap (boot_raw=0x2a86e20) at ../Modules/threadmodule.c:424
#4 0x00007fe733c01a04 in start_thread (arg=<value optimized out>) at pthread_create.c:300
#5 0x00007fe7330c980d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#6 0x0000000000000000 in ?? ()
References