Hi Tim,

I recently updated to latest trunk and I'm getting a segfault which
seems to be due to some problem in ring.cpp (but I could be wrong).
The segfault is triggered by GetParent() Line 606 in ring.cpp which
does not return a valid molecule. I'd appreciate if you could look
into it.

Here's the code to reproduce it:

  OBConversion conv;
  OB_REQUIRE( conv.SetInFormat("sdf") );

  OBMol mol;
  OB_REQUIRE( conv.ReadFile(&mol, GetFilename("tmp.sdf")) );

  OBBuilder builder;
  builder.Build(mol);

  mol.AddHydrogens();

  OBForceField* pff = OBForceField::FindType("mmff94");
  OB_REQUIRE(pff->Setup(mol)); // Segfault

This passes with r3799 (prior to all of the LSSR changes, etc.), but
segfaults with the HEAD. If the builder lines are commented out,
there's no segfault.

The test case is attached.

- Noel

Attachment: tmp.sdf
Description: Binary data

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
OpenBabel-Devel mailing list
OpenBabel-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-devel

Reply via email to