#692 getValenceElectronCount NullPointerException

cdk-1.2.x
closed
nobody
9
2012-11-03
2008-07-29
No

When calculating descriptors I keep getting NullPointerExceptions from getValenceElectronCount. Here is a sample stack trace:

java.lang.NullPointerException
at org.openscience.cdk.qsar.ChiIndexUtils.getValenceElectronCount(ChiIndexUtils.java:163)
at org.openscience.cdk.qsar.ChiIndexUtils.evalValenceIndex(ChiIndexUtils.java:146)
at org.openscience.cdk.qsar.descriptors.molecular.ChiClusterDescriptor.calculate(ChiClusterDescriptor.java:131)
at org.openscience.cdk.qsar.DescriptorEngine.process(DescriptorEngine.java:191)
at descriptors.CalculationHandler.run(CalculationHandler.java:131)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:675)

Discussion

  • Works for me in the cdk-1.2.x branch. Which version are you using? Do you have a test file which reproduces the problem?