I am currently working on a project that is basically a projectile motion simulation with a user interface.
The original version did not use any threads and simply took the data that was entered in by the user and performed the computations on that data in order to run the simulation.
Well the program would run incredibly slow and sometimes crash. After some research, I realized I had to use a new
thread to handle the computations that was slowing down the program.
But now when I run the new version of the program, I get a StackOverflowError. I believe these sorts of errors have to do with infinitely running loops, and loops that are never exited?
But the while loop that I have has a condition that should exit itself.
Why am I getting this error, and how could I go about resolving the issue?
Here is the code:
And here are the errors that I am getting: