I would guess it's the MOL2 reader. If you set a breakpoint in there and
then step through you can confirm/deny this.
- Noel
On 8 May 2014 11:02, Pascal Muller <pascal.jm.mul...@gmail.com> wrote:
> Hi,
>
>
> > - 2.3.2 and 2.3.90 : segfault (I have some gdb backtrace, hinting to
> > mol2format.cpp or malloc.c, if anybody if able to read that output)
> > - 2.2.3, 2.3.0 and 2.3.1: openbabel seems to be unable to open the file
> > (although the C++ program can read it without any problem).
>
> You might get more useful information if you run your program from
>>> valgrind instead of gdb (or valgrind with option "--db-attach=yes" to
>>> get the best of both).
>>>
>>>
>>
> I'm still stuck with the segfault error, so below is the valgring output,
> but I'm not sure where I should look now (my C++ program? trying an other
> version of libstdc++? looking for a bug in openbabel .cpp or .h files?), if
> anybody may have a hint:
>
>
> ==4279== Invalid read of size 4
> ==4279== at 0x93665D: __dynamic_cast (in /usr/lib/libstdc++.so.6.0.13)
> ==4279== by 0x5CFBF05:
> OpenBabel::MOL2Format::ReadMolecule(OpenBabel::OBBase*,
> OpenBabel::OBConversion*) (base.h:278)
> T* CastAndClear(bool clear=true)
> {
> T* pOb = dynamic_cast<T*>(this); # line 278
> if(pOb && clear)// Clear only if this is of target class
> Clear();
>
> ==4279== by 0x424D7B0:
> OpenBabel::OBConversion::Read(OpenBabel::OBBase*, std::istream*)
> (obconversion.cpp:825)
> pInStream->imbue(cNumericLocale);
>
> bool success = pInFormat->ReadMolecule(pOb, this); # line 825
> // return the C locale to the original one
> obLocale.RestoreLocale();
>
>
> ==4279== by 0x424DB05:
> OpenBabel::OBConversion::ReadFile(OpenBabel::OBBase*, std::string)
> (obconversion.cpp:1003)
> }
>
> return Read(pOb,ifs); # line 1003
> }
>
> ==4279== by 0x8082D40: main
> ==4279== Address 0xfffffff8 is not stack'd, malloc'd or (recently) free'd
>
>
> gdb output at this step (compared to valgrind, is additionnally citing
> "mol2format.cpp:72"):
>
> #0 adjust_pointer<void> (src_ptr=0xbecb2c94, src_type=0x4340820,
> dst_type=0x4340fe0, src2dst=0)
> at ../../../../libstdc++-v3/libsupc++/tinfo.h:77
> #1 __cxxabiv1::__dynamic_cast (src_ptr=0xbecb2c94, src_type=0x4340820,
> dst_type=0x4340fe0, src2dst=0)
> at ../../../../libstdc++-v3/libsupc++/dyncast.cc:56
> #2 0x05cfbf06 in CastAndClear<OpenBabel::OBMol> (this=0x5d00488,
> pOb=0xbecb2c94, pConv=0xbecb2a9c)
> at /opt/OPENBABEL/openbabel-2.3.2/src/include/openbabel/base.h:278
> #3 OpenBabel::MOL2Format::ReadMolecule (this=0x5d00488, pOb=0xbecb2c94,
> pConv=0xbecb2a9c)
> at /opt/OPENBABEL/openbabel-2.3.2/src/src/formats/mol2format.cpp:72
> #4 0x0424d7b1 in OpenBabel::OBConversion::Read (this=0xbecb2a9c,
> pOb=0xbecb2c94, pin=0x56283a0)
> at /opt/OPENBABEL/openbabel-2.3.2/src/src/obconversion.cpp:825
> #5 0x0424db06 in OpenBabel::OBConversion::ReadFile (this=0xbecb2a9c,
> pOb=0xbecb2c94, filePath="1lrh_0-NLA-1.mol2")
> at /opt/OPENBABEL/openbabel-2.3.2/src/src/obconversion.cpp:1003
> #6 0x08082d41 in main ()
>
>
>
>
> ==4279==
> ==4279==
> ==4279== Process terminating with default action of signal 11 (SIGSEGV)
> ==4279== Access not within mapped region at address 0xFFFFFFF8
> ==4279== at 0x93665D: __dynamic_cast (in /usr/lib/libstdc++.so.6.0.13)
> ==4279== by 0x5CFBF05:
> OpenBabel::MOL2Format::ReadMolecule(OpenBabel::OBBase*,
> OpenBabel::OBConversion*) (base.h:278)
> ==4279== by 0x424D7B0:
> OpenBabel::OBConversion::Read(OpenBabel::OBBase*, std::istream*)
> (obconversion.cpp:825)
> ==4279== by 0x424DB05:
> OpenBabel::OBConversion::ReadFile(OpenBabel::OBBase*, std::string)
> (obconversion.cpp:1003)
> ==4279== by 0x8082D40: main
>
>
>
>
> Many thanks,
> Regards,
> Pascal
>
>
> ------------------------------------------------------------------------------
> Is your legacy SCM system holding you back? Join Perforce May 7 to find
> out:
> • 3 signs your SCM is hindering your productivity
> • Requirements for releasing software faster
> • Expert tips and advice for migrating your SCM now
> http://p.sf.net/sfu/perforce
> _______________________________________________
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
>
>
------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
• 3 signs your SCM is hindering your productivity
• Requirements for releasing software faster
• Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss