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] Failed assertion: line 822 pos 12: 'elapsedInSeconds >= 0.0': is not true. #1672

Closed
corepuncher opened this issue Sep 28, 2023 · 4 comments
Labels
blocked This issue's resolution can't be worked on right now bug This issue reports broken functionality or another error P: 3 (low) (Default priority for feature requests)

Comments

@corepuncher
Copy link

What is the bug?

This bug appears randomly it seems. Here was my full error:

EXCEPTION CAUGHT BY SCHEDULER LIBRARY
The following assertion was thrown during a scheduler callback:
'package:flutter/src/animation/animation_controller.dart': Failed assertion: line 822 pos 12:
'elapsedInSeconds >= 0.0': is not true.

Either the assertion indicates an error in the framework itself, or we should provide substantially
more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
https://github.com/flutter/flutter/issues/new?template=2_bug.yml

When the exception was thrown, this was the stack:
#2 AnimationController._tick (package:flutter/src/animation/animation_controller.dart:822:12)
#3 Ticker._tick (package:flutter/src/scheduler/ticker.dart:249:12)
#4 SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1297:15)
#5 SchedulerBinding.handleBeginFrame. (package:flutter/src/scheduler/binding.dart:1149:11)
#6 _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:625:13)
#7 SchedulerBinding.handleBeginFrame (package:flutter/src/scheduler/binding.dart:1147:17)
#8 SchedulerBinding._handleBeginFrame (package:flutter/src/scheduler/binding.dart:1064:5)
#9 _invoke1 (dart:ui/hooks.dart:186:13)
#10 PlatformDispatcher._beginFrame (dart:ui/platform_dispatcher.dart:379:5)
#11 _beginFrame (dart:ui/hooks.dart:129:31)
(elided 2 frames from class _AssertionError)

This exception was thrown in the context of a scheduler callback. When the scheduler callback was registered (as opposed to when the exception was thrown), this was the stack:
#2 SchedulerBinding.scheduleFrameCallback (package:flutter/src/scheduler/binding.dart:580:49)
#3 Ticker.scheduleTick (package:flutter/src/scheduler/ticker.dart:265:46)
#4 Ticker.start (package:flutter/src/scheduler/ticker.dart:171:7)
#5 AnimationController._startSimulation (package:flutter/src/animation/animation_controller.dart:745:42)
#6 AnimationController._animateToInternal (package:flutter/src/animation/animation_controller.dart:612:12)
#7 AnimationController.forward (package:flutter/src/animation/animation_controller.dart:461:12)
#8 TileImage._display. (package:flutter_map/src/layer/tile_layer/tile_image.dart:212:33)
#9 TileDisplay.when (package:flutter_map/src/layer/tile_layer/tile_display.dart:55:38)
#10 TileImage._display (package:flutter_map/src/layer/tile_layer/tile_image.dart:198:18)
#11 TileImage._onImageLoadSuccess (package:flutter_map/src/layer/tile_layer/tile_image.dart:165:7)
#12 ImageStreamCompleter.setImage (package:flutter/src/painting/image_stream.dart:651:25)
#13 MultiFrameImageStreamCompleter._emitFrame (package:flutter/src/painting/image_stream.dart:992:5)
#14 MultiFrameImageStreamCompleter._decodeNextFrameAndSchedule (package:flutter/src/painting/image_stream.dart:971:7)

(elided 2 frames from class _FrameCallbackEntry)

Another exception was thrown: 'package:flutter/src/animation/animation_controller.dart': Failed assertion: line 822 pos 12: 'elapsedInSeconds >= 0.0': is not true.
Another exception was thrown: 'package:flutter/src/animation/animation_controller.dart': Failed assertion: line 822 pos 12: 'elapsedInSeconds >= 0.0': is not true.

Later on, as the app runs, it will print out the "Another exception was thrown" many times, sometimes 20+ times. At this point, I am just displaying the flutter map on the screen, and not even interacting. In the background, the app updates data every minute.

How can we reproduce it?

Unfortunately, I do not know how to reproduce the error. I found some other issues for flutter in general on github regarding 'elapsedInSeconds >= 0.0: is not true', but no mention of flutter map. And although it mentions "animation_controller.dart" in the error message, I only have a single animation which I rarely use, and it requires user interaction to even start it.

Do you have a potential solution?

No response

Platforms

Windows 11 to Galaxy S23

Severity

Minimum: Allows normal functioning

@corepuncher corepuncher added bug This issue reports broken functionality or another error needs triage This new bug report needs reproducing and prioritizing labels Sep 28, 2023
@JaffaKetchup
Copy link
Member

Hi @corepuncher,

Thanks for reporting this, I'll have a quick look to see if there's anything immediately wrong. However, the error log does say to report this issue to the Flutter team in order to add more debugging/resolution to this log, so it's possible I won't find anything.

I know that the logs contain flutter_map, but I would just try to isolate your custom animation, just in case that's interfering somehow for whatever reason.

@corepuncher
Copy link
Author

Thank you will do. The weird thing is, I only have 1 small animation (a blinking icon when tapped), very little code, and the error occurs even when I do not interact with it. I will send a report to flutter.

@corepuncher
Copy link
Author

My submission to flutter for reference:
flutter/flutter#135714

@JaffaKetchup
Copy link
Member

For now, going to close this as an external issue. If it can be reproduced after flutter/flutter#106277 is resolved, then this can be re-opened. Thanks @corepuncher for handling it!

@JaffaKetchup JaffaKetchup closed this as not planned Won't fix, can't repro, duplicate, stale Oct 2, 2023
@JaffaKetchup JaffaKetchup added blocked This issue's resolution can't be worked on right now P: 3 (low) (Default priority for feature requests) and removed needs triage This new bug report needs reproducing and prioritizing labels Oct 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked This issue's resolution can't be worked on right now bug This issue reports broken functionality or another error P: 3 (low) (Default priority for feature requests)
Projects
None yet
Development

No branches or pull requests

2 participants