Dear Jeff,
I found the following issue, which seems to be a bug in EngineConcurrency.java:
In the shutdown() method, called from Encog.shutdown(), the static executor variable is set to "null". When this method is called and later during a program run, a call to setThreadCount is done (in version 3.1.0, this could be from BasicGeneticAlgorithm.java => iteration() ), the executor variable is still "null", because the initialization is never executed again and the call to executor.shutdown will fail with a null pointer exception.
I therefore suggest, to add a fix to this class:
public void setThreadCount(int t) {
if (this.executor != null)
this.executor.shutdown();
int threads = t;
Dear Jeff, I found the following issue, which seems to be a bug in EngineConcurrency.java:
In the shutdown() method, called from Encog.shutdown(), the static executor variable is set to "null". When this method is called and later during a program run, a call to setThreadCount is done (in version 3.1.0, this could be from BasicGeneticAlgorithm.java => iteration() ), the executor variable is still "null", because the initialization is never executed again and the call to executor.shutdown will fail with a null pointer exception. I therefore suggest, to add a fix to this class:
public void setThreadCount(int t) { if (this.executor != null) this.executor.shutdown(); int threads = t;
best Regards, Winfried