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

[ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: Looking up a deactivated widget's ancestor is unsafe. #11

Open
yuanzhiying opened this issue Jan 17, 2022 · 1 comment

Comments

@yuanzhiying
Copy link

E/flutter (30989): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: Looking up a deactivated widget's ancestor is unsafe.
E/flutter (30989): At this point the state of the widget's element tree is no longer stable.
E/flutter (30989): To safely refer to a widget's ancestor in its dispose() method, save a reference to the ancestor by calling dependOnInheritedWidgetOfExactType() in the widget's didChangeDependencies() method.
E/flutter (30989): #0      Element._debugCheckStateIsActiveForAncestorLookup.<anonymous closure> (package:flutter/src/widgets/framework.dart:3990:9)
E/flutter (30989): #1      Element._debugCheckStateIsActiveForAncestorLookup (package:flutter/src/widgets/framework.dart:4004:6)
E/flutter (30989): #2      Element.visitAncestorElements (package:flutter/src/widgets/framework.dart:4089:12)
E/flutter (30989): #3      Notification.dispatch (package:flutter/src/widgets/notification_listener.dart:83:13)
E/flutter (30989): #4      ScrollActivity.dispatchScrollEndNotification (package:flutter/src/widgets/scroll_activity.dart:104:63)
E/flutter (30989): #5      ScrollPosition.didEndScroll (package:flutter/src/widgets/scroll_position.dart:907:15)
E/flutter (30989): #6      ScrollPosition.beginActivity (package:flutter/src/widgets/scroll_position.dart:876:9)
E/flutter (30989): #7      ScrollPositionWithSingleContext.beginActivity (package:flutter/src/widgets/scroll_position_with_single_context.dart:114:11)
E/flutter (30989): #8      ScrollPositionWithSingleContext.goIdle (package:flutter/src/widgets/scroll_position_with_single_context.dart:129:5)
E/flutter (30989): #9      ScrollPositionWithSingleContext.jumpTo (package:flutter/src/widgets/scroll_position_with_single_context.dart:195:5)
E/flutter (30989): #10     ScrollPositionWithSingleContext.animateTo (package:flutter/src/widgets/scroll_position_with_single_context.dart:177:7)
E/flutter (30989): #11     PageController.animateToPage (package:flutter/src/widgets/page_view.dart:201:21)
E/flutter (30989): #12     _TransformerPageViewState.onChangeNotifier (package:flutter_swiper_null_safety/src/transformer_page_view/transformer_page_view.dart:590:12)
E/flutter (30989): #13     ChangeNotifier.notifyListeners (package:flutter/src/foundation/change_notifier.dart:308:24)
E/flutter (30989): #14     IndexController.next (package:flutter_swiper_null_safety/src/transformer_page_view/index_controller.dart:30:5)
E/flutter (30989): #15     _SwiperTimerMixin._onTimer (package:flutter_swiper_null_safety/src/swiper.dart:369:18)
E/flutter (30989): #16     _rootRunUnary (dart:async/zone.dart:1436:47)
E/flutter (30989): #17     _CustomZone.runUnary (dart:async/zone.dart:1335:19)
E/flutter (30989): #18     _CustomZone.runUnaryGuarded (dart:async/zone.dart:1244:7)
E/flutter (30989): #19     _CustomZone.bindUnaryCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1281:26)
E/flutter (30989): #20     _rootRunUnary (dart:async/zone.dart:1444:13)
E/flutter (30989): #21     _CustomZone.runUnary (dart:async/zone.dart:1335:19)
E/flutter (30989): #22     _CustomZone.bindUnaryCallback.<anonymous closure> (dart:async/zone.dart:1265:26)
E/flutter (30989): #23     _Timer._runTimers (dart:isolate-patch/timer_impl.dart:395:19)
E/flutter (30989): #24     _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:426:5)
E/flutter (30989): #25     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:192:12)

自动滚动,每滚动一次,报一次错。这个咋回事?

@yuanzhiying
Copy link
Author

被销毁了,计时器还在走?

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

No branches or pull requests

1 participant