Closed cowwoc closed 13 years ago
I'm fairly sure the problem is that EvolutionMonitor,populationUpdate() is queuing events faster than Swing can execute them. A simple fix is for EvolutionMonitor,populationUpdate() to only update Swing once every 300ms.
Dan,
The above commit fixes the problem for me.
Did you fix the code or just the examples? It still hangs for me.
(watchmaker-swing-0.7.1)
The following program causes Swing to hang for me:
Main.java
StringEvaluator.java
If you modify the EvolutionMonitor renderer to return null Swing does not hang. I believe that the WatchMaker framework is "starving" the Swing thread somehow. If you add other EvolutionObservers that print to stdout the hang will disappear, again because the framework is spending less time inside the EDT.