You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 1, 2021. It is now read-only.
I created several molecule (all only C and H atom) and tried to crash Avogadro. VDW and Surface engine was active.
Latest OB and Avogadro.
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb41b7b90 (LWP 15493)]
0xb7d81245 in OpenBabel::OBAtom::GetVector (this=0x8337534) at atom.cpp:336
336 _v.Set((__c)[_cidx],(__c)[_cidx+1],(*_c)[_cidx+2]);
Current language: auto; currently c++
(gdb) bt
#0 0xb7d81245 in OpenBabel::OBAtom::GetVector (this=0x8337534) at atom.cpp:336 #1 0xb6732fb2 in Avogadro::VDWGridThread::run () from /home/kde-devel/kde/build/avo-git/libavogadro/src/engines/libsurfaceengine.so #2 0xb716acc7 in QThreadPrivate::start () from /usr/lib/libQtCore.so.4 #3 0xb70e6192 in start_thread () from /lib/libpthread.so.0 #4 0xb6df702e in clone () from /lib/libc.so.6
Aha. I think I understand the problem here Marcus. The molecule is going through a BeginModify/EndModify loop. Since there isn't a read/write lock across the thread, the surface engine crashes.
The correct fix is to make sure to lock the molecule against other threads when modifying it. A faster fix might be to check for OBMol::GetMod != 0.
I made some changes in svn commit 1370 that seems to have improved things in the surface engine significantly. I think that more locking is required but I will need to figure our where without locking up the whole app! Please reopen if this is still an issue - seems to be fixed here.
I created several molecule (all only C and H atom) and tried to crash Avogadro. VDW and Surface engine was active.
Latest OB and Avogadro.
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb41b7b90 (LWP 15493)]
0xb7d81245 in OpenBabel::OBAtom::GetVector (this=0x8337534) at atom.cpp:336
336 _v.Set((__c)[_cidx],(__c)[_cidx+1],(*_c)[_cidx+2]);
Current language: auto; currently c++
(gdb) bt
#0 0xb7d81245 in OpenBabel::OBAtom::GetVector (this=0x8337534) at atom.cpp:336
#1 0xb6732fb2 in Avogadro::VDWGridThread::run () from /home/kde-devel/kde/build/avo-git/libavogadro/src/engines/libsurfaceengine.so
#2 0xb716acc7 in QThreadPrivate::start () from /usr/lib/libQtCore.so.4
#3 0xb70e6192 in start_thread () from /lib/libpthread.so.0
#4 0xb6df702e in clone () from /lib/libc.so.6
Reported by: @cniehaus
The text was updated successfully, but these errors were encountered: