ConcurrentModificationException in ClustersBuilder.addAll()
carltonwhitehead opened this issue · comments
java.lang.RuntimeException: An error occured while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:299)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:352)
at java.util.concurrent.FutureTask.setException(FutureTask.java:219)
at java.util.concurrent.FutureTask.run(FutureTask.java:239)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
at java.lang.Thread.run(Thread.java:856)
Caused by: java.util.ConcurrentModificationException
at java.util.ArrayList$ArrayListIterator.next(ArrayList.java:569)
at com.twotoasters.clusterkraf.ClustersBuilder.addAll(ClustersBuilder.java:54)
at com.twotoasters.clusterkraf.ClusteringTask.doInBackground(ClusteringTask.java:34)
at com.twotoasters.clusterkraf.ClusteringTask.doInBackground(ClusteringTask.java:1)
at android.os.AsyncTask$2.call(AsyncTask.java:287)
at java.util.concurrent.FutureTask.run(FutureTask.java:234)
... 3 more
Created in response to a crash report received on Google Play
- Date: May 2, 2013
- Version: 1.0.1
- Device: Galaxy Nexus
- User Message: force closes
If you experienced this error, please comment if this description matches your experience.
Steps to reproduce (library / abstract)
- Trigger a clustering task.
- While the clusters are building, call
clusterkraf.clear()
Steps to reproduce (Sample app)
- Start Clusterkraf Sample and go to Advanced Mode tab
- Choose Geographic Distribution of Randomized Points: Worldwide
- Choose Points: 25,000
- Choose Expand Bounds Factor (Overdraw): 1.0
- Tap Start Advanced Mode
- Wait for the initial clustering pass to finish
- Move the camera
- Immediately tap the device back button or ActionBar up indicator
Steps 2-4 and 6 are not necessarily required, but will make it easier to repeat the problem, as they will increase the time spent in the problem code.
Sample app expected behavior
Sample Activity finishes, leaving the user at the MainActivity / Advanced Mode settings list
Sample app actual behavior
Sample app crashes