[Android] ConcurrentModification exception for frameMetricsAggregator
See original GitHub issueEnvironment
How do you use Sentry? sentry.io
Which SDK and version? Sentry react native. 3.0.0
Steps to Reproduce
Some of the app launches show following stack trace:
java.util.ConcurrentModificationException: null
at java.util.ArrayList$Itr.next(ArrayList.java:860)
at android.view.View.registerPendingFrameMetricsObservers(View.java:6363)
at android.view.View.dispatchAttachedToWindow(View.java:17755)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3417)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1932)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1647)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7595)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:988)
at android.view.Choreographer.doCallbacks(Choreographer.java:800)
at android.view.Choreographer.doFrame(Choreographer.java:713)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:974)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:6977)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:528)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:910)
Expected Result
No error
Here is my reasoning:
RNSentryModule
is the only package registering frameMetricsAggregator
.
I think the temp fix would be to disable perf tracking via turning off enableAutoPerformanceTracking
,
but this seems like something worth looking into.
Actual Result
java.util.ConcurrentModificationException: null
at java.util.ArrayList$Itr.next(ArrayList.java:860)
at android.view.View.registerPendingFrameMetricsObservers(View.java:6363)
at android.view.View.dispatchAttachedToWindow(View.java:17755)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3417)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1932)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1647)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7595)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:988)
at android.view.Choreographer.doCallbacks(Choreographer.java:800)
at android.view.Choreographer.doFrame(Choreographer.java:713)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:974)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:6977)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:528)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:910)
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
How to handle ConcurrentModificationException in Android
ConcurrentModificationException . First I tried to remove them by array_list_name.remove(i) , but it failed and some people were asked to use Iterator instead....
Read more >ConcurrentModificationException - Android Developers
Fail-fast operations throw ConcurrentModificationException on a best-effort basis. ... Constructs a ConcurrentModificationException with no detail message.
Read more >ac5fe7c617c66850fff75a9fce997...
diff --git a/annotations/external-annotations/android/support/annotation/annotations.xml ... ConcurrentModificationException; -import java.util.
Read more >java.util.ConcurrentModificationException at ... - Issue Tracker
Jumping on this about #4 as I was about to open an issue about the lack of such annotation. With android Fragment 1.5.2...
Read more >ConcurrentModificationException : r/Kotlin - Reddit
I'm getting stuck at this ConcurrentModificationException error. ... apk.sh, make reverse engineering Android apps easier!
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
Since it is a race condition, it is hard to reporduce, we get about 1 events for every 1k users. More over releasing with disabled auto perf tracking, fixed the issue for us. Zero issues since this disabling. Requesting you to investigate the same.
thanks @jayshah-swiggy we will have a look