Crash when adding atoms to a molecule

Bugs item #1908252, was opened at 2008-03-05 20:33
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Interface
Group: v 0.6.0
Status: Open
Resolution: None
Priority: 7
Private: No
Submitted By: Carsten Niehaus (cniehaus)
Assigned to: Nobody/Anonymous (nobody)
Summary: Crash when adding atoms to a molecule.

Initial Comment:
gcc-Version 4.2.2 20071128
Qt 4.3.4
OpenBabel from today
Avogadro r1157

I am opening a file (a .cml file from out testfiles, doesn’t matter which). After adding atoms at random I am getting this crash, usually after the second atom is added.

100% reproducable.

(gdb) bt
#0 0xffffe410 in __kernel_vsyscall ()
#1 0xb6e455f5 in raise () from /lib/i686/
#2 0xb6e47041 in abort () from /lib/i686/
#3 0xb6e3e70e in __assert_fail () from /lib/i686/
#4 0xb719e459 in Avogadro::PrimitiveItemModel::removePrimitive () from /home/kde4/kde/build/avo/libavogadro/src/
#5 0xb719e802 in Avogadro::PrimitiveItemModel::qt_metacall () from /home/kde4/kde/build/avo/libavogadro/src/
#6 0xb730d447 in QMetaObject::activate () from /usr/lib/qt4/lib/
#7 0xb730dfb5 in QMetaObject::activate () from /usr/lib/qt4/lib/
#8 0xb71cb190 in Avogadro::Molecule::primitiveRemoved () from /home/kde4/kde/build/avo/libavogadro/src/
#9 0xb71cbf08 in Avogadro::Molecule::DestroyBond () from /home/kde4/kde/build/avo/libavogadro/src/
#10 0xb7e28358 in OpenBabel::OBMol::DeleteBond (this=0x82a83dc, bond=0x82cfadc) at mol.cpp:2700
#11 0xb7e29ad1 in OpenBabel::OBMol::DeleteHydrogen (this=0x82a83dc, atom=0x82ce594) at mol.cpp:1781
#12 0xb7e2a421 in OpenBabel::OBMol::DeleteHydrogens (this=0x82a83dc, atom=0x82cdb74) at mol.cpp:1757
#13 0xb5fb47eb in Avogadro::AddBondDrawCommand::redo () from /home/kde4/kde/build/avo/libavogadro/src/tools/
#14 0xb7199956 in Avogadro::UndoSequence::redo () from /home/kde4/kde/build/avo/libavogadro/src/
#15 0xb7be3517 in QUndoStack::push () from /usr/lib/qt4/lib/
#16 0xb71a9149 in Avogadro::GLWidget::mouseReleaseEvent () from /home/kde4/kde/build/avo/libavogadro/src/
#17 0xb77359f4 in QWidget::event () from /usr/lib/qt4/lib/
#18 0xb7d6467d in QGLWidget::event () from /usr/lib/qt4/lib/
#19 0xb71a9270 in Avogadro::GLWidget::event () from /home/kde4/kde/build/avo/libavogadro/src/
#20 0xb76ef1c2 in QApplicationPrivate::notify_helper () from /usr/lib/qt4/lib/
#21 0xb76f5e18 in QApplication::notify () from /usr/lib/qt4/lib/
#22 0xb72fb378 in QCoreApplication::notifyInternal () from /usr/lib/qt4/lib/
#23 0xb774845d in QTreeView::scrollTo () from /usr/lib/qt4/lib/
#24 0xb7747b5c in QApplication::x11ProcessEvent () from /usr/lib/qt4/lib/
#25 0xb776b91a in QTreeView::scrollTo () from /usr/lib/qt4/lib/
#26 0xb72fa7e3 in QEventLoop::processEvents () from /usr/lib/qt4/lib/
#27 0xb72fa8ea in QEventLoop::exec () from /usr/lib/qt4/lib/
#28 0xb72fcc46 in QCoreApplication::exec () from /usr/lib/qt4/lib/
#29 0xb76ee884 in QApplication::exec () from /usr/lib/qt4/lib/
#30 0x08071506 in main ()

You can respond by visiting: