> On Jun 25, 2019, at 12:46 PM, Jesus Hernandez Barrios <[log in to unmask]> wrote:
> Hello everyone, I'm working on a simulation about police patrols in
> the maximum coverage problem and the application throws an exception
> when I pass the mause up the streets. I would greatly appreciate the
> help, write me to the mail if you can help me,
> [log in to unmask] I attach the project to if you want to review
> the code. Greetings, Jesus.
I am in Europe on vacation for the next month with very limited internet access, and so I cannot look at this code in depth. Furthermore, you're using ShapeFileImporter, which we have made major non-backward compatible changes to recently, so compiling your code is nontrivial. Finally, always include the entire backtrace of the exception, or there's no way to determine anything.
Nonetheless, if I was to take a guess, it would be in your additional GUI code. MASON runs in two threads, the Swing thread and the model thread. While the model is running, the Swing thread cannot modify it. To guarantee this, any time your custom widgets want to make changes to the model, they should first synchronize on the Schedule.