Steps to reproduce
- Choose any sorting algorithm.
- Choose any array size.
- Run the sort.
- After the sort has counted elements (each element twice has been
#FF4646), press the "SORTING..." button. If pressed in the correct timing, the app can behave in undefined ways.
P.S. See attached image1 for example of what might happen.
Result
If pressed in the correct timing, the app stops working. Pressing "SORT" button (if possible at all) does not affect the problem, but rethrows the exception. See image1 for the error when button is pressed second time (the error is the same).