Skip to content
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

Bug when re-opening a bookmarked file; disposed data from the past is accessed #23

Open
luanpotter opened this issue May 23, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@luanpotter
Copy link
Member

[ERROR:flutter/lib/ui/ui_dart_state.cc(199)] Unhandled Exception: setState() called after dispose(): _SliceWatcherState<FireAtlasState, _ModalContainerSlice>#178b8(lifecycle state: defunct, not mounted)
This error happens if you call setState() on a State object for a widget that no longer appears in the widget tree (e.g., whose parent widget no longer includes the widget in its build). This error can occur when code calls setState() from a timer or an animation callback.
The preferred solution is to cancel the timer or stop listening to the animation in the dispose() callback. Another solution is to check the "mounted" property of this object before calling setState() to ensure the object is still in the tree.
This error might indicate a memory leak if setState() is being called because another object is retaining a reference to this State object after it has been removed from the tree. To avoid memory leaks, consider breaking the reference to this object during dispose().
#0      State.setState.<anonymous closure> (package:flutter/src/widgets/framework.dart:1052:9)
#1      State.setState (package:flutter/src/widgets/framework.dart:1087:6)
#2      _SliceWatcherState._update (package:fire_atlas_editor/vendor/slices/slices.dart:107:5)
#3      SlicesStore._notifyListeners.<anonymous closure> (package:fire_atlas_editor/vendor/slices/slices.dart:38:33)
#4      List.forEach (dart:core-patch/growable_array.dart:403:8)
#5      SlicesStore._notifyListeners (package:fire_atlas_editor/vendor/slices/slices.dart:38:16)
#6      SlicesStore.dispatchAsync (package:fire_atlas_editor/vendor/slices/slices.dart:34:5)
<asynchronous suspension>


Another exception was thrown: setState() called after dispose(): _SliceWatcherState<FireAtlasState, _ModalContainerSlice>#178b8(lifecycle state: defunct, not mounted)

Another exception was thrown: setState() called after dispose(): _SliceWatcherState<FireAtlasState, _ModalContainerSlice>#178b8(lifecycle state: defunct, not mounted)

Another exception was thrown: setState() called after dispose(): _SliceWatcherState<FireAtlasState, _ModalContainerSlice>#178b8(lifecycle state: defunct, not mounted)

Another exception was thrown: setState() called after dispose(): _SliceWatcherState<FireAtlasState, _ModalContainerSlice>#178b8(lifecycle state: defunct, not mounted)

Another exception was thrown: setState() called after dispose(): _SliceWatcherState<FireAtlasState, _ModalContainerSlice>#178b8(lifecycle state: defunct, not mounted)

Another exception was thrown: setState() called after dispose(): _SliceWatcherState<FireAtlasState, _ModalContainerSlice>#178b8(lifecycle state: defunct, not mounted)

Another exception was thrown: setState() called after dispose(): _SliceWatcherState<FireAtlasState, _ModalContainerSlice>#178b8(lifecycle state: defunct, not mounted)
@spydon spydon changed the title Bug when re-opening a bookmarked file; disposed data from the past is acessed Bug when re-opening a bookmarked file; disposed data from the past is accessed May 23, 2021
@erickzanardo erickzanardo added the bug Something isn't working label Jun 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants