Skip to content
This repository was archived by the owner on Jun 15, 2022. It is now read-only.
/ pyspotify Public archive
This repository was archived by the owner on Jun 15, 2022. It is now read-only.

Max recursion level exceeded by playlist_update_in_progress callback #165

@DavisNT

Description

@DavisNT

When using pyspotify==2.0.0 with Mopidy==1.0.5 and Mopidy-Spotify==2.0.0 (commit 70f27932cb in develop) Mopidy crashes after some time with stacktrace:

From cffi callback <function playlist_update_in_progress at 0x383acb0>:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/spotify/playlist.py", line 647, in playlist_update_in_progress
    spotify._session_instance, sp_playlist, add_ref=True)
  File "/usr/local/lib/python2.7/dist-packages/spotify/__init__.py", line 58, in wrapper
    return f(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/spotify/playlist.py", line 47, in _cached
    playlist = Playlist(session, sp_playlist=sp_playlist, add_ref=add_ref)
  File "/usr/local/lib/python2.7/dist-packages/spotify/playlist.py", line 68, in __init__
    lib.sp_playlist_add_ref(sp_playlist)
  File "/usr/local/lib/python2.7/dist-packages/spotify/__init__.py", line 57, in wrapper
    with _lock:
  File "/usr/lib/python2.7/threading.py", line 126, in acquire
    self._note("%s.acquire(%s): recursive success", self, blocking)
RuntimeError: maximum recursion depth exceeded
From cffi callback <function playlist_update_in_progress at 0x383acb0>:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/spotify/playlist.py", line 647, in playlist_update_in_progress
    spotify._session_instance, sp_playlist, add_ref=True)
  File "/usr/local/lib/python2.7/dist-packages/spotify/__init__.py", line 58, in wrapper
    return f(*args, **kwargs)
  File "/usr/lib/python2.7/threading.py", line 155, in __exit__
    self.release()
  File "/usr/lib/python2.7/threading.py", line 152, in release
    self._note("%s.release(): non-final release", self)
RuntimeError: maximum recursion depth exceeded
From cffi callback <function playlist_update_in_progress at 0x383acb0>:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/spotify/playlist.py", line 647, in playlist_update_in_progress
    spotify._session_instance, sp_playlist, add_ref=True)
  File "/usr/local/lib/python2.7/dist-packages/spotify/__init__.py", line 58, in wrapper
    return f(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/spotify/playlist.py", line 47, in _cached
    playlist = Playlist(session, sp_playlist=sp_playlist, add_ref=add_ref)
  File "/usr/local/lib/python2.7/dist-packages/spotify/playlist.py", line 68, in __init__
    lib.sp_playlist_add_ref(sp_playlist)
  File "/usr/local/lib/python2.7/dist-packages/spotify/__init__.py", line 57, in wrapper
    with _lock:
RuntimeError: maximum recursion depth exceeded while calling a Python object
*** glibc detected *** /usr/bin/python: double free or corruption (!prev): 0x07234860 ***

The problem occurred after playing Spotify and local tracks on Mopidy and afterwards stopping playback and leaving Mopidy running for some hours. This was observed several times ("randomly" without trying to reproduce the issue or understand what caused it). This was the first time this issue happened after enabling logging of Mopidy stdout/stderr to file (the exception/stacktrace is not written to Mopidy logfile). This happened on Raspbian (Raspberry Pi model B).

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions