question

Micah Koffron avatar image
Micah Koffron asked

Occasional crash (ConcurrentModificationException) in Amazon ads stack...

With the Amazon Ads SDK 5.1.40 for Android, I'm seeing some crash reports in the developer portal for the following exception (ConcurrentModificationException): java.lang.RuntimeException at android.os.AsyncTask$3.done(AsyncTask.java:299) at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:273) at java.util.concurrent.FutureTask.setException(FutureTask.java:124) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:307) at java.util.concurrent.FutureTask.run(FutureTask.java:137) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569) at java.lang.Thread.run(Thread.java:856) Caused by: java.util.ConcurrentModificationException at java.util.AbstractList$SimpleListIterator.next(AbstractList.java:62) at com.amazon.device.ads.AdMetrics.addMetricsToJSON(Unknown Source) at com.amazon.device.ads.AdMetrics.getAaxJson(Unknown Source) at com.amazon.device.ads.AdMetrics.getAaxUrl(Unknown Source) at com.amazon.device.ads.AdMetricsSubmitAaxTask.doInBackground(Unknown Source) at com.amazon.device.ads.AdMetricsSubmitAaxTask.doInBackground(Unknown Source) at android.os.AsyncTask$2.call(AsyncTask.java:287) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305) ... 5 more java.lang.RuntimeException at android.os.AsyncTask$3.done(AsyncTask.java:299) at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:273) at java.util.concurrent.FutureTask.setException(FutureTask.java:124) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:307) at java.util.concurrent.FutureTask.run(FutureTask.java:137) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569) at java.lang.Thread.run(Thread.java:856) Caused by: java.util.ConcurrentModificationException at java.util.AbstractList$SimpleListIterator.next(AbstractList.java:62) at com.amazon.device.ads.AdMetrics.addMetricsToJSON(Unknown Source) at com.amazon.device.ads.AdMetrics.getAaxJson(Unknown Source) at com.amazon.device.ads.AdMetrics.getAaxUrl(Unknown Source) at com.amazon.device.ads.AdMetricsSubmitAaxTask.doInBackground(Unknown Source) at com.amazon.device.ads.AdMetricsSubmitAaxTask.doInBackground(Unknown Source) at android.os.AsyncTask$2.call(AsyncTask.java:287) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305) ... 5 more java.util.ConcurrentModificationException at java.util.AbstractList$SimpleListIterator.next(AbstractList.java:62) at com.amazon.device.ads.AdMetrics.addMetricsToJSON(Unknown Source) at com.amazon.device.ads.AdMetrics.getAaxJson(Unknown Source) at com.amazon.device.ads.AdMetrics.getAaxUrl(Unknown Source) at com.amazon.device.ads.AdMetricsSubmitAaxTask.doInBackground(Unknown Source) at com.amazon.device.ads.AdMetricsSubmitAaxTask.doInBackground(Unknown Source) at android.os.AsyncTask$2.call(AsyncTask.java:287) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305) at java.util.concurrent.FutureTask.run(FutureTask.java:137) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569) at java.lang.Thread.run(Thread.java:856)
mobile ads
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Sujoy@Amazon avatar image
Sujoy@Amazon answered
Hi Micah, Thank you for reaching us. Your Ads SDK library seems to be out dated. The most recent version of the jar is 5.1.153 Please update the library in your app and resubmit your app. The mentioned issue should be fixed in the latest version. Thanks.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.