Hi Noel and other,


I would guess it's the MOL2 reader.  If you set a breakpoint in there and
> then step through you can confirm/deny this.
>
>
Ok, you may well be right. Here is what I do:



(gdb) b OpenBabel::MOL2Format::ReadMolecule
(gdb) run


Processing 1lrh_0-NLA-1.mol2

Breakpoint 1, OpenBabel::MOL2Format::ReadMolecule (this=0x220a488,
pOb=0xbfffedb4, pConv=0xbfffebbc)
    at /opt/OPENBABEL/openbabel-2.3.2/src/src/formats/mol2format.cpp:72
72        OBMol* pmol = pOb->CastAndClear<OBMol>();

(gdb) next

Program received signal SIGSEGV, Segmentation fault.
__cxxabiv1::__dynamic_cast (src_ptr=0xbfffedb4, src_type=0x442820,
dst_type=0x442fe0, src2dst=0)
    at ../../../../libstdc++-v3/libsupc++/dyncast.cc:56
56          adjust_pointer <void> (src_ptr, prefix->whole_object);





(gdb) b CastAndClear<OpenBabel::OBMol>         #1
(gdb) b OpenBabel::MOL2Format::ReadMolecule #2
(gdb) b OpenBabel::OBConversion::Read             #3
(gdb) b OpenBabel::OBConversion::ReadFile       #4
(gdb) run

[zapping prog. output and "next" command]

Processing 1lrh_0-NLA-1.mol2

Breakpoint 4, OpenBabel::OBConversion::ReadFile (this=0xbfffebbc,
pOb=0xbfffedb4, filePath="1lrh_0-NLA-1.mol2")
    at /opt/OPENBABEL/openbabel-2.3.2/src/src/obconversion.cpp:980
980        if(!pInFormat) return false;
979      {
980        if(!pInFormat) return false;
983        InFilename = filePath;
986        if (pInStream && NeedToFreeInStream) {
990        ifstream *ifs = new ifstream;
991        NeedToFreeInStream = true; // make sure we free this
996        ifs->open(filePath.c_str(),imode);
991        NeedToFreeInStream = true; // make sure we free this
996        ifs->open(filePath.c_str(),imode);
997        if(!ifs || !ifs->good())
1003        return Read(pOb,ifs);

Breakpoint 3, OpenBabel::OBConversion::Read (this=0xbfffebbc,
pOb=0xbfffedb4, pin=0x80ef438)
    at /opt/OPENBABEL/openbabel-2.3.2/src/src/obconversion.cpp:792
792      {
793        if(pin) {
794          pInStream=pin;
795          CheckedForGzip = false; // haven't set this stream to gzip
(yet)
798        if(!pInFormat || !pInStream) return false;
804        if (!CheckedForGzip) {
805          zIn = new zlib_stream::zip_istream(*pInStream);
806          if (zIn->is_gzip()) {
811            delete zIn;
815        InstallStreamFilter();
821        locale originalLocale = pInStream->getloc(); // save the original
815        InstallStreamFilter();
818        obLocale.SetLocale();
821        locale originalLocale = pInStream->getloc(); // save the original
700        { return _M_ios_locale; }
822        locale cNumericLocale(originalLocale, "C", locale::numeric);
823        pInStream->imbue(cNumericLocale);
825        bool success = pInFormat->ReadMolecule(pOb, this);

Breakpoint 2, OpenBabel::MOL2Format::ReadMolecule (this=0x220a488,
pOb=0xbfffedb4, pConv=0xbfffebbc)
    at /opt/OPENBABEL/openbabel-2.3.2/src/src/formats/mol2format.cpp:72
72        OBMol* pmol = pOb->CastAndClear<OBMol>();

Program received signal SIGSEGV, Segmentation fault.
__cxxabiv1::__dynamic_cast (src_ptr=0xbfffedb4, src_type=0x442820,
dst_type=0x442fe0, src2dst=0)
    at ../../../../libstdc++-v3/libsupc++/dyncast.cc:56
56          adjust_pointer <void> (src_ptr, prefix->whole_object);




Is there a way to go in the function "CastAndClear"?

Trying
(gdb) b CastAndClear
or
(gdb) b CastAndClear<OpenBabel::OBMol>
is saying:
Function "CastAndClear" not defined.

it is staying "pending" and does not reach the breakpoint when running.



I'll try to set some breakpoints in the program I'm running too.

Thanks,
Pascal
------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
&#149; 3 signs your SCM is hindering your productivity
&#149; Requirements for releasing software faster
&#149; 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

Reply via email to