I have used the Psyonspotify code as the framework for integrating libspotify into my application. I stripped out a lot of the code as my application only needs to query tracks and create playlists, but the initialisation and run loop code I have kept.
I am using libspotify 12.1.51. I am testing on a HTC One running Android 4.2.2.
The library is performing well and I can login, query playlists, query tracks, create playlist and add tracks to playlists exactly how I want to. The problem is that somewhat randomly the application bails out with a SIGSEGV. I cannot pin down exactly where it happens, but it is definitely happening (occasionally) on calls to sp_session_process_events. As advised in a separate post I have guarded certain calls with a check on the connection state (sp_session_connectionstate).
In trying to find a solution I have come across issue-78 for cocoalibspotify on GitHub, the last comment (as of today) on which reads:
I'm getting a very similar crash in a vanilla libspotify-12.1.51 Mac app. Crashing in sp_error_message after session_process_events when the wifi drops.
I know that I have a really flakey wi-fi connection in my office and also a very weak 3G signal, could anyone from Spotify comment on whether this could be the cause of my difficulties? And if it is, is there any way that I can guard against it, or do I just need to wait for a new release of the library?