BrainTreeFragment ConcurrentModificationException please merge pull request
See original GitHub issueWe have in production a lot of “Fatal Exception” (23 in 7 days):
java.util.ConcurrentModificationException
at java.util.ArrayDeque$DeqIterator.next + 625(ArrayDeque.java:625)
at java.util.AbstractCollection.addAll + 343(AbstractCollection.java:343)
at java.util.ArrayDeque.<init> + 197(ArrayDeque.java:197)
at com.braintreepayments.api.BraintreeFragment.flushCallbacks + 726(BraintreeFragment.java:726)
at com.braintreepayments.api.BraintreeFragment.onResume + 249(BraintreeFragment.java:249)
The only part where mCallbackQueue is not syncronized is postOrQueueCallback. I suppose while make a copy of mCallbackQueue in flushCallbacks (line 726) an other thread call postOrQueueCallback
Please submit my merge request and dispose a new version.
https://github.com/braintree/braintree_android/pull/282/files
Regards Stephan
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Why is a ConcurrentModificationException thrown and how ...
This will throw a ConcurrentModificationException when the it. hasNext() is called the second time. Assuming this iterator supports the remove( ...
Read more >java.util.ConcurrentModificationException
From the output stack trace, it's clear that the concurrent modification exception is thrown when we call iterator next() function.
Read more >ConcurrentModificationException (Java Platform SE 8 )
This exception may be thrown by methods that have detected concurrent modification of an object when such modification is not permissible.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey @skauss. We released version of Android Drop-in SDK 4.5.0. This will rely on Braintree Android version 3.7.2, and has the fix you’re looking for!
Oh, I see! I will check with our team to see how quickly we can get a Drop-in release out.