-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
fix(animationFrameScheduler): some tasks are never flushed and sometimes it breaks completely #7444
Conversation
Sandbox was not cleaning up correctly and making fail the test that I added.
any update yet? |
@BlueCat0 Unfortunately it seems that no one had the time to review it. To avoid the bug altogether, never use animationFrameScheduler with a delay, you can use the asyncScheduler for that purpose. In fact they would behave exactly the same, as animationFrameScheduler doesn't really schedule into a frame when delay is used. Note that using animationFrameScheduler with a delay in one place may impact in a different place. |
@pmoleri Your PR is open for quite some time. Has there been another PR which made yours obsolete? Or is this still waiting for a review? I encounter issues with So, is the bug you are trying to fix here still unfixed? |
The issue is actually quite serious, it can affect any Angular app combining animationFrameScheduler with a delay other than 0. In the 7.x branch the files have not been touched in 3 years, so I'm positive that the issue is still there. In master the files have been moved around and the imports changed but the code is exactly the same. |
Hi @benlesh. This PR fixes real bugs and it has tests to confirm the bug and the fix. I made the PR to 7.x, but I could re-target to master and backport later. |
Make test assert order more clear
Would be nice to have it fixed as it is used by a number of libs causing random issues left and right. |
Thank you for your contribution, @pmoleri. Apologies for the long wait. |
Thank you @benlesh. I created this PR against 7.x. Also, are you planing a new 7.x release soon? |
animationFrameScheduler
has a few issues that makes it miss tasks and even start accumulating tasks that never get flushed._scheduled
even though current id might be a different one.Related issues:
already fixed but similar cause
Failing tests are included in a independent commit and then fixed.
Note:
The changes could also be ported to AsapScheduler for consistency (also I think it's more clear).
However, I couldn't reproduce the issues there because:
_scheduled
one.