nslogx / nslogx/flutter_easyloading

When both interfaces have display logic, frequent interface switching reports an error, and the animation is stuck

Open
#149 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Dart
Stars
1.3k
Forks
249
PR merge metrics
No merged PRs in 30d

Description

The following assertion was thrown during a scheduler callback:
'package:flutter/src/animation/animation_controller.dart': Failed assertion: line 789 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=BUG.md

When the exception was thrown, this was the stack:
#2 AnimationController._tick (package:flutter/src/animation/animation_controller.dart:789:12)
#3 Ticker._tick (package:flutter/src/scheduler/ticker.dart:238:12)
#4 SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1148:15)
#5 SchedulerBinding.handleBeginFrame. (package:flutter/src/scheduler/binding.dart:1062:11)
#6 _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:377:8)
...

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:532:49)
#3 Ticker.scheduleTick (package:flutter/src/scheduler/ticker.dart:253:47)
#4 Ticker.start (package:flutter/src/scheduler/ticker.dart:162:7)
#5 AnimationController._startSimulation (package:flutter/src/animation/animation_controller.dart:714:42)
#6 AnimationController.repeat (package:flutter/src/animation/animation_controller.dart:638:12)
...

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing rapid switching between the two interfaces that contain display logic, then inspect the reported Flutter stack around AnimationController.repeat and animation_controller.dart:789. Confirm that switching no longer triggers the negative elapsedInSeconds assertion and that the animation is not left stuck.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, flutter
Domain
mobile-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.