question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

BrainTreeFragment ConcurrentModificationException please merge pull request

See original GitHub issue

We 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:closed
  • Created 4 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
scannillocommented, Dec 12, 2019

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!

0reactions
sestevenscommented, Dec 12, 2019

Oh, I see! I will check with our team to see how quickly we can get a Drop-in release out.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found