On 07/02/2011 12:05, Andrew Dalke wrote:
> Can someone help me understand what's wrong with my searches?
>
> % babel Compound_09425001_09450000.sdf.fs results.sdf '-sN#Cc1ccccc1C#N' 
> -at0.6
> Segmentation fault
>
> This is all with a version of Babel I compiled from version control (since I 
> want the corrected MACCS definitions)
>
> (gdb) run Compound_09425001_09450000.sdf.fs results.sdf -sN#Cc1ccccc1C#N 
> -at0.6
>    ...
> Program received signal EXC_BAD_ACCESS, Could not access memory.
> Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000000
> OpenBabel::FastSearchFormat::ObtainTarget (this=0x10148c660, 
> pConv=0x7fff5fbfeb00, patternMols=@0x7fff5fbfb9a0, indexname=@0x7fff5fbfbb30) 
> at /Users/dalke/cvses/ob/src/formats/fastsearchformat.cpp:506
> 506         if(vec[0][0]=='~')
> (gdb)
>
>
> Somehow the "-s" value is being removed?
You are right: the  -s option is emptied when used.  The -s option was 
changed from being hardwired in the API to being a plugin op with more 
features. The old version will function as before if the plugin is not 
present, but the plugin version deactivates the old version. It stores  
the option parameters internally the first time it is called and sets 
the OBConversion version of the parameters to empty, which means the 
original code does nothing.

This should normally be  transparent when using fastsearch format from 
the command line, from the GUI and from Python. But with Python it means 
that the -s option text has to be reset if the OBConversion instance is 
reused.

This works as above for me on Windows, but if it doesn't on another OS, 
let me know. I'll add code to warn and prevent the crash.

Chris






------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
OpenBabel-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

Reply via email to