8bhsolutions edited a comment on issue #924: URL: https://github.com/apache/cordova-android/issues/924#issuecomment-708140472
@breautek @EinfachHans I've fixed this issue in my own fork. The issue is caused by cordova plugin's that use different threads to perform there executions. When they complete their action, some times the iterators are changed, causing the `ConcurrentModificationException`. Example plugins: Cordova Google Map, Splashscreen, etc... My initial thought was using `Collection.synchronizedMap` was sufficient, but the exception still occurs in productions. Only by wrapping all the `for loops` inside `synchronized` keyword fixes the issue. Note the downside of doing this is that your app load may be abit slow as now the plugins different threads need to wait for the threads of another plugin. The 2 changesets that fix this problem. Feel free to use as you see fit. https://github.com/8bhsolutions/cordova-android/commit/9d322237108dfdff391f67a9c7c78f9279866417 https://github.com/8bhsolutions/cordova-android/commit/1841789e1afcba592a20ccf03ddf33149426527f ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
