cryos / avogadro

Avogadro 1 is not under active development, the repository was archived in September 2021. Development of Avogadro 2 is being done at https://github.com/openchemistry/avogadrolibs. Avogadro is an advanced molecular editor designed for cross-platform use in computational chemistry, molecular modeling, bioinformatics, materials science, and related areas.
http://avogadro.cc/
GNU General Public License v2.0
332 stars 155 forks source link

Segfault looking at vibrations #572

Open cryos opened 13 years ago

cryos commented 13 years ago

If you open the attached GAMESS US file under Win7 with Avo 1.0.1 and click on Extensions/Vibrations it will segfault.

Reported by: @baoilleach

cryos commented 13 years ago

Original comment by: @baoilleach

cryos commented 13 years ago

I see,

// Sanity check // Currently disabled -- GAMESS does weird things. // if (displacementVectors.size() != m_molecule->numAtoms()) { // QMessageBox::warning(m_widget, tr("Vibrational Analysis"), tr("The computed vibrations do not match this molecule.")); // return; // }

For your molecule, in the debugger it looks like displacementVectors (from Open Babel) is of zero size. It looks like we should at least check that vector is bigger that the number of atoms (although I am not sure in which case it would be a different size).

Original comment by: @cryos

cryos commented 13 years ago

Adding back in that check prevents the crash, I think this will need fixing in Open Babel before we can actually display the vibrations in Avogadro.

Original comment by: @cryos

cryos commented 12 years ago

Bump. I confirm the crash with latest OB and Avogadro master.

Original comment by: @ghutchis