Kodi v17 Playback crash on "Pause"

Hi Community!
I have an issue with playback crash (BTplayer) when put movie on pause.
I guess the reason is somewhere here:

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<–

Here is full debug log:
http://paste.osmc.io/kexibasivo.vhdl

What could be the reason?

CC @gezb

Hi @livin

Could you give me some more info about how you reproduce this error

I can’t seem to reproduce it

Thanks

Hi @gezb,

  • turn on osmc
  • start the video (streaming, log timestamp ~ 01:33:30.714 T:1958704048)
  • press pause
  • after ~30 sec on pause the video player is crashing (stops) timestamp ~01:34:11.105 T:1653339120
    Thanks for support.

@gezb, I’ve made another logs with youtube video:
http://paste.osmc.io/xorarisaso

Steps I made:

  1. turned on osmc
  2. went to favorites
  3. started youtube video from favorites (timestamp ~ 19:26:14.692 T:1958261680)
  4. pressed “pause” in Yatse app (~ 19:26:22.046 T:1958253552)
  5. on 19:27:37.637 T:1958261680 video player closed.

And again I have following in logs:

19:26:22.128 T:1644164080 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<–

Hi @livin

We have found this issue and have a fix, it will be released in a future update which should be soon

It is now a month and this annoying bug is still in there making the whole system pretty much useless for me (I use bluetooth audio streaming quite often). Will this be fixed soon?

1 Like

Yes.

Thanks for your patience

Installed the latest update today - still the same crap. Very disappointing.

I am out now and try my luck with a different distro. Good luck with osmc.

You didn’t provide a log, so we can’t even be certain that the thread you replied to is related to the problem you are experiencing.

The fact is, the issue above is solved. If you don’t think it is, please provide a log so you can either prove otherwise or so we can fix the completely separate issue (which would have warranted a new thread).

You’re running experimental Bluetooth (A2DP) improvements to OSMC.

Good luck with the other distro. I hope you provide them with logs or a better attitude.

We’re still willing to help you, but you should tone back the attitude. We can’t fix anything if you don’t follow the proper procedure for reporting issues.

Once again, Naz is being too nice.

Don’t let the door hit you where the good Lord split you.

Hi Folks,
I can confirm, the issue is not fixed after last update.
Same behavior as month before (my post from Feb 19 - same steps with youtube)

20:25:25.569 T:1661727728 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<–

Logs:
http://paste.osmc.io/ocupuziduj

I guess, the reason is that the changes @gezb made at GIT are not included into update :joy:
I checked my /usr/share/kodi/addons/service.osmc.btplayer/service.py and it’s old (03.02.2017)

The question now, where the changes are released (@gezb mentioned “future update” that’s why I expected to see it in “official” update)?
“deb http://apt.osmc.tv jessie-devel main”?
CC @sam_nazarko

I’ll take a closer look at this soon. If it’s not included, then I’ll get it in for the next update (April)

Hi Sam,
any news? I’ve tried replace service.py in my rpi3 to updated from git, but don’t see positive changes - same crash on pause.
Either I have to compile it somehow or fix does not work :grinning:
Thanks

UPDATE: there is no more error message in log with updated service.py from git, but the crash is still in place. It looks like error handling was “improved”, but the “cause” is not resolved.
@gezb, I can you provide logs, if you are interested

Hi – meant to reply to this on Friday but missed it.

If replacing the file doesn’t improve things, then it probably doesn’t resolve the issue. I don’t believe @gezb could replicate it first hand, so that makes sense.

Some logs when the problem occurs again may be helpful

Sam

Sorry have been away for a week

Debug logs would be helpful I am struggling to recreate the issue locallly

Hi @gezb,
ok, I will provide logs from updated service.py today / tomorrow.
But actually I did fresh OS install between my first and current claim, and the bug reproducible on both systems.
Just try pausing any youtube video for couple of minutes.

UPDATE: Hi, @gezb! Here you are: http://paste.osmc.io/inijonodoc.dos
The issue is here:

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()
21:07:13.089 T:1958175664 NOTICE: VideoPlayer: waiting for threads to exit
21:07:13.093 T:1410057200 NOTICE: CVideoPlayer::OnExit()
21:07:13.093 T:1410057200 NOTICE: Closing stream player 1
21:07:13.093 T:1410057200 NOTICE: Waiting for audio thread to exit
21:07:13.093 T:1313862640 ERROR: Got MSGQ_ABORT or MSGO_IS_ERROR return true
21:07:13.094 T:1313862640 NOTICE: thread end: CVideoPlayerAudio::OnExit()
21:07:13.094 T:1410057200 NOTICE: Closing audio device
21:07:13.096 T:1410057200 NOTICE: Deleting audio codec
21:07:13.096 T:1410057200 NOTICE: Closing stream player 2
21:07:13.096 T:1410057200 NOTICE: waiting for video thread to exit
21:07:13.096 T:1322251248 ERROR: Got MSGQ_ABORT or MSGO_IS_ERROR return true
21:07:13.096 T:1322251248 NOTICE: thread end: video_thread
21:07:13.097 T:1410057200 NOTICE: deleting video codec
21:07:13.125 T:1958175664 NOTICE: VideoPlayer: finished waiting
21:07:13.421 T:1958175664 NOTICE: CVideoPlayer::CloseFile()

Hi @livin

I am still struggling to recreate your issue, I have tried without a BT Adapter, with Adapter but no phone paired and also with the phone connected

I also cant see any mention of BTPlayer in your latest log where the CloseFile() is called.

Would you be able to try this without osmc-app-a2dp installed to prove it is being caused by the streaming package.

I can understand why BTPlayer would have caused this with the previous version of service.py but cant see why the latest version from GIT which you say has solved the crash

Thanks

Gerald

Hi Gerald,
thx for support.
Unfortunaty, don’t have time to re-install now.
Could following cause issue?

21:12:29.607 T:1660941296 DEBUG: BTPlayer: Could not find a player

thx

No that is basicly saying a device connected via a2dp could not be found . I’ll look at improving that log message or even making it debug only