geigi/cozy

Cozy fails to load next chapter

Opened this issue · 8 comments

Bug/Feature description

This is a rare case I've experienced with cozy. vary rarely (I would guess around 1% of the time), when loading the next chapter in a book, it will fail to load the next chapter in one of three ways:

  1. Cozy will stop playing and display a gstplayer error and be unable to play the book anymore until it's restarted. Output on console:
    15:56:58 [MainThread  ] [mediaplaye] [INFO ]  Loading new file for chapter.
    15:56:59 [MainThread  ] [gst_player] [INFO ]  Dispose
    15:56:59 [Thread-51   ] [mediaplaye] [INFO ]  Loading new file for chapter.
    /usr/lib/python3.11/site-packages/gi/overrides/GObject.py:493: Warning: ../gobject/gsignal.c:2777: instance '0xffff38001c60' has     no handler with id '16651'
      return func(*args, **kwargs)
    15:56:59 [Thread-51   ] [gst_player] [INFO ]  Dispose
    15:57:04 [Thread-51   ] [gst_player] [INFO ]  Failed to seek, counter expired.
    15:57:04 [MainThread  ] [gst_player] [INFO ]  Failed to seek, counter expired.
    15:57:04 [MainThread  ] [gst_player] [ERROR]  Could not determine volume because player is not loaded.
    15:57:04 [MainThread  ] [gst_player] [ERROR]  12: gst-core-error-quark: Your GStreamer installation is missing a plug-in. (12)
    15:57:04 [MainThread  ] [power_mgr ] [INFO ]  Uninhibited standby.
    15:57:04 [MainThread  ] [gst_player] [ERROR]  12: gst-core-error-quark: Your GStreamer installation is missing a plug-in. (12)
    15:57:04 [MainThread  ] [gst_player] [ERROR]  1: gst-stream-error-quark: Internal data stream error. (1)
    15:57:04 [MainThread  ] [gst_player] [ERROR]  1: gst-stream-error-quark: Internal data stream error. (1)
    15:57:04 [MainThread  ] [gst_player] [ERROR]  Could not determine volume because player is not loaded.
    
    
    (The ERRORS from a minute later are me trying to tell it to play the audiobook from cozy's interface after the failure)
  2. Cozy will just restart the current chapter and not move onto the next chapter
    19:31:56 [MainThread  ] [mediaplaye] [INFO ]  Loading new file for chapter.
    /usr/lib/python3.11/site-packages/gi/overrides/GObject.py:493: Warning: ../gobject/gsignal.c:2777: instance '0xffff10072be0' has no handler with id '19163'
      return func(*args, **kwargs)
    19:31:56 [MainThread  ] [gst_player] [INFO ]  Dispose
    19:31:57 [MainThread  ] [power_mgr ] [INFO ]  Inhibited standby.
    
  3. Cozy just exits without anything printed to the console. (Nothing in dmesg, so I don't think it was oomkilled.)

Steps to reproduce

Just normal listening to audiobooks. I can't reproduce this reliably. I see this more often on books with lots of short chapters.

System Information

  • Operating System: PureOS 10
  • Installation source: flatpak
  • Version of cozy: current master (I saw this in 1.2.1 as well)

Trying to get gst debug information on this

I think this might be happening to me too.

Interestingly, I replicated this with the RPM, flatpak, and beta flatpak.

Sounds definitely like a bug, maybe a race condition?

I don't know, but I think it is desync. Earlier chapters seem to desync, and later ones don't play at all. The files work fine in other players

Is there any possibility to test this 'upstream'? I don't know how Cozy streams, but if there is a usable upstream, we can see if this is the cause.

Cozy uses GStreamer for playback. I haven't delved deeper into this issue, but from the logs and your experience, it seems that the bug is in Cozy itself.
There has been some refactoring of the player architecture recently that has improved playback position tracking and other time-related things, so the problem may have been resolved, but I'm not sure.

You can get the latest Flatpak build of Cozy by going on the actions page, clicking on the latest succeeded CI action, and downloading the artifact from the bottom of the page.

I tried it, and it had the same issue. The new layout looks great, though I had an ... amusing bug that made my cursor massive. As I said, I don't think it is playback that is the issue, but it might be the metadata reading. Because the chapter page shows too-long timestamps.