Indigo
Indigo copied to clipboard
Calling molecularWeight() on an invalid isotope kills the JVM when called from Java
Indigo indigo = new Indigo();
IndigoObject mol = indigo.loadMolecule("[60C]");
double mw = mol.molecularWeight();
System.out.println(mw);
Crashes the JVM on v1.5.0 and v1.6.1 due to:
terminate called after throwing an instance of 'indigo::Element::Error'
what(): element: getRelativeIsotopicMass: isotope (C, 60) not found
On v1.4.3 it gives acceptable behaviour:
Exception in thread "main" com.epam.indigo.IndigoException: element: getRelativeIsotopicMass: isotope (C, 60) not found
at com.epam.indigo.Indigo.checkResultDouble(Indigo.java:119)
at com.epam.indigo.IndigoObject.molecularWeight(IndigoObject.java:801)
Thanks for reporting this @dan2097, let me take a look at it
Dear @dan2097, The issue is fixed. We'll deliver fixed version 1.6.2 during this weekend.