After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 611864 - Crash on unhandled SQL syntax error for smart playlists
Crash on unhandled SQL syntax error for smart playlists
Status: RESOLVED DUPLICATE of bug 611128
Product: banshee
Classification: Other
Component: Smart Playlists
1.5.4
Other Linux
: Normal critical
: 1.x
Assigned To: Banshee Maintainers
Banshee Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-03-05 03:04 UTC by Thomas Sibley
Modified: 2010-03-05 03:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Crash log with debugging on (8.22 KB, text/x-log)
2010-03-05 03:04 UTC, Thomas Sibley
Details

Description Thomas Sibley 2010-03-05 03:04:16 UTC
Created attachment 155278 [details]
Crash log with debugging on

Short version:

There's an errant comma before the LIMIT clause of some (most?) smart playlists.  It causes Banshee to crash when the user tries to view the playlist, or, at least in the case of the playlist below, to crash when a song finishes playing and the playlist is auto-updated.


The basic details:

[Debug 21:50:14.664] Exception executing command: DELETE FROM CoreSmartPlaylistE
ntries WHERE SmartPlaylistID = 17;
                  INSERT INTO CoreSmartPlaylistEntries
                    (EntryID, SmartPlaylistID, TrackID)
                    SELECT NULL, 17 as SmartPlaylistID, TrackId FROM CoreTracks,
CoreAlbums,CoreArtists
                        WHERE CoreArtists.ArtistID = CoreTracks.ArtistID AND Cor
eAlbums.AlbumID = CoreTracks.AlbumID AND CoreTracks.PrimarySourceID = 1
                        AND ((CoreTracks.LastPlayedStamp > 1267753810 AND CoreTr
acks.LastPlayedStamp IS NOT NULL)) ORDER BY CoreTracks.LastPlayedStamp DESC,  LI
MIT 25
Mono.Data.Sqlite.SqliteException: Sqlite error
near "LIMIT": syntax error
  at Mono.Data.Sqlite.Sqlite3.Prepare (System.String strSql, Mono.Data.Sqlite.Sq
liteStatement previous, System.String& strRemain) [0x00000]


sqlite> select * from CoreSmartPlaylists where SmartPlaylistId=17;
1|17|Just Played|<request><query banshee-version="1"><lessThan><field name="lastplayed" /><date factor="Hour" type="rel">-3600</date></lessThan></query></request>|LastPlayedStamp-DESC|25|songs|3|0


An entire debug log is attached.  Feel free to ask me questions about this issue.  I'd love a way to fix it sans killing all my smart playlists with limits...
Comment 1 Alexander Kojevnikov 2010-03-05 03:08:56 UTC
Thanks for taking the time to report this bug.
This particular bug has already been reported into our bug tracking system, but we are happy to tell you that the problem has already been fixed. It should be solved in the next software version. You may want to check for a software upgrade.

*** This bug has been marked as a duplicate of bug 611128 ***