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

Crash on loading items immediately #45

Closed
TheM4hd1 opened this issue Mar 16, 2019 · 3 comments
Closed

Crash on loading items immediately #45

TheM4hd1 opened this issue Mar 16, 2019 · 3 comments
Labels
bug Something isn't working

Comments

@TheM4hd1
Copy link

TheM4hd1 commented Mar 16, 2019

I've got weird crashes when trying to loading items one after one in .stream sourceType.
I'm using AudioPlayer and not QueuedAudioPlayer

I've checked a few things and it seems the problem is with removing observer and sometimes the AVPlayerItem gets deallocated but the observers for .duration and ```.loadedTimeRanges```` still registered.

Image 1:

Screen Shot 2019-03-16 at 12 27 12 PM

Image 2:

Screen Shot 2019-03-16 at 12 57 18 PM

NOTE

the problem occurred when I've tried to load items immediately one after one.
its ok when I let them to get .ready state before loading another-one.

@jorgenhenrichsen
Copy link
Owner

Yep, looks like a problem with registering of the observer. I'll look into this when I have time!

@jorgenhenrichsen jorgenhenrichsen added the bug Something isn't working label Mar 17, 2019
@jorgenhenrichsen
Copy link
Owner

@TheM4hd1 Could you supply some code to describe what you do to make it crash? I haven't been able to reproduce the bug yet.

@TheM4hd1
Copy link
Author

TheM4hd1 commented Apr 3, 2019

sorry for delay, the problem occurred when I was trying to load items immediately in stream mode one after one, without letting them to load completely.
I fixed this error by loading items in a background thread. it works fine now
still testing it and will let you know if the issue still exists.

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