Hi,
When running the example java file, included on the OB homepage, on Linux 64
bit and Java 7, the Java virtual machine crashes, seemingly due to an error
in the native code.
The output starts by printing out the following line:
Canonical SMILES: The molecular weight is 0.0
.and crashes afterwards printing this:
Problematic frame:
# C [libopenbabel.so+0x11d4ff]
OpenBabel::OBMol::NextAtom(__gnu_cxx::__normal_iterator<OpenBabel::OBAtom**,
std::vector<OpenBabel::OBAtom*, std::allocator<OpenBabel::OBAtom*> > >&)+0xf
Inspection of the written log file does not enlighten me very much. Maybe
the most interesting part is the stack trace:
Stack: [0x0000000040000000,0x0000000040101000], sp=0x00000000400ff998,
free space=1022k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native
code)
C [libopenbabel.so+0x11d4ff]
OpenBabel::OBMol::NextAtom(__gnu_cxx::__normal_iterator<OpenBabel::OBAtom**,
std::vector<OpenBabel::OBAtom*, std::allocator<OpenBabel::OBAtom*> > >&)+0xf
j org.openbabel.OBMolAtomIter.inc()Lorg/openbabel/OBMolAtomIter;+9
j org.openbabel.OBMolAtomIter.next()Lorg/openbabel/OBAtom;+6
j org.openbabel.OBMolAtomIter.next()Ljava/lang/Object;+1
j Test.main([Ljava/lang/String;)V+122
v ~StubRoutines::call_stub
V [libjvm.so+0x551945] JavaCalls::call_helper(JavaValue*, methodHandle*,
JavaCallArguments*, Thread*)+0x355
V [libjvm.so+0x550468] JavaCalls::call(JavaValue*, methodHandle,
JavaCallArguments*, Thread*)+0x28
V [libjvm.so+0x5649ca] jni_invoke_static(JNIEnv_*, JavaValue*, _jobject*,
JNICallType, _jmethodID*, JNI_ArgumentPusher*, Thread*)+0x20a
V [libjvm.so+0x570f12] jni_CallStaticVoidMethod+0x162
C [libjli.so+0x36d9] JavaMain+0x7e9
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j
org.openbabel.openbabel_javaJNI.OBMolAtomIter_inc__SWIG_0(JLorg/openbabel/OB
MolAtomIter;)J+0
j org.openbabel.OBMolAtomIter.inc()Lorg/openbabel/OBMolAtomIter;+9
j org.openbabel.OBMolAtomIter.next()Lorg/openbabel/OBAtom;+6
j org.openbabel.OBMolAtomIter.next()Ljava/lang/Object;+1
j Test.main([Ljava/lang/String;)V+122
v ~StubRoutines::call_stub
I think I successfully compiled and installed OB, including the java
bindings given the lack of error messages during the installation process.
Also, quick inspection of missing dependencies for the library files did not
yield anything peculiar.
The example file was launched by a script in which many of the environment
vars were set:
export OB_LIBDIR=$HOME/OB/openbabel-install/lib
export OB_JAVADIR=$HOME/openbabel-2.3.2/scripts/java
export LD_LIBRARY_PATH=$OB_JAVADIR:$OB_LIBDIR
export CLASSPATH=.:$OB_JAVADIR/openbabel.jar
export BABEL_LIBDIR=$OB_LIBDIR
export BABEL_DATADIR=$HOME/openbabel-2.3.2/data
java -Xmx256M -cp $CLASSPATH Test
Are there any suggestions to fix this? Or any suggestions in getting more
diagnostic information that could indicate some more useful stuff?
Regards,
Nick
------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss