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.

Android crash: This dynamic value has been recycled

See original GitHub issue

I’m seeing this crash log on Android in production since updating to ^7.0.0. I’m not sure how to reproduce locally but it comes a svg component that is animated using native animated. However I can’t reproduce the crash reliably so there must be some kind of race condition, it happens rather rarely, ~20 instances in the past week for a few thousand users.

I noticed the implementation uses shadow nodes to save the svg data but if I understand correctly it could just be normal uithread view manager props. Shadow nodes run on a different thread so it might be what causes this race condition.

Here’s the full stacktrace if that can be useful, the interesting part is the inner exception.

JSApplicationIllegalArgumentException
Error while updating property 'stroke' of a view managed by: RNSVGRect
com.facebook.react.uimanager.ViewManagersPropertyCache$PropSetter in updateViewProp at line 95
com.facebook.react.uimanager.ViewManagerPropertyUpdater$FallbackViewManagerSetter in setProperty at line 132
com.facebook.react.uimanager.ViewManagerPropertyUpdater in updateProps at line 51
com.facebook.react.uimanager.ViewManager in updateProperties at line 34
com.facebook.react.uimanager.NativeViewHierarchyManager in createView at line 269
com.facebook.react.uimanager.UIViewOperationQueue$CreateViewOperation in execute at line 200
com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback in dispatchPendingNonBatchedOperations at line 1105
com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback in doFrameGuarded at line 1076
com.facebook.react.uimanager.GuardedFrameCallback in doFrame at line 29
com.facebook.react.modules.core.ReactChoreographer$ReactChoreographerDispatcher in doFrame at line 134
com.facebook.react.modules.core.ChoreographerCompat$FrameCallback$1 in doFrame at line 105
android.view.Choreographer$CallbackRecord in run at line 869
android.view.Choreographer in doCallbacks at line 683
android.view.Choreographer in doFrame at line 616
android.view.Choreographer$FrameDisplayEventReceiver in run at line 857
android.os.Handler in handleCallback at line 751
android.os.Handler in dispatchMessage at line 95
android.os.Looper in loop at line 154
android.app.ActivityThread in main at line 6154
java.lang.reflect.Method in invoke
com.android.internal.os.ZygoteInit$MethodAndArgsCaller in run at line 867
com.android.internal.os.ZygoteInit in main at line 757
InvocationTargetException
java.lang.reflect.Method in invoke
com.facebook.react.uimanager.ViewManagersPropertyCache$PropSetter in updateViewProp at line 83
com.facebook.react.uimanager.ViewManagerPropertyUpdater$FallbackViewManagerSetter in setProperty at line 132
com.facebook.react.uimanager.ViewManagerPropertyUpdater in updateProps at line 51
com.facebook.react.uimanager.ViewManager in updateProperties at line 34
com.facebook.react.uimanager.NativeViewHierarchyManager in createView at line 269
com.facebook.react.uimanager.UIViewOperationQueue$CreateViewOperation in execute at line 200
com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback in dispatchPendingNonBatchedOperations at line 1105
com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback in doFrameGuarded at line 1076
com.facebook.react.uimanager.GuardedFrameCallback in doFrame at line 29
com.facebook.react.modules.core.ReactChoreographer$ReactChoreographerDispatcher in doFrame at line 134
com.facebook.react.modules.core.ChoreographerCompat$FrameCallback$1 in doFrame at line 105
android.view.Choreographer$CallbackRecord in run at line 869
android.view.Choreographer in doCallbacks at line 683
android.view.Choreographer in doFrame at line 616
android.view.Choreographer$FrameDisplayEventReceiver in run at line 857
android.os.Handler in handleCallback at line 751
android.os.Handler in dispatchMessage at line 95
android.os.Looper in loop at line 154
android.app.ActivityThread in main at line 6154
java.lang.reflect.Method in invoke
com.android.internal.os.ZygoteInit$MethodAndArgsCaller in run at line 867
com.android.internal.os.ZygoteInit in main at line 757
IllegalStateException
This dynamic value has been recycled
com.facebook.react.bridge.DynamicFromMap in asString at line 78
com.horcrux.svg.RenderableShadowNode in setStroke at line 139
com.horcrux.svg.RenderableViewManager in setStroke at line 723
java.lang.reflect.Method in invoke
com.facebook.react.uimanager.ViewManagersPropertyCache$PropSetter in updateViewProp at line 83
com.facebook.react.uimanager.ViewManagerPropertyUpdater$FallbackViewManagerSetter in setProperty at line 132
com.facebook.react.uimanager.ViewManagerPropertyUpdater in updateProps at line 51
com.facebook.react.uimanager.ViewManager in updateProperties at line 34
com.facebook.react.uimanager.NativeViewHierarchyManager in createView at line 269
com.facebook.react.uimanager.UIViewOperationQueue$CreateViewOperation in execute at line 200
com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback in dispatchPendingNonBatchedOperations at line 1105
com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback in doFrameGuarded at line 1076
com.facebook.react.uimanager.GuardedFrameCallback in doFrame at line 29
com.facebook.react.modules.core.ReactChoreographer$ReactChoreographerDispatcher in doFrame at line 134
com.facebook.react.modules.core.ChoreographerCompat$FrameCallback$1 in doFrame at line 105
android.view.Choreographer$CallbackRecord in run at line 869
android.view.Choreographer in doCallbacks at line 683
android.view.Choreographer in doFrame at line 616
android.view.Choreographer$FrameDisplayEventReceiver in run at line 857
android.os.Handler in handleCallback at line 751
android.os.Handler in dispatchMessage at line 95
android.os.Looper in loop at line 154
android.app.ActivityThread in main at line 6154
java.lang.reflect.Method in invoke
com.android.internal.os.ZygoteInit$MethodAndArgsCaller in run at line 867
com.android.internal.os.ZygoteInit in main at line 757

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:56 (14 by maintainers)

github_iconTop GitHub Comments

1reaction
janicduplessiscommented, Oct 20, 2018

@msand Awesome, thanks! I just tested master and everything works fine.

1reaction
janicduplessiscommented, Oct 19, 2018
Read more comments on GitHub >

github_iconTop Results From Across the Web

Android crash: This dynamic value has been recycled #806
I'm seeing this crash log on Android in production since updating to ^7.0.0. I'm not sure how to reproduce locally but it comes...
Read more >
RecyclerView crashes when "scrapped or attached views may ...
This error is caused if in your XML you have android:animateLayoutChanges set to true and you call notifyDataSetChanged() on the RecyclerView's adapter in ......
Read more >
Slow rendering - Android Developers
ListView and especially RecyclerView are commonly used for complex scrolling lists that are most susceptible to jank. They both contain Systrace markers, so...
Read more >
IndexOutOfBoundsException in RecyclerView ... - Issue Tracker
It's also possible that placing dynamic recycler view on a not visible ... After the list had been refreshed, the crash appeared when...
Read more >
Managing Bitmap Memory | Android Developers
The bitmap is not null , and it hasn't been recycled yet. ... If a suitable bitmap has been found, set it as...
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