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

🐛 Hovering fast on multiple Tooltips throws AnimationController error #905

Closed
harlanx opened this issue Jul 30, 2023 · 0 comments
Closed
Labels
bug Something isn't working

Comments

@harlanx
Copy link

harlanx commented Jul 30, 2023

Describe the bug
On desktop, hover status is used for displaying Tooltip. However, issue arises when the specified waitDuration is set to Duration.zero and when multiple widgets with their own tooltips are hovered fast.

To Reproduce
Steps to reproduce the behavior:

  1. Set waitDuration to Duration(milliseconds: 50) or below (The lower, the faster you can reproduce the issue).
  2. Create a list of widgets wrapped in Tooltip widget
  3. Hover continuously and fast between those widgets with tooltips
  4. See error

Expected behavior
By design choice and better user experience, waitDuration should be set to where the tooltip would not popup instantly however the issue should still be addressed for those who decide to use a lower duration and is expected without encountering any error.

Additional context

Sample code
              TooltipTheme(
                data: const TooltipThemeData(
                  waitDuration: Duration.zero,
                ),
                child: Row(
                  children: [
                    for (final color in material.Colors.primaries)
                      Tooltip(
                        message: color.toString(),
                        child: Container(
                          color: color,
                          height: 25,
                          width: 25,
                        ),
                      ),
                  ],
                ),
              ),
Debug
══╡ EXCEPTION CAUGHT BY ANIMATION LIBRARY ╞═════════════════════════════════════════════════════════
The following assertion was thrown while notifying status listeners for AnimationController:
'package:flutter/src/widgets/overlay.dart': Failed assertion: line 162 pos 12: '_overlay != null':
is not true.

When the exception was thrown, this was the stack:
#2      OverlayEntry.remove (package:flutter/src/widgets/overlay.dart:162:12)
#3      _TooltipState._removeEntry (package:fluent_ui/src/controls/surfaces/tooltip.dart:395:15)
#4      _TooltipState._handleStatusChanged (package:fluent_ui/src/controls/surfaces/tooltip.dart:229:7)
#5      AnimationLocalStatusListenersMixin.notifyStatusListeners (package:flutter/src/animation/listener_helpers.dart:240:19)
#6      AnimationController._checkStatusChanged (package:flutter/src/animation/animation_controller.dart:815:7)
#7      AnimationController.value= (package:flutter/src/animation/animation_controller.dart:364:5)
#8      AnimationController.forward (package:flutter/src/animation/animation_controller.dart:459:7)
#9      _TooltipState._revealTooltip (package:fluent_ui/src/controls/surfaces/tooltip.dart:292:17)
#10     Tooltip._revealLastTooltip (package:fluent_ui/src/controls/surfaces/tooltip.dart:119:28)
#11     _TooltipState._removeEntry (package:fluent_ui/src/controls/surfaces/tooltip.dart:400:15)
#12     _TooltipState._handleStatusChanged (package:fluent_ui/src/controls/surfaces/tooltip.dart:229:7)
#13     AnimationLocalStatusListenersMixin.notifyStatusListeners (package:flutter/src/animation/listener_helpers.dart:240:19)
#14     AnimationController._checkStatusChanged (package:flutter/src/animation/animation_controller.dart:815:7)
#15     AnimationController.value= (package:flutter/src/animation/animation_controller.dart:364:5)
#16     AnimationController.forward (package:flutter/src/animation/animation_controller.dart:459:7)
#17     _TooltipState._revealTooltip (package:fluent_ui/src/controls/surfaces/tooltip.dart:292:17)
#18     _TooltipState.ensureTooltipVisible (package:fluent_ui/src/controls/surfaces/tooltip.dart:308:7)
#22     _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:189:12)
(elided 5 frames from class _AssertionError, class _Timer, and dart:async-patch)

The AnimationController notifying status listeners was:
  AnimationController#f0ba4(⏮ 0.000; paused)
@harlanx harlanx changed the title 🐛 Hovering on multiple tool tips fast throws AnimationController error 🐛 Hovering fast on multiple Tooltips throws AnimationController error Jul 30, 2023
@bdlukaa bdlukaa added the bug Something isn't working label Jul 30, 2023
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