Multithreaded feature extraction has bug
Something is not thread safe, I get the following errors,
Exception in thread "pool-874-thread-3" java.lang.RuntimeException: java.lang.NullPointerException at edu.illinois.cs.cogcomp.srl.jlis.SRLPredicateInstance$1.run(SRLPredicateInstance.java:157) at edu.illinois.cs.cogcomp.srl.jlis.SRLPredicateInstance$1.run(SRLPredicateInstance.java:142) at edu.illinois.cs.cogcomp.core.utilities.Parallel$2.run(Parallel.java:78) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.NullPointerException at edu.illinois.cs.cogcomp.core.datastructures.textannotation.SymbolTable.getId(SymbolTable.java:39) at edu.illinois.cs.cogcomp.core.datastructures.textannotation.Constituent.<init>(Constituent.java:83) at edu.illinois.cs.cogcomp.core.datastructures.textannotation.Constituent.<init>(Constituent.java:62) at edu.illinois.cs.cogcomp.edison.features.ContextFeatureExtractor.getFeatures(ContextFeatureExtractor.java:78) at edu.illinois.cs.cogcomp.edison.features.FeatureCollection.getFeatures(FeatureCollection.java:87) at edu.illinois.cs.cogcomp.edison.features.FeatureCollection.getFeatures(FeatureCollection.java:65) at edu.illinois.cs.cogcomp.edison.features.CachedFeatureCollection.getFeatures(CachedFeatureCollection.java:33) at edu.illinois.cs.cogcomp.edison.features.FeatureCollection.getFeatures(FeatureCollection.java:87) at edu.illinois.cs.cogcomp.edison.features.FeatureCollection.getFeatures(FeatureCollection.java:65) at
Another similar error,
Exception in thread "pool-806-thread-4" java.lang.RuntimeException: java.lang.NullPointerException at edu.illinois.cs.cogcomp.srl.jlis.SRLPredicateInstance$1.run(SRLPredicateInstance.java:157) at edu.illinois.cs.cogcomp.srl.jlis.SRLPredicateInstance$1.run(SRLPredicateInstance.java:142) at edu.illinois.cs.cogcomp.core.utilities.Parallel$2.run(Parallel.java:78) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.NullPointerException at edu.illinois.cs.cogcomp.core.datastructures.textannotation.AbstractTextAnnotation.getView(AbstractTextAnnotation.java:119) at edu.illinois.cs.cogcomp.edison.features.helpers.WordHelpers.getTokenLabel(WordHelpers.java:97) at edu.illinois.cs.cogcomp.edison.features.helpers.WordHelpers.getLemma(WordHelpers.java:28) at edu.illinois.cs.cogcomp.edison.features.factory.WordFeatureExtractorFactory.getSafeLemma(WordFeatureExtractorFactory.java:359) at edu.illinois.cs.cogcomp.edison.features.factory.WordFeatureExtractorFactory.access$300(WordFeatureExtractorFactory.java:23) at
Both go away when the feature ext. uses 1 thread only.