#857 Segmentation fault writing to SMILES after deleting atom

2.3.x
closed
None
1
2013-05-11
2013-01-04
mtrsky
No

I get a segmentation fault when computing SMILES after deleting an atom from a simple molecule.

I am using openbabel 2.3.2, python 2.7

import openbabel
obc = openbabel.OBConversion()
obc.SetInAndOutFormats('smi', 'smi')
mol = openbabel.OBMol()
obc.ReadString(mol, 'CC1=C(C)C(C(=C(N1)C)C)C')
mol.DeleteAtom(mol.GetAtom(1))
obc.WriteString(mol)
---Segmentation fault-------

My current workaround is to delete the bonds to the atom I want to delete, then split the components.

Discussion

  • Noel O'Boyle

    Noel O'Boyle - 2013-05-11
    • status: open --> closed
    • assigned_to: Noel O'Boyle
     
  • Noel O'Boyle

    Noel O'Boyle - 2013-05-11

    This is now fixed in the main git repository. Thanks for reporting.