You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a reproducible Exception which appears in my console, but doesn't crash the app. It suggests
_DraggableScrollbarState was disposed with an active Ticker. Specifically, that _DraggableScrollbarState created a Ticker via its TickerProviderStateMixin, but at the time dispose() was called on the mixin, that Ticker was still active.
The warning writes that all Tickers must be disposed before calling super.dispose(). Tickers used by AnimationControllers should be disposed by calling dispose() on the AnimationController itself. Otherwise, the ticker will leak.
Create an app which has a Scaffold and two tabs within it. Within each tab is a DraggableScrollbar surrounding a ListView.
Populate the ListViews with data
Click on tab 1.
Click on tab 2.
Scroll quickly down so it has momentum and that the scroll tab remains visible
Quickly click to tab 1
Result
Exception written above and detailed below. You have to switch tabs quickly while scrolling is happening and the scroll tab is visible. If you click slowly, the exception warning does not appear.
Expected
No exception
Detail
I/flutter (15282): ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
I/flutter (15282): The following assertion was thrown while finalizing the widget tree:
I/flutter (15282): _DraggableScrollbarState#cc375(tickers: tracking 1 ticker) was disposed with an active Ticker.
I/flutter (15282): _DraggableScrollbarState created a Ticker via its TickerProviderStateMixin, but at the time
I/flutter (15282): dispose() was called on the mixin, that Ticker was still active. All Tickers must be disposed before
I/flutter (15282): calling super.dispose(). Tickers used by AnimationControllers should be disposed by calling
I/flutter (15282): dispose() on the AnimationController itself. Otherwise, the ticker will leak.
I/flutter (15282): The offending ticker was: _WidgetTicker(created by _DraggableScrollbarState#cc375(lifecycle state:
I/flutter (15282): created, tickers: tracking 1 ticker))
I/flutter (15282): The stack trace when the _WidgetTicker was actually created was:
I/flutter (15282): #0 new Ticker.<anonymous closure> (package:flutter/src/scheduler/ticker.dart:64:40)
I/flutter (15282): #1 new Ticker (package:flutter/src/scheduler/ticker.dart:66:6)
I/flutter (15282): #2 new _WidgetTicker (package:flutter/src/widgets/ticker_provider.dart:225:80)
I/flutter (15282): #3 __DraggableScrollbarState&State&TickerProviderStateMixin.createTicker (package:flutter/src/widgets/ticker_provider.dart:161:34)
I/flutter (15282): #4 new AnimationController (package:flutter/src/animation/animation_controller.dart:244:21)
I/flutter (15282): #5 _DraggableScrollbarState.initState (package:draggable_scrollbar/draggable_scrollbar.dart:340:33)
I/flutter (15282): #6 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3808:58)
I/flutter (15282): #7 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3674:5)
I/flutter (15282): #8 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2950:14)
I/flutter (15282): #9 Element.updateChild (package:flutter/src/widgets/framework.dart:2753:12)
I/flutter (15282): #10 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3710:16)
I/flutter (15282): #11 Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5)
I/flutter (15282): #12 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2286:33)
I/flutter (15282): #13 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding&WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:676:20)
I/flutter (15282): #14 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:219:5)
I/flutter (15282): #15 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:990:15)
I/flutter (15282): #16 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:930:9)
I/flutter (15282): #17 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:842:5)
I/flutter (15282): #18 _invoke (dart:ui/hooks.dart:151:13)
I/flutter (15282): #19 _drawFrame (dart:ui/hooks.dart:140:3)
I/flutter (15282):
I/flutter (15282): When the exception was thrown, this was the stack:
I/flutter (15282): #0 __DraggableScrollbarState&State&TickerProviderStateMixin.dispose.<anonymous closure> (package:flutter/src/widgets/ticker_provider.dart:178:13)
I/flutter (15282): #1 __DraggableScrollbarState&State&TickerProviderStateMixin.dispose (package:flutter/src/widgets/ticker_provider.dart:191:6)
I/flutter (15282): #2 _DraggableScrollbarState.dispose (package:draggable_scrollbar/draggable_scrollbar.dart:355:11)
I/flutter (15282): #3 StatefulElement.unmount (package:flutter/src/widgets/framework.dart:3878:12)
I/flutter (15282): #4 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1709:13)
I/flutter (15282): #5 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:1707:7)
I/flutter (15282): #6 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:3733:14)
I/flutter (15282): #7 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1705:13)
I/flutter (15282): #8 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:1707:7)
I/flutter (15282): #9 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:3733:14)
I/flutter (15282): #10 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1705:13)
I/flutter (15282): #11 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:1707:7)
I/flutter (15282): #12 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:3733:14)
I/flutter (15282): #13 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1705:13)
I/flutter (15282): #14 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:1707:7)
I/flutter (15282): #15 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:3733:14)
I/flutter (15282): #16 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1705:13)
I/flutter (15282): #17 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:1707:7)
I/flutter (15282): #18 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:3733:14)
I/flutter (15282): #19 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1705:13)
I/flutter (15282): #20 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:1707:7)
I/flutter (15282): #21 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:3733:14)
I/flutter (15282): #22 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1705:13)
I/flutter (15282): #23 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:1707:7)
I/flutter (15282): #24 SingleChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:4826:14)
I/flutter (15282): #25 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1705:13)
I/flutter (15282): #26 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:1707:7)
I/flutter (15282): #27 SingleChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:4826:14)
I/flutter (15282): #28 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1705:13)
I/flutter (15282): #29 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:1707:7)
I/flutter (15282): #30 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:3733:14)
I/flutter (15282): #31 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1705:13)
I/flutter (15282): #32 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:1707:7)
I/flutter (15282): #33 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:3733:14)
I/flutter (15282): #34 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1705:13)
I/flutter (15282): #35 _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:1707:7)
I/flutter (15282): #36 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:3733:14)
I/flutter (15282): #37 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1705:13)
I/flutter (15282): #38 ListIterable.forEach (dart:_internal/iterable.dart:39:13)
I/flutter (15282): #39 _InactiveElements._unmountAll (package:flutter/src/widgets/framework.dart:1718:25)
I/flutter (15282): #40 BuildOwner.finalizeTree.<anonymous closure> (package:flutter/src/widgets/framework.dart:2372:27)
I/flutter (15282): #41 BuildOwner.lockState (package:flutter/src/widgets/framework.dart:2204:15)
I/flutter (15282): #42 BuildOwner.finalizeTree (package:flutter/src/widgets/framework.dart:2371:7)
I/flutter (15282): #43 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding&WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:678:18)
I/flutter (15282): #44 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:219:5)
I/flutter (15282): #45 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:990:15)
I/flutter (15282): #46 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:930:9)
I/flutter (15282): #47 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:842:5)
I/flutter (15282): #48 _invoke (dart:ui/hooks.dart:151:13)
I/flutter (15282): #49 _drawFrame (dart:ui/hooks.dart:140:3)
I/flutter (15282): ════════════════════════════════════════════════════════════════════════════════════════════════════
The text was updated successfully, but these errors were encountered:
I have a reproducible Exception which appears in my console, but doesn't crash the app. It suggests
_DraggableScrollbarState was disposed with an active Ticker. Specifically, that _DraggableScrollbarState created a Ticker via its TickerProviderStateMixin, but at the time dispose() was called on the mixin, that Ticker was still active.
The warning writes that all Tickers must be disposed before calling super.dispose(). Tickers used by AnimationControllers should be disposed by calling dispose() on the AnimationController itself. Otherwise, the ticker will leak.
Setup
Flutter 0.11.3 • channel beta
Framework • revision 72bf075e8d (6 days ago) • 2018-11-09 20:36:17 -0800
Engine • revision 5646e86a6f
Tools • Dart 2.1.0 (build 2.1.0-dev.9.3 9c07fb64c4)
Draggable Scrollbar 0.0.4
Repo
Result
Exception written above and detailed below. You have to switch tabs quickly while scrolling is happening and the scroll tab is visible. If you click slowly, the exception warning does not appear.
Expected
No exception
Detail
The text was updated successfully, but these errors were encountered: