Kodi v17 Playback crash on "Pause"

Hi guys. I have had this same/similar issue as both livin and Norm and have been following this thread. I was hoping it would go away with the march update but it did not.

My problem is that if I pause for more than 2 minutes and start the video again it will play for only a few seconds and then Kodi freezes but not the operation system.

I don’t have any bluetooth devise operating with my Raspberry Pi 3. But I do have A HiFi-berry Pro digi sound module connected.

Here are my logs:
http://paste.osmc.io/upaweyizon

Thanks so much for your support, I hope this helps. If my issue is not the same Im happy to make a new thread. Just let me know

Hi Guys

It looks like this could be a Kodi issue, especially as @hedinn does not have a2dp-app-osmc installed and is still seeing the issue

I think the BTPlayer crash @livin was seeing was completely unrelated I can see in his latest log

21:05:44.578 T:1313862640  NOTICE: running thread: CVideoPlayerAudio::Process()
21:05:44.596 T:1313862640  NOTICE: Creating audio stream (codec id: 86018, channels: 2, sample rate: 44100, no pass-through)
21:05:44.638 T:1958175664  NOTICE: Display resolution ADJUST : 1920x1080 (1920x1080) @ 50.00 - Full Screen (49) (weight: 0.000)
21:05:44.815 T:1958175664  NOTICE: VideoPlayer: OnLostDisplay received
21:05:45.033 T:1958175664  NOTICE: VideoPlayer: OnResetDisplay received
21:06:39.194 T:1558705136  NOTICE: ES: Client  from ::ffff:192.168.178.45 timed out
21:07:13.089 T:1958175664  NOTICE: CVideoPlayer::CloseFile()

So to me it look like OnLostDisplay() or OnResetDisplay() are triggering CloseFile() but I am not sure what triggers these methods or what they do maybe @popcornmix might have some idea

Gerald

Hi guys. Same problem here. It is really annoying. I use official BT dongle (tried also th built-in RPi3 one. Didn’t help). I didn’t replace the files with ones from git.

My logs: http://paste.osmc.io/qosotadari

I think the problem is somewhere around here:

19:09:00.178 T:1630655472   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.AttributeError'>
                                            Error Contents: 'NoneType' object has no attribute 'Pause'
                                            Traceback (most recent call last):
                                              File "/usr/share/kodi/addons/service.osmc.btplayer/service.py", line 200, in onPlayBackPaused
                                                self.btPlayer.pause()
                                              File "/usr/share/kodi/addons/service.osmc.btplayer/service.py", line 169, in pause
                                                self.player.Pause(dbus_interface=PLAYER_IFACE)
                                            AttributeError: 'NoneType' object has no attribute 'Pause'
                                            -->End of Python script error report<--

I believe this is fixed in this commit:

Hi @sam_nazarko,
thanks for support!
I’ve just copied file and unfortunately fix doesn’t work for me :frowning:
same behavior
Regards,
Max

Hi, I have been away from my pi for a month. Now I have replaced service.py with the patched version from git and the problem still occurs. I have replaced the file a few days ago and used the pi several times (multiple shutdowns and restarts meanwhile). I uploaded logs with replaced service.py

http://paste.osmc.io/ipowejeseg

I believe, the problems start somewhere around 18:11.

@sam_nazarko, will you please look at the issue? There is obviously something else stopping the playback, while the fix didn’t help.

@livin, @matejmosko, @gezb, @sam_nazarko

Did this issue get fixed for you guys?
It has not for me and Im at the point where Im giving up on standing up and restarting my devise every time I pause a video.

I did start a new thread with this issue to try to pump life in to it again, but with no results

Regards,
Hedinn

Hi @hedinn

Sorry – but we struggled to reproduce this problem. If the issue can be reproduced locally we might be able to investigate further.

Do you experience the problem without BTPlayer?

Hi @hedinn, hi @sam_nazarko
I read release notes for august release and was hoping the issue is fixed (“Fix for a possible crash when using ALSA for audio output”).
But it does not change behavior in my case - still crash on pause after 1-2 mins.

That’s a Kodi fix.

Sorry – but because we can’t reproduce the problem we’re not sure how to fix it.
If you are familiar with how to use gdb we may be able to get a backtrace.

Hi guys, thanks for your inputs

I don’t think my issue is with BTPlayer @sam_nazarko. I don’t have a BTPlayer add-on and Im not using any bluetooth devise with my RP3.

However I see in my log:

18:34:49.136 T:1958592512 DEBUG: CPlayerCoreConfig::: created player BTPlayer

In my logs around the time my system freezes, I see this line.

18:57:08.380 T:1458193392 WARNING: CRenderManager::WaitForBuffer - timeout waiting for buffer

Here are two log where I my system has frozen:
https://paste.osmc.tv/zelacemowi
https://paste.osmc.tv/etitigimad

@livin I was hoping that the august update would fix the problem, since basically only changes I made to my setup from being standard is with ALSA. I have a HiFi Berry module. But unfortunately the august update did not fix my problem either.

@sam_nazarko Im going to familiarise myself with GDB and hopefully give you better data.

Regards,
Hedinn

Does removing the HifiBerry module improve stability?
Really it depends on how often you can reproduce the problem. If it goes away sans HifiBerry that would be interesting.

I can always reproduce the issue. Always when I press pause and start again it freezes.

I did a quick test just now and put my sd card into another RP3 that I have, and does not have HiFi Berry and the issue did not happen then, so the problem must be with the HiFi Berry :frowning:

Just for info I have the HiFi Berry Digi+ Pro

I have no HiFi berry, just streaming to jbl charge using usb bluetooth dongle

This is probably another issue than the one described above. We are not talking about the freeze. The issue is just playback crashing after the video has been paused.

  1. Play video
  2. Pause it
  3. Wait for a moment
  4. The video stops and OSMC gets back to list of videos

Workaround for this issue is disabling BTPlayer. Look here: Kodi v17 Playback crash on “Pause” with BT speaker · Issue #367 · osmc/osmc · GitHub

Hi All,
the issue is definitely in btplayer. I’ve disabled it through UI and have no kodi crashes anymore. Meanwhile streaming I need (kodi => bluetooth => jbl charge) works fine.
@sam_nazarko @matejmosko @gezb

IIRC, you can’t actually disable BTPlayer, so I’m not sure if it’s that.
I don’t know why only a few people can reproduce the problem.

Can you reproduce it on demand? Then we could debug the problem.

Sam

hi @sam_nazarko
the funny thing you can’t disable btplayer using “Disable” button in addon settings, but using “Configure” button you can - there is check box (slider) “Enable” inside. Now I have only “My OSMC” and “Updates” in add-ons\Running


Regards,
Max

I need to fix that so it can’t be disabled without manual removal.

Sam