Elleo / cutespotify

A QT5 Spotify client, based on MeeSpot with support for Ubuntu Touch and SailfishOS.
BSD 3-Clause "New" or "Revised" License
55 stars 25 forks source link

Segmentation fault on startup #9

Open Mohjive opened 10 years ago

Mohjive commented 10 years ago
09:29:11.653 E [ap:4210] ChannelError(10, 1, playlist)

09:29:11.653 E [ap:4210] ChannelError(8, 1, playlist)

09:29:11.758 E [ap:4210] ChannelError(7, 1, playlist)

09:29:14.484 E [ap:4210] ChannelError(18, 1, playlist)

09:29:14.500 E [ap:4210] ChannelError(14, 1, playlist)

09:29:14.500 E [ap:4210] ChannelError(10, 1, playlist)

09:29:14.501 E [ap:4210] ChannelError(7, 1, playlist)

09:29:14.749 E [ap:4210] ChannelError(22, 1, playlist)

09:29:14.749 E [ap:4210] ChannelError(24, 1, playlist)

09:29:14.749 E [ap:4210] ChannelError(26, 1, playlist)

09:29:14.749 E [ap:4210] ChannelError(23, 1, playlist)

09:29:14.749 E [ap:4210] ChannelError(21, 1, playlist)

09:29:14.876 E [ap:4210] ChannelError(30, 1, playlist)

09:29:14.876 E [ap:4210] ChannelError(29, 1, playlist)

09:29:15.004 E [ap:4210] ChannelError(36, 1, playlist)

09:29:15.004 E [ap:4210] ChannelError(33, 1, playlist)

09:29:15.081 E [ap:4210] ChannelError(46, 1, playlist)

09:29:15.081 E [ap:4210] ChannelError(44, 1, playlist)

09:29:15.088 E [ap:4210] ChannelError(41, 1, playlist)

Program received signal SIGSEGV, Segmentation fault.
0x00000000 in ?? ()
(gdb) bt
#0  0x00000000 in ?? ()
#1  0x4015c540 in sp_track_add_ref () from /usr/share/harbour-cutespotify/lib/libspotify.so.12
#2  0x2a01bbdc in QSpotifyTrack::QSpotifyTrack (this=0x2ac92e00, track=0x2ae15f58, playlist=0x2a4e4138)
    at ../libQtSpotify/qspotifytrack.cpp:69
#3  0x2a01eff0 in QSpotifyPlaylist::addTrack (this=0x2a4e4138, track=0x401a6ff8, pos=473)
    at ../libQtSpotify/qspotifyplaylist.cpp:284
#4  0x2a01fa64 in QSpotifyPlaylist::event (this=0x2a4e4138, e=0x2a344468)
    at ../libQtSpotify/qspotifyplaylist.cpp:336
#5  0x41398f8c in QCoreApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5
#6  0x41398fe4 in QCoreApplication::notify(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5
#7  0x41398c78 in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5
#8  0x4139b7f8 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) ()
   from /usr/lib/libQt5Core.so.5
#9  0x41868770 in ?? () from /usr/lib/libdbus-glib-1.so.2
#10 0x2a112bc0 in ?? ()
#11 0x2a112bc0 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb)
Mohjive commented 10 years ago

Debug output and another backtrace: https://gist.github.com/Mohjive/8298253

Elleo commented 10 years ago

Thanks, those ChannelError messages are coming from libspotify and apparently relate to playlist caching issues (not something I've come across before); I assume you've got a reasonable amount of free space on the device?

Mohjive commented 10 years ago

yes Filesystem Size Used Avail Use% Mounted on rootfs 14G 1.9G 12G 15% / /dev/mmcblk0p28 14G 1.9G 12G 15% / devtmpfs 406M 64K 406M 1% /dev tmpfs 407M 25M 382M 7% /dev/shm tmpfs 407M 8.9M 398M 3% /run tmpfs 407M 0 407M 0% /sys/fs/cgroup tmpfs 407M 24K 407M 1% /tmp /dev/mmcblk0p25 8.0M 4.2M 3.8M 54% /persist /dev/mmcblk0p19 8.0M 4.1M 3.9M 52% /drm /dev/mmcblk0p18 64M 45M 20M 70% /firmware /dev/mmcblk0p9 48M 8.8M 39M 19% /var/systemlog /dev/mmcblk0p28 14G 1.9G 12G 15% /swap /dev/mmcblk0p28 14G 1.9G 12G 15% /home tmpfs 407M 0 407M 0% /mnt/asec tmpfs 407M 0 407M 0% /mnt/obb

sandsmark commented 9 years ago

for me it seems related to offline playlists. and possibly invalid tracks? I have some tracks in playlists that are deleted from spotify, and also some local files.

for the issue at hand; you call sp_track_add_ref on a nullpointer (i. e. the QSpotifyTrack constructor is called with a nullpointer). Would probably make sense to add some null checks there.

The constructor is called from QSpotifyPlaylist::addTrack(), but that just passes on the pointer, so I need to do more debugging to see where the null pointer comes from.