Hi,
I’ve been having quite a few problems with Avogadro crashing when I open
certain files, and the result of the stack trace is always of the form
shown below.
I’ve attached an example file. It’s a somewhat convoluted file as it’s the
result of some development I’m doing, but it opens fine in most other
programs I’ve tried.
My limited understanding of this, is that it’s crashing because openbabel
is try to perceive aromatic rings. I know this has bitten me several times
in the past and I’ve also helped other people debug cases of Avogadro
crashing that came down to this same bit of code.
Is it possible for me to turn off the ring perception without hacking the
code and building my own version?
I was wondering if it would it make sense to have the ring perception as
something that was done after a molecule was loaded - possibly as the
result of popping up a dialog to the user or something similar, as I’m sure
this would reduce the number of unexplained crashes that users experience?
Best wishes,
Jens
Process: Avogadro [2152]
Path: /Applications/Avogadro.app/Contents/MacOS/Avogadro
Identifier: net.sourceforge
Version: ??? (1.1.0)
Crashed Thread: 2
Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000109349fe8
VM Regions Near 0x109349fe8:
MALLOC_LARGE 0000000109248000-0000000109349000 [ 1028K]
rw-/rwx SM=PRV
–> STACK GUARD 0000000109349000-000000010934a000 [ 4K]
—/rwx SM=NUL stack guard for thread 2
Stack 000000010934a000-00000001093cc000 [ 520K]
rw-/rwx SM=COW thread 2
Application Specific Information:
objc[2152]: garbage collection is OFF
Thread 0:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fff906be67a mach_msg_trap + 10
1 libsystem_kernel.dylib 0x00007fff906bdd71 mach_msg + 73
2 com.apple.CoreFoundation 0x00007fff907fc50c
__CFRunLoopServiceMachPort + 188
3 com.apple.CoreFoundation 0x00007fff90804c74 __CFRunLoopRun + 1204
4 com.apple.CoreFoundation 0x00007fff90804486 CFRunLoopRunSpecific
- 230
5 com.apple.HIToolbox 0x00007fff93c7a2bf
RunCurrentEventLoopInMode + 277
6 com.apple.HIToolbox 0x00007fff93c8156d ReceiveNextEventCommon - 355
7 com.apple.HIToolbox 0x00007fff93c813fa
BlockUntilNextEventMatchingListInMode + 62
8 com.apple.AppKit 0x00007fff925e5779 _DPSNextEvent + 659
9 com.apple.AppKit 0x00007fff925e507d -[NSApplication
nextEventMatchingMask:untilDate:inMode:dequeue:] + 135
10 com.apple.AppKit 0x00007fff925e19b9 -[NSApplication run] - 470
11 QtGui 0x0000000100261c80
QEventDispatcherMac::processEvents(QFlagsQEventLoop::ProcessEventsFlag) +
1824
12 QtCore 0x00000001011deb94
QEventLoop::processEvents(QFlagsQEventLoop::ProcessEventsFlag) + 68
13 QtCore 0x00000001011def44
QEventLoop::exec(QFlagsQEventLoop::ProcessEventsFlag) + 324
14 QtCore 0x00000001011e162c
QCoreApplication::exec() + 188
15 net.sourceforge 0x0000000100010e3a main + 7002
16 net.sourceforge 0x0000000100003cb4 start + 52
Thread 1:: Dispatch queue: com.apple.libdispatch-manager
0 libsystem_kernel.dylib 0x00007fff906c07e6 kevent + 10
1 libdispatch.dylib 0x00007fff88bc0786 _dispatch_mgr_invoke +
923
2 libdispatch.dylib 0x00007fff88bbf316 _dispatch_mgr_thread +
54
Thread 2 Crashed:
0 libsystem_c.dylib 0x00007fff8b60462e time + 18
1 libopenbabel.4.0.0.dylib 0x0000000101472dc2
OpenBabel::expandKekulize(OpenBabel::OBMol*, int, std::vector<int,
std::allocator >&, std::vector<int, std::allocator >&,
OpenBabel::Kekulize::Timeout&) + 50
2 libopenbabel.4.0.0.dylib 0x00000001014730cd
OpenBabel::expandKekulize(OpenBabel::OBMol*, int, std::vector<int,
std::allocator >&, std::vector<int, std::allocator >&,
OpenBabel::Kekulize::Timeout&) + 829
3 libopenbabel.4.0.0.dylib 0x00000001014730cd
OpenBabel::expandKekulize(OpenBabel::OBMol*, int, std::vector<int,
std::allocator >&, std::vector<int, std::allocator >&,
OpenBabel::Kekulize::Timeout&) + 829
4 libopenbabel.4.0.0.dylib 0x00000001014730cd
OpenBabel::expandKekulize(OpenBabel::OBMol*, int, std::vector<int,
std::allocator >&, std::vector<int, std::allocator >&,
OpenBabel::Kekulize::Timeout&) + 829
5 libopenbabel.4.0.0.dylib 0x00000001014730cd
OpenBabel::expandKekulize(OpenBabel::OBMol*, int, std::vector<int,
std::allocator >&, std::vector<int, std::allocator >&,
OpenBabel::Kekulize::Timeout&) + 829
6 libopenbabel.4.0.0.dylib 0x00000001014730cd
OpenBabel::expandKekulize(OpenBabel::OBMol*, int, std::vector<int,
std::allocator >&, std::vector<int, std::allocator >&,
OpenBabel::Kekulize::Timeout&) + 829
7 libopenbabel.4.0.0.dylib 0x00000001014730cd
OpenBabel::expandKekulize(OpenBabel::OBMol*, int, std::vector<int,
std::allocator >&, std::vector<int, std::allocator >&,
OpenBabel::Kekulize::Timeout&) + 829
8 libopenbabel.4.0.0.dylib 0x00000001014730cd
OpenBabel::expandKekulize(OpenBabel::OBMol*, int, std::vector<int,
std::allocator >&, std::vector<int, std::allocator >&,
OpenBabel::Kekulize::Timeout&) + 829
9 libopenbabel.4.0.0.dylib 0x00000001014730cd
OpenBabel::expandKekulize(OpenBabel::OBMol*, int, std::vector<int,
std::allocator >&, std::vector<int, std::allocator >&,
OpenBabel::Kekulize::Timeout&) + 829
…