-
Notifications
You must be signed in to change notification settings - Fork 67
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 terminate when switching sources and calling play
#501
Conversation
Reproduce: 1. Switch source and call play() 2. Repeat first step Possible reason: Functions executing in wrong order. We waiting for futures when we already deallocated some resources that futures might depend on.
videoPlayFuture.waitForFinished(); | ||
audioPlayFuture.waitForFinished(); | ||
demuxer.abort(false); | ||
|
||
videoFrameRate = 0.0; | ||
videoQueue.clear(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as I remember, first we clear queues and after we wait that threads finished to consume all frames.
thanks, got this BT:
|
Oh I also got this backtrace and then tried to add some null checks after each crash and it not helped me a lot. Then other type of issues occurred. I thought it was easy peasy but now i realize it's not |
could you check #503 ? |
I confirm. Everything is working now! |
thanks, just need to understand why tests failed, maybe would require another fix |
Hi, valbok. I experienced some crashes when switching network sources and calling play. This crash might happen after multiple attempts.
Here is small demo:
Reproduce:
Possible reason:
Functions executing in wrong order. We waiting for futures when we already deallocated some resources that futures might depend on.
If I'm wrong please correct me.