Skip to content

fix: CircularDataLabelRendererState setState() called after dispose() #1311

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 0 commits into from

Conversation

tenon-du
Copy link

exception was thrown: setState() called after dispose(): CircularDataLabelRendererState#5db96(lifecycle state: defunct, not mounted, ticker inactive)
`

I/flutter (13276): ══╡ EXCEPTION CAUGHT BY ANIMATION LIBRARY ╞═════════════════════════════════════════════════════════
I/flutter (13276): The following assertion was thrown while notifying status listeners for AnimationController:
I/flutter (13276): setState() called after dispose(): CircularDataLabelRendererState#c3fe4(lifecycle state: defunct,
I/flutter (13276): not mounted, ticker inactive)
I/flutter (13276): This error happens if you call setState() on a State object for a widget that no longer appears in
I/flutter (13276): the widget tree (e.g., whose parent widget no longer includes the widget in its build). This error
I/flutter (13276): can occur when code calls setState() from a timer or an animation callback.
I/flutter (13276): The preferred solution is to cancel the timer or stop listening to the animation in the dispose()
I/flutter (13276): callback. Another solution is to check the "mounted" property of this object before calling
I/flutter (13276): setState() to ensure the object is still in the tree.
I/flutter (13276): This error might indicate a memory leak if setState() is being called because another object is
I/flutter (13276): retaining a reference to this State object after it has been removed from the tree. To avoid memory
I/flutter (13276): leaks, consider breaking the reference to this object during dispose().
I/flutter (13276):
I/flutter (13276): When the exception was thrown, this was the stack:
I/flutter (13276): #0 State.setState.framework.dart:1103
I/flutter (13276): #1 State.setState framework.dart:1138
I/flutter (13276): #2 CircularDataLabelRendererState.render data_label_renderer.dart:107
I/flutter (13276): #3 CircularArea._bindSeriesWidgets. circular_area.dart:697
I/flutter (13276): #4 AnimationLocalStatusListenersMixin.notifyStatusListeners listener_helpers.dart:240
I/flutter (13276): #5 AnimationController._checkStatusChanged animation_controller.dart:815
I/flutter (13276): #6 AnimationController._tick animation_controller.dart:831
I/flutter (13276): #7 Ticker._tick ticker.dart:249
I/flutter (13276): #8 SchedulerBinding._invokeFrameCallback binding.dart:1284
I/flutter (13276): #9 SchedulerBinding.handleBeginFrame. binding.dart:1136
I/flutter (13276): #10 _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:625:13)
I/flutter (13276): #11 SchedulerBinding.handleBeginFrame binding.dart:1134
I/flutter (13276): #12 SchedulerBinding._handleBeginFrame binding.dart:1051
I/flutter (13276): #13 _invoke1 (dart:ui/hooks.dart:158:13)
I/flutter (13276): #14 PlatformDispatcher._beginFrame (dart:ui/platform_dispatcher.dart:337:5)
I/flutter (13276): #15 _beginFrame (dart:ui/hooks.dart:101:31)
I/flutter (13276):
I/flutter (13276): The AnimationController notifying status listeners was:
I/flutter (13276): AnimationController#b05dd(⏭ 1.000; paused)
I/flutter (13276): ═══════════════════════════════════════════════════════════════════════════════

`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
charts Charts component open Open
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants