-
-
Notifications
You must be signed in to change notification settings - Fork 17
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
Playing a second video crashes the application #200
Comments
You ticked both "manually compiled" and "stable" version. Does this mean you get the crash in both cases? I am not getting it with compiled master but the fact you can prevent it by showing debug messages suggests it is a race condition of some kind so may only affect some hardware or some video types (?) |
Yes, I can reproduce both on the pre-packaged version and one locally compiled from head.
I suspect something similar too. At any rate, it may also indicate that some device driver implementations are more strict with requiring proper cleanup/shutdown, and thus possibly a latent bug that has gone unnoticed as maintainers can't reliably reproduce it. |
It reliably occurs in #153 PR but not necessarily due to the same problem. |
@jmc-88 Rather than destroying and recreating the player and widgets I wonder whether it might be sufficient to reset the pipeline ( I cannot confirm one way or another as I do not get the crash anyway. |
@jmc-88 I have pushed a draft PR that resets the pipeline. It does not cause any regressions afaict so far. Are you in a position to try it out and say whether it fixes your problem? |
I tried it out and it doesn't fix the issue. Furthermore, turns out resetting the player as I initially suggested also doesn't fix it -- just moves the crash around... 😞 |
@jmc-88 That's a pity - worth a try. Thanks for testing. |
@jmc-88 I made some changes to #153 that makes it quite stable for me (see screencast attached thereto). If you have time please try it out, although ryanoko still found it crashed for them. Could you confirm whether you are pausing the video before going back to the Welcome page? In #153 the problem occurred if you did not pause the video first. If you find stopping the video first fixes it I could try putting a longer timeout in the navigate back function rather than just an Idle loop. That would effectively simulate pressing the pause button when you press the back button. I don't like using Timeouts but sometimes needs must. |
Still no luck. Pausing the video or not pausing the video doesn't seem to make a difference, so artificially adding timeouts is likely to be unnecessary. |
Thats a pity. Thanks for trying anyway. Could you indicate what kind of video you are using? Or have you tried different formats? |
I hadn't -- by chance, all files I tried it on were MP4. I downloaded an Ogg Theora video for testing, and the issue doesn't manifest with it. |
Interesting. I have now identified that the crash is associated with the Intel video driver. My current laptop has a NVidia card and driver and I do not get this crash. However, my old laptop has an Intel card and I get the same crash (same backtrace) as you on that machine. It occurs after the second video starts playing - you get a snatch of video and audio before the crash. At least I have a better chance of finding a solution now. |
This is a similar issue: intel/media-driver#862 |
Ah, nice find. I built and installed the driver and related dependencies from Git master and the crash is gone. I initially thought this was an issue specific to Videos as I was unable to reproduce it on other players, but seeing as the Intel drivers are to blame instead, I'm going to close this as it's not a Videos bug. |
Glad the updated driver fixed it! It is uncertain whether Videos is abusing GStreamer in some way or whether the difference with other players you tried (I presume they also use GStreamer?) is some subtle timing difference - or perhaps they patch GStreamer or the driver. Hopefully this will go away in the next release of elementary with newer libraries anyway so it is probably not worth spending a lot of time trying to track down. |
Other players I tried were VLC and mpv, both of which don't use GStreamer. If the issue manifests with GStreamer only, it makes perfect sense that I was unable to reproduce it. I agree, working around this in Videos is not a good investment of your time. |
Prerequisites
Describe the bug
Playing a second video crashes the application.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The second video should play just fine.
Screenshots or screen recordings
N/A
Logs
Something funny is that running the application with
G_MESSAGES_DEBUG=all
seems to make the crash disappear.gdb
backtrace:Platform Information
Please check what applies:
Additional context
The issues seems to be in the reuse of a single
ClutterGst.Player
object: instead of cleanly destroying it, the application is currently changing its properties after creation and setting itsposition
to rewind to the beginning of the stream (which I'm not even sure it's correct in all cases as not all streams are seekable). Recreating the object and the widgets connected to it inPlayerPage.vala
before reproducing a new video seems to fix the issue locally -- please consider applying a similar fix.I'm suspecting this is the same issue as, or connected to the following issues:
I'm opening a new report just in case, since I can reproduce this crash locally, I'm able to provide more detail than previous reports were, and I'm providing a suggested fix.
The text was updated successfully, but these errors were encountered: