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

[Windows] multiple null-check exceptions after controller dispose #4

Closed
nikitatg opened this issue Jul 26, 2022 · 2 comments
Closed

Comments

@nikitatg
Copy link

Greetings!
I began to use package on Windows and noticed that after closing the player (and disposing player controller) flutter debug console receiving multiple
currentVolume Null check operator used on a null value
The reason i found at controller.dart#1025

        _timerForGettingVolume?.cancel();
        _timerForGettingVolume =
            Timer.periodic(Duration(milliseconds: 250), (Timer t) async {
--->>      _timerForGettingVolume = null;
...

Loosing link to timer makes it stay in memory and continue ticking. And when disposing a controller we can't stop it because link was lost. Locally i've commented this line and exception diappeared; but i'm not quite shure what's going on at that method/timer and that's why i can't pull-request such "fix".

Thank you for useful package.

@nikitatg nikitatg changed the title [Windows] multiple null-check exceptions even after dispose [Windows] multiple null-check exceptions after controller dispose Jul 26, 2022
@abdelaziz-mahdy
Copy link
Owner

I will check on it again

Thank you for the explaining ❤️

@abdelaziz-mahdy
Copy link
Owner

fixed in 2.0.2

sorry for late update

feel free to open an issue if something is not working as expected

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants