Bug #466
closedCrash when two threads try to add a resource request at the same time
0%
Description
[ 06-10 23:18:17.601 9340: 9448 W/System.err ]
java.lang.ArrayIndexOutOfBoundsException: length=49; index=49
[ 06-10 23:18:17.603 9340: 9448 W/System.err ]
at java.util.ArrayList.add(ArrayList.java:468)
[ 06-10 23:18:17.603 9340: 9448 W/System.err ]
at com.stoutner.privacybrowser.views.NestedScrollWebView.addResourceRequest(NestedScrollWebView.java:272)
[ 06-10 23:18:17.603 9340: 9448 W/System.err ]
at com.stoutner.privacybrowser.activities.MainWebViewActivity$13.shouldInterceptRequest(MainWebViewActivity.java:5294)
[ 06-10 23:18:17.603 9340: 9448 W/System.err ]
at android.webkit.WebViewClient.shouldInterceptRequest(WebViewClient.java:225)
Updated by Soren Stoutner over 5 years ago
The solution to this is to wrap the resource request array list in a `Collection.synchronizedList`.
https://stackoverflow.com/questions/9632387/arraylist-add-throws-arrayindexoutofboundsexception
Updated by Soren Stoutner over 5 years ago
- Status changed from New to Closed