Taiko2k / Tauon

The music player of today! :city_sunrise:
https://tauonmusicbox.rocks
GNU General Public License v3.0
1.75k stars 66 forks source link

[Bug] Audio randomly stopping despite track playing #381

Closed demeralde closed 3 years ago

demeralde commented 3 years ago

This has happened a few times now. I'm not sure what's causing it. I'll be doing something else and then music will suddenly stop, but the app says it's playing. If I restart the app, I can play the same song without any problems.

Let me know how I can provide more debugging info if necessary.

Taiko2k commented 3 years ago

Which backend do you have selected, GStreamer? Also you on latest stable release I assume?

demeralde commented 3 years ago

@Taiko2k GStreamer. And yeah I installed it via Flathub the other day, so it's up-to-date.

Taiko2k commented 3 years ago

You mention restarting the app, but do you know if pressing stop then play resumes the audio? Also if you have the level meter running, does it remain active?

demeralde commented 3 years ago

@Taiko2k yeah, I tried toggling the stop/play button. The next time it happens, I'll try troubleshooting it further.

What do you mean by level meter? As in the audio controls?

Taiko2k commented 3 years ago

What do you mean by level meter? As in the audio controls?

If you right-click to the left of the minimize button, theres an option for a level visualiser. If its active or not will help narrow down the issue

demeralde commented 3 years ago

@Taiko2k didn't see your message so I missed it this time, but it happened again. Here's a screenshot:

Screenshot from 2020-09-28 20-18-21

It kept cycling through each song for about a second or two, without playing them (stuck on 00:00)

Taiko2k commented 3 years ago

There's a known issue where it does this with some WAV files, but for you it was doing it with FLACs right?

demeralde commented 3 years ago

@Taiko2k yeah, FLAC. If it does for WAV I'm assuming FLAC might have a similar problem because they both have high bit rates.

Taiko2k commented 3 years ago

No, the issue with WAVs was to do with duration calculation, but that's not a problem with other formats.

Hmm, I'm not sure what the problem is here. Hard for me to debug when im not running into it myself.

Are you running a low end pc by any chance?

In the mean time if its annoying you, you could try switch to the Phazor backend, I doubt it would have the same issue.

demeralde commented 3 years ago

@Taiko2k nope, my PC specs are pretty decent. What's the difference between Phazor and GStreamer? I'm using a media player status with i3xrocks so hopefully this works with it (I'll try)

Taiko2k commented 3 years ago

Phazor is Tauon's new built in audio engine. It likely has bugs, but a different set of bugs to the GStreamer based backend.

Your status thing likely uses MPRIS2 which in Tauon is independent of the audio playback backend.

Scotty-Trees commented 3 years ago

I'd just like to comment to add I have also had this issue as well with music randomly stopped playing, with no way to resume playback other than to restart the app, very similar to OP's issue. It doesn't happen often, and it's quite random when it does, but I think I may be able to reproduce it a bit more when shuffle all songs is enabled. I'm also on a decent machine and flatpak is fully up to date. I haven't tried the Phazor backend, but I'll give it a try (glad fade in/out on pause works with Phazor btw!). I also do have the Level Meter on as well. For what it's worth, I don't have any WAV or FLAC files in my music folder, so perhaps those might not be the underlying issue entirely, but I could be wrong ;)

Taiko2k commented 3 years ago

Does this issue persist with v6.3.3? (with GStreamer selected)

Scotty-Trees commented 3 years ago

I've been using Phazor for the last week (my go to btw), and it did crash once while I was dragging and skipping through a track, but I don't know if that is necessarily Phazor related or not, but I'll keep my eye on that. But in the meantime I'll try my best to assist with this bug and I will which over to GStreamer and see if this happens again, but like I said above, when it does happen, it happens randomly, so I may not be able to reproduce it right away if at all, but if you give me a day or two or maybe even three I may be able to tell if the issue is surely there or not.

Edit: for reference these are my GStreamer settings. Screenshot from 2020-10-10 20-44-07

Taiko2k commented 3 years ago

I just ask since I received one report that it had been fixed, so I wanted to see if it was still happening with you guys too.

and it did crash once while I was dragging and skipping through a track, but I don't know if that is necessarily Phazor related or not

If it crashed while you were scrubbing, it likely was Phazor related. Gaah not good, specially if it happens rarely, makes the bug hard to find.

If you get Tauons log in your system journal, it would be a little helpful if you could copy and paste the error. (Though IDK if segfaults show in the log or not)

Scotty-Trees commented 3 years ago

I don't know if this log is helpful at all, but it's all I could find at the moment:

edit: segfault says: /app/bin/com.github.taiko2k.tauonmb.sh: line 5: 13 Segmentation fault (core dumped) python3 /app/bin/tauon.py "$@"

Screenshot from 2020-10-10 22-11-33

edit2: i did I search for ALL and this turned up two additional errors that may be of use to you hopefully, though I suspect this is maybe the Phazor error with libmpg, but I'm totally not sure: error says: traps: tauonmb[75355] general protection fault ip:7f42c8ba0934 sp:7f42bbffee90 error:0 in libmpg123.so.0.44.9[7f42c8b8a000+3b000]

Screenshot from 2020-10-10 22-15-45

Taiko2k commented 3 years ago

@Scotty-Trees Oh, yeah does seem mpg123 related then. I did update the Flatpak runtime yesterday, so let me know if you run into that crash again.

Scotty-Trees commented 3 years ago

I just updated Tauon/flatpak runtime a few hours ago today so I should be all fully up-to-date, but for this mpg123 related error, would you rather I attempt to check that with GStreamer or Phazor? Like I mentioned above, I just switched back to GStreamer to test this bug at the moment, but generally I'd like to continue to test and use your Phazor protocol.

Taiko2k commented 3 years ago

@Scotty-Trees I'd say just use what you prefer to use.

Scotty-Trees commented 3 years ago

@Taiko2k No worries, I'll stick with GStreamer for a couple days to test if the audio ever randomly stops or not and if I don't notice it happen again, I'll go back to Phazor where I'm sure we'll have an interesting time discovering a few errors here or there! (I mean that in a nice way of course!)

demeralde commented 3 years ago

@Taiko2k this hasn't happened to me for a long time, now, and I've been using the app a lot. So I guess it's fixed? I'm still using GStreamer.

Scotty-Trees commented 3 years ago

Just wanted to throw out a quick update, which may or may not mean anything. I was using Tauon on shuffle, I had new flatpak updates, so I opened a terminal and updated them and then Tauon decided to stop playing music. Now I'm assuming that while I was updating the flatpak runtimes Tauon didn't like that and maybe that's why it stopped playing music. But I couldn't play anything. The progress track bar was glitching out back and forth between 2:31 and 2:32 back and forth. Like I said, I'm assuming this is because I updated flatpak while the app was running. There wasn't any worth while logs to show, but if it helps any, these are the flatpak runtimes that I was updating when Tauon more or less froze playback wise. I closed and restarted Tauon once all the flatpaks were updated and songs seem to play fine again. Just a heads up, in case this means anything to you :)

Screenshot from 2020-10-12 20-32-35

Scotty-Trees commented 3 years ago

Been about a week now using the GStreamer plugin exclusively, and just grabbed the new v6.4.0 update btw (thank you!!) and I just want to mention that GStreamer has worked without issue this whole week and the audio didn't randomly stop once, so I think it's safe to say this issue as been resolved man, keep up the great work!

Taiko2k commented 3 years ago

@Scotty-Trees Thanks for the update! I'll close this then. Can open a new issue or reopen this one if the issue arises again.