On 2012-10-17 15:15, David van der Spoel wrote:
> Hi,
>
> I've done some G2 calculations on small molecules using Gaussian, and
> each of these files contains 7 calculations. Babel crashes when trying
> to read this:
>
> % curl http://folding.bmc.uu.se/222-trichloroethanol-g2.log >
> 222-trichloroethanol-g2.log
>
> % babel -ig09 222-trichloroethanol-g2.log -osdf koko.sdf
> Segmentation fault
>
> % babel -v
> No output file or format spec!
> Open Babel 2.3.1 -- Oct  4 2012 -- 19:42:21
>
> Stack dump:
> Program received signal EXC_BAD_ACCESS, Could not access memory.
> Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000000
> 0x00007fff8c1c54f0 in strlen ()
> (gdb) where
> #0  0x00007fff8c1c54f0 in strlen ()
> #1  0x00007fff8bbda6d3 in std::string::operator+= ()
> #2  0x00000001015e0bdf in OpenBabel::GaussianOutputFormat::ReadMolecule ()
> #3  0x00000001000f9135 in OpenBabel::OBMoleculeFormat::ReadChemObjectImpl ()
> #4  0x00000001002738a4 in OpenBabel::OBMoleculeFormat::ReadChemObject ()
> #5  0x00000001000b4804 in OpenBabel::OBConversion::Convert ()
> #6  0x00000001000b4a91 in OpenBabel::OBConversion::Convert ()
> #7  0x00000001000b5020 in OpenBabel::OBConversion::FullConvert ()
> #8  0x0000000100002f44 in main ()
>
> Is this a know problem?

The problem is due to a call to strchr at line 326 of gaussformat.cpp 
the result of which is not checked but assumed to be correct.

comment += strchr(buffer,'=')+2;


>
> Is this kind of file supposed to be supported, including reading energy
> terms etc.?
>
> Thanks,
>


-- 
David van der Spoel, Ph.D., Professor of Biology
Dept. of Cell & Molec. Biol., Uppsala University.
Box 596, 75124 Uppsala, Sweden. Phone:  +46184714205.
sp...@xray.bmc.uu.se    http://folding.bmc.uu.se

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

Reply via email to