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 696520 - Banshee crashes when clicking on a playlist
Banshee crashes when clicking on a playlist
Status: RESOLVED FIXED
Product: banshee
Classification: Other
Component: general
2.6.x
Other Linux
: Normal critical
: ---
Assigned To: Banshee Maintainers
Banshee Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-03-24 22:46 UTC by cidthecoatrack
Modified: 2016-08-02 13:00 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description cidthecoatrack 2013-03-24 22:46:28 UTC
Occasionally, Banshee crashes for no known reason.  After crashing, if I click on a playlist, Banshee crashes again.  I have tried using sqlite3 to clean any possible corruption from the database, but that does not fix it.  I have restored the database to an earlier backup, which means it will run for 10 or so minutes before crashing and starting the same problem over again.  This is the last error message I get:

[Warn  18:28:25.305] Caught an exception - System.ArgumentNullException: Argument cannot be null. (in `mscorlib')
  at System.Int32.Parse (System.String s, NumberStyles style, IFormatProvider provider) [0x00000] in <filename unknown>:0 
  at System.Int32.Parse (System.String s, NumberStyles style) [0x00000] in <filename unknown>:0 
  at Banshee.Hardware.Gio.UsbDevice.GetVendorId (IUsbDevice device) [0x00000] in <filename unknown>:0 
  at Banshee.Hardware.Gio.UsbDevice.get_VendorId () [0x00000] in <filename unknown>:0 
  at Banshee.Dap.MassStorage.DeviceMapper.Map (Banshee.Dap.MassStorage.MassStorageSource source) [0x00000] in <filename unknown>:0 
  at Banshee.Dap.MassStorage.MassStorageSource.DeviceInitialize (IDevice device) [0x00000] in <filename unknown>:0 
  at Banshee.Dap.DapService.FindDeviceSource (IDevice device) [0x00000] in <filename unknown>:0 
bpm_detect got error: Your GStreamer installation is missing a plug-in. gstdecodebin2.c(3576): gst_decode_bin_expose (): /GstPipeline:pipeline/GstDecodeBin2:decodebin2:
no suitable plugins found
bpm_detect got error: Your GStreamer installation is missing a plug-in. gstdecodebin2.c(3576): gst_decode_bin_expose (): /GstPipeline:pipeline/GstDecodeBin2:decodebin2:
no suitable plugins found
bpm_detect got error: Internal data flow error. gstbasesrc.c(2625): gst_base_src_loop (): /GstPipeline:pipeline/GstFileSrc:filesrc:
streaming task paused, reason not-linked (-1)
Exception in Gtk# callback delegate
  Note: Applications can use GLib.ExceptionManager.UnhandledException to handle the exception.
System.OverflowException: Number overflow.
  at System.Int64.System.IConvertible.ToInt32 (IFormatProvider provider) [0x00000] in <filename unknown>:0 
  at System.Convert.ToInt32 (System.Object value, IFormatProvider provider) [0x00000] in <filename unknown>:0 
  at System.Convert.ToInt32 (System.Object value) [0x00000] in <filename unknown>:0 
  at Hyena.Data.Sqlite.HyenaSqliteConnection.Execute (Hyena.Data.Sqlite.HyenaSqliteCommand command) [0x00000] in <filename unknown>:0 
  at Hyena.Data.Sqlite.HyenaSqliteConnection.Execute (System.String command_str, System.Object[] param_values) [0x00000] in <filename unknown>:0 
  at Banshee.SmartPlaylist.SmartPlaylistSource.Refresh () [0x00000] in <filename unknown>:0 
  at Banshee.SmartPlaylist.SmartPlaylistSource.Reload () [0x00000] in <filename unknown>:0 
  at Banshee.Sources.DatabaseSource.Activate () [0x00000] in <filename unknown>:0 
  at Banshee.Sources.SourceManager.SetActiveSource (Banshee.Sources.Source source, Boolean notify) [0x00000] in <filename unknown>:0 
  at Banshee.Sources.SourceManager.SetActiveSource (Banshee.Sources.Source source) [0x00000] in <filename unknown>:0 
  at Banshee.Sources.Gui.SourceView.OnButtonPressEvent (Gdk.EventButton press) [0x00000] in <filename unknown>:0 
  at Gtk.Widget.buttonpressevent_cb (IntPtr widget, IntPtr evnt) [0x00000] in <filename unknown>:0 
   at GLib.ExceptionManager.RaiseUnhandledException(System.Exception e, Boolean is_terminal)
   at Gtk.Widget.buttonpressevent_cb(IntPtr widget, IntPtr evnt)
   at Gtk.Application.gtk_main()
   at Gtk.Application.Run()
   at Banshee.Gui.GtkBaseClient.Run()
   at Banshee.Gui.GtkBaseClient.Startup()
   at Hyena.Gui.CleanRoomStartup.Startup(Hyena.Gui.StartupInvocationHandler startup)
   at Banshee.Gui.GtkBaseClient.Startup()
   at Banshee.Gui.GtkBaseClient.Startup(System.String[] args)
   at Nereid.Client.Main(System.String[] args)
   at System.AppDomain.ExecuteAssembly(System.AppDomain , System.Reflection.Assembly , System.String[] )
   at System.AppDomain.ExecuteAssemblyInternal(System.Reflection.Assembly a, System.String[] args)
   at System.AppDomain.ExecuteAssembly(System.String assemblyFile, System.Security.Policy.Evidence assemblySecurity, System.String[] args)
   at System.AppDomain.ExecuteAssembly(System.String assemblyFile)
   at Booter.Booter.BootClient(System.String clientName)
   at Booter.Booter.Main()

Is it some error I have with gstreamer?  Is there some other error?  I would assume something has been corrupted in my database is my guess, possibly maybe even in my older backup, but I don't know how to fix that since sqlite3 cleaning isn't working, let alone whether the database is even the issue.

As of right now, Banshee is unusable to me because of it crashing like this.
Comment 1 cidthecoatrack 2013-03-26 11:49:00 UTC
Here is the results from the first crash, after it has run for ten or so minutes. It looks like it s crashing when trying to update a smart playlist - again, looks like my database got corrupted, but I don't know how to repair it since a sqlite3 dump hasn't worked.

[Warn  07:42:30.636] Caught an exception - Hyena.Data.Sqlite.SqliteException: Sqlite error 11: database disk image is malformed (SQL: DELETE FROM CoreSmartPlaylistEntries WHERE SmartPlaylistID = 7;
                  INSERT INTO CoreSmartPlaylistEntries
                    (EntryID, SmartPlaylistID, TrackID)
                    SELECT NULL, 7 as SmartPlaylistID, TrackId FROM CoreTracks,CoreArtists,CoreAlbums
                        WHERE CoreArtists.ArtistID = CoreTracks.ArtistID AND CoreAlbums.AlbumID = CoreTracks.AlbumID AND CoreTracks.PrimarySourceID = 1
                        AND (((CoreTracks.TrackID NOT IN (SELECT TrackID FROM CoreSmartPlaylistEntries WHERE SmartPlaylistID = 81)) And (CoreTracks.TrackID NOT IN (SELECT TrackID FROM CoreSmartPlaylistEntries WHERE SmartPlaylistID = 8)))) ORDER BY CoreTracks.Rating DESC, CoreAlbums.ArtistNameSortKey ASC, CoreAlbums.TitleSortKey ASC, CoreTracks.Disc ASC, CoreTracks.TrackNumber ASC ) (in `Hyena.Data.Sqlite')
  at Hyena.Data.Sqlite.Connection.CheckError (Int32 errorCode, System.String sql) [0x00000] in <filename unknown>:0 
  at Hyena.Data.Sqlite.Connection.Execute (System.String sql) [0x00000] in <filename unknown>:0 
  at Hyena.Data.Sqlite.HyenaSqliteCommand.Execute (Hyena.Data.Sqlite.HyenaSqliteConnection hconnection, Hyena.Data.Sqlite.Connection connection) [0x00000] in <filename unknown>:0 

Unhandled Exception: Hyena.Data.Sqlite.SqliteException: Sqlite error 11: database disk image is malformed (SQL: DELETE FROM CoreSmartPlaylistEntries WHERE SmartPlaylistID = 7;
                  INSERT INTO CoreSmartPlaylistEntries
                    (EntryID, SmartPlaylistID, TrackID)
                    SELECT NULL, 7 as SmartPlaylistID, TrackId FROM CoreTracks,CoreArtists,CoreAlbums
                        WHERE CoreArtists.ArtistID = CoreTracks.ArtistID AND CoreAlbums.AlbumID = CoreTracks.AlbumID AND CoreTracks.PrimarySourceID = 1
                        AND (((CoreTracks.TrackID NOT IN (SELECT TrackID FROM CoreSmartPlaylistEntries WHERE SmartPlaylistID = 81)) And (CoreTracks.TrackID NOT IN (SELECT TrackID FROM CoreSmartPlaylistEntries WHERE SmartPlaylistID = 8)))) ORDER BY CoreTracks.Rating DESC, CoreAlbums.ArtistNameSortKey ASC, CoreAlbums.TitleSortKey ASC, CoreTracks.Disc ASC, CoreTracks.TrackNumber ASC )
  at Hyena.Data.Sqlite.Connection.CheckError (Int32 errorCode, System.String sql) [0x00000] in <filename unknown>:0 
  at Hyena.Data.Sqlite.Connection.Execute (System.String sql) [0x00000] in <filename unknown>:0 
  at Hyena.Data.Sqlite.HyenaSqliteCommand.Execute (Hyena.Data.Sqlite.HyenaSqliteConnection hconnection, Hyena.Data.Sqlite.Connection connection) [0x00000] in <filename unknown>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: Hyena.Data.Sqlite.SqliteException: Sqlite error 11: database disk image is malformed (SQL: DELETE FROM CoreSmartPlaylistEntries WHERE SmartPlaylistID = 7;
                  INSERT INTO CoreSmartPlaylistEntries
                    (EntryID, SmartPlaylistID, TrackID)
                    SELECT NULL, 7 as SmartPlaylistID, TrackId FROM CoreTracks,CoreArtists,CoreAlbums
                        WHERE CoreArtists.ArtistID = CoreTracks.ArtistID AND CoreAlbums.AlbumID = CoreTracks.AlbumID AND CoreTracks.PrimarySourceID = 1
                        AND (((CoreTracks.TrackID NOT IN (SELECT TrackID FROM CoreSmartPlaylistEntries WHERE SmartPlaylistID = 81)) And (CoreTracks.TrackID NOT IN (SELECT TrackID FROM CoreSmartPlaylistEntries WHERE SmartPlaylistID = 8)))) ORDER BY CoreTracks.Rating DESC, CoreAlbums.ArtistNameSortKey ASC, CoreAlbums.TitleSortKey ASC, CoreTracks.Disc ASC, CoreTracks.TrackNumber ASC )
  at Hyena.Data.Sqlite.Connection.CheckError (Int32 errorCode, System.String sql) [0x00000] in <filename unknown>:0 
  at Hyena.Data.Sqlite.Connection.Execute (System.String sql) [0x00000] in <filename unknown>:0 
  at Hyena.Data.Sqlite.HyenaSqliteCommand.Execute (Hyena.Data.Sqlite.HyenaSqliteConnection hconnection, Hyena.Data.Sqlite.Connection connection) [0x00000] in <filename unknown>:0
Comment 2 cidthecoatrack 2013-04-01 03:21:58 UTC
Update: now the source trigger has changed. Instead of clicking on a playlist, it seems to happen after a certain period of time:

[Warn  23:20:12.338] Caught an exception - Hyena.Data.Sqlite.SqliteException: Sqlite error 11: database disk image is malformed (SQL: DELETE FROM CoreSmartPlaylistEntries WHERE SmartPlaylistID = 7;
                  INSERT INTO CoreSmartPlaylistEntries
                    (EntryID, SmartPlaylistID, TrackID)
                    SELECT NULL, 7 as SmartPlaylistID, TrackId FROM CoreTracks,CoreArtists,CoreAlbums
                        WHERE CoreArtists.ArtistID = CoreTracks.ArtistID AND CoreAlbums.AlbumID = CoreTracks.AlbumID AND CoreTracks.PrimarySourceID = 1
                        AND (((CoreTracks.TrackID NOT IN (SELECT TrackID FROM CoreSmartPlaylistEntries WHERE SmartPlaylistID = 81)) And (CoreTracks.TrackID NOT IN (SELECT TrackID FROM CoreSmartPlaylistEntries WHERE SmartPlaylistID = 8)))) ORDER BY CoreTracks.Rating DESC, CoreAlbums.ArtistNameSortKey ASC, CoreAlbums.TitleSortKey ASC, CoreTracks.Disc ASC, CoreTracks.TrackNumber ASC ) (in `Hyena.Data.Sqlite')
  at Hyena.Data.Sqlite.Connection.CheckError (Int32 errorCode, System.String sql) [0x00000] in <filename unknown>:0 
  at Hyena.Data.Sqlite.Connection.Execute (System.String sql) [0x00000] in <filename unknown>:0 
  at Hyena.Data.Sqlite.HyenaSqliteCommand.Execute (Hyena.Data.Sqlite.HyenaSqliteConnection hconnection, Hyena.Data.Sqlite.Connection connection) [0x00000] in <filename unknown>:0 

Unhandled Exception: Hyena.Data.Sqlite.SqliteException: Sqlite error 11: database disk image is malformed (SQL: DELETE FROM CoreSmartPlaylistEntries WHERE SmartPlaylistID = 7;
                  INSERT INTO CoreSmartPlaylistEntries
                    (EntryID, SmartPlaylistID, TrackID)
                    SELECT NULL, 7 as SmartPlaylistID, TrackId FROM CoreTracks,CoreArtists,CoreAlbums
                        WHERE CoreArtists.ArtistID = CoreTracks.ArtistID AND CoreAlbums.AlbumID = CoreTracks.AlbumID AND CoreTracks.PrimarySourceID = 1
                        AND (((CoreTracks.TrackID NOT IN (SELECT TrackID FROM CoreSmartPlaylistEntries WHERE SmartPlaylistID = 81)) And (CoreTracks.TrackID NOT IN (SELECT TrackID FROM CoreSmartPlaylistEntries WHERE SmartPlaylistID = 8)))) ORDER BY CoreTracks.Rating DESC, CoreAlbums.ArtistNameSortKey ASC, CoreAlbums.TitleSortKey ASC, CoreTracks.Disc ASC, CoreTracks.TrackNumber ASC )
  at Hyena.Data.Sqlite.Connection.CheckError (Int32 errorCode, System.String sql) [0x00000] in <filename unknown>:0 
  at Hyena.Data.Sqlite.Connection.Execute (System.String sql) [0x00000] in <filename unknown>:0 
  at Hyena.Data.Sqlite.HyenaSqliteCommand.Execute (Hyena.Data.Sqlite.HyenaSqliteConnection hconnection, Hyena.Data.Sqlite.Connection connection) [0x00000] in <filename unknown>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: Hyena.Data.Sqlite.SqliteException: Sqlite error 11: database disk image is malformed (SQL: DELETE FROM CoreSmartPlaylistEntries WHERE SmartPlaylistID = 7;
                  INSERT INTO CoreSmartPlaylistEntries
                    (EntryID, SmartPlaylistID, TrackID)
                    SELECT NULL, 7 as SmartPlaylistID, TrackId FROM CoreTracks,CoreArtists,CoreAlbums
                        WHERE CoreArtists.ArtistID = CoreTracks.ArtistID AND CoreAlbums.AlbumID = CoreTracks.AlbumID AND CoreTracks.PrimarySourceID = 1
                        AND (((CoreTracks.TrackID NOT IN (SELECT TrackID FROM CoreSmartPlaylistEntries WHERE SmartPlaylistID = 81)) And (CoreTracks.TrackID NOT IN (SELECT TrackID FROM CoreSmartPlaylistEntries WHERE SmartPlaylistID = 8)))) ORDER BY CoreTracks.Rating DESC, CoreAlbums.ArtistNameSortKey ASC, CoreAlbums.TitleSortKey ASC, CoreTracks.Disc ASC, CoreTracks.TrackNumber ASC )
  at Hyena.Data.Sqlite.Connection.CheckError (Int32 errorCode, System.String sql) [0x00000] in <filename unknown>:0 
  at Hyena.Data.Sqlite.Connection.Execute (System.String sql) [0x00000] in <filename unknown>:0 
  at Hyena.Data.Sqlite.HyenaSqliteCommand.Execute (Hyena.Data.Sqlite.HyenaSqliteConnection hconnection, Hyena.Data.Sqlite.Connection connection) [0x00000] in <filename unknown>:0 

Still looks to be the same issue (corrupted database), but I do not know why it now happens at a random time instead of when clicking on a playlist
Comment 3 Bertrand Lorentz 2013-04-14 10:16:03 UTC
Thank you for your bug report.

How did you try to recover you database ? What do you mean by sqlite3 cleaning ?
Did you follow the instructions at the bottom of this page ?http://banshee.fm/support/faq/

It seems Banshee only hits the database corruption when doing things with the CoreSmartPlaylistEntries table, which might explain why you get crashes at different times.

You could also try to remove all you Smart playlists, to see if it helps.
Comment 4 Bertrand Lorentz 2013-04-14 15:02:20 UTC
Sorry, I just was your post to the mailing-list while clearing my inbox, which answers my first questions.
So it seems you've done the sqlite dump/restore.

What version of sqlite do you have, and what's your distro ?

IF you wish, you can send me your database file by e-mail and I can try to figure out what's going on.
Comment 5 cidthecoatrack 2013-04-16 02:26:55 UTC
My distro is Xubuntu 12.10, and I have sqlite3 - 3.7.13-1

Many thanks for offering to look at the database.  I have tried removing smart playlists that I saw was causing the problem and then recreated those playlists - and then the NEW playlists started causing the crashes - so you can understand I am quite baffled.
Comment 6 cidthecoatrack 2013-05-19 12:35:31 UTC
Alright, since upgrading to 13.04, my database is still broken. However, I have more salient details:

-performing PRAGMA integrity_check on the database does not reveal any malformed parts
-through SQliteman I can perform reads on all tables without error
-the error Banshee throws when it crashes has changed:

[Info  08:21:09.791] Updating web proxy from GConf
[Warn  08:21:09.851] Caught an exception - System.ApplicationException: No support GNOME Settings Daemon could be reached. (in `Banshee.MultimediaKeys')
  at Banshee.MultimediaKeys.MultimediaKeysService.Banshee.ServiceStack.IExtensionService.Initialize () [0x00000] in <filename unknown>:0 
  at Banshee.ServiceStack.ServiceManager.StartExtension (Mono.Addins.TypeExtensionNode node) [0x00000] in <filename unknown>:0 
[Warn  08:21:09.852] Extension `Banshee.MultimediaKeys.MultimediaKeysService' not started: No support GNOME Settings Daemon could be reached.
[Warn  08:21:09.902] Caught an exception - System.ApplicationException: No support GNOME Settings Daemon could be reached. (in `Banshee.MultimediaKeys')
  at Banshee.MultimediaKeys.MultimediaKeysService.Banshee.ServiceStack.IExtensionService.Initialize () [0x00000] in <filename unknown>:0 
  at Banshee.ServiceStack.ServiceManager.StartExtension (Mono.Addins.TypeExtensionNode node) [0x00000] in <filename unknown>:0 
[Warn  08:21:09.902] Extension `Banshee.MultimediaKeys.MultimediaKeysService' not started: No support GNOME Settings Daemon could be reached.
[Info  08:21:09.904] All services are started 1.199677
[Info  08:21:17.068] nereid Client Started
[Info  08:21:17.146] GStreamer version 1.0.6.0, gapless: False, replaygain: False
[Warn  08:21:17.436] Caught an exception - System.ArgumentNullException: Argument cannot be null. (in `mscorlib')
  at System.Int32.Parse (System.String s, NumberStyles style, IFormatProvider provider) [0x00000] in <filename unknown>:0 
  at System.Int32.Parse (System.String s, NumberStyles style) [0x00000] in <filename unknown>:0 
  at Banshee.Hardware.Gio.UsbDevice.GetVendorId (IUsbDevice device) [0x00000] in <filename unknown>:0 
  at Banshee.Hardware.Gio.UsbDevice.get_VendorId () [0x00000] in <filename unknown>:0 
  at Banshee.Dap.MassStorage.DeviceMapper.Map (Banshee.Dap.MassStorage.MassStorageSource source) [0x00000] in <filename unknown>:0 
  at Banshee.Dap.MassStorage.MassStorageSource.DeviceInitialize (IDevice device) [0x00000] in <filename unknown>:0 
  at Banshee.Dap.DapService.FindDeviceSource (IDevice device) [0x00000] in <filename unknown>:0 

(Banshee:29274): GLib-GObject-WARNING **: /build/buildd/glib2.0-2.36.0/./gobject/gsignal.c:2475: signal `new-decoded-pad' is invalid for instance `0x2b629c0' of type `GstDecodeBin'
bpm_detect got error: Your GStreamer installation is missing a plug-in. gstdecodebin2.c(3705): gst_decode_bin_expose (): /GstPipeline:pipeline/GstDecodeBin:decodebin:
no suitable plugins found
bpm_detect got error: Your GStreamer installation is missing a plug-in. gstdecodebin2.c(3705): gst_decode_bin_expose (): /GstPipeline:pipeline/GstDecodeBin:decodebin:
no suitable plugins found
bpm_detect got error: GStreamer encountered a general stream error. gsttagdemux.c(1303): gst_tag_demux_element_loop (): /GstPipeline:pipeline/GstDecodeBin:decodebin/GstID3Demux:id3demux0:
Stream stopped, reason not-linked
[Warn  08:21:22.150] Caught an exception - System.Xml.XmlException: Text node cannot appear in this state.  Line 1, position 1. (in `System.Xml')
  at Mono.Xml2.XmlTextReader.ReadText (Boolean notWhitespace) [0x00000] in <filename unknown>:0 
  at Mono.Xml2.XmlTextReader.ReadContent () [0x00000] in <filename unknown>:0 
  at Mono.Xml2.XmlTextReader.Read () [0x00000] in <filename unknown>:0 
  at System.Xml.XmlTextReader.Read () [0x00000] in <filename unknown>:0 
  at System.Xml.XmlReader.ReadToFollowing (System.String name) [0x00000] in <filename unknown>:0 
  at MusicBrainz.MusicBrainzObject+<Query>c__AnonStorey3`1[MusicBrainz.Release].<>m__5 (System.Xml.XmlReader reader) [0x00000] in <filename unknown>:0 
  at MusicBrainz.MusicBrainzObject.XmlProcessingClosure (System.String url, MusicBrainz.XmlProcessingDelegate code) [0x00000] in <filename unknown>:0 
  at MusicBrainz.MusicBrainzObject.Query[Release] (System.String url_extension, Int32 limit, Int32 offset, System.String parameters, System.Nullable`1& count) [0x00000] in <filename unknown>:0 
  at MusicBrainz.Query`1[MusicBrainz.Release].LoadResults () [0x00000] in <filename unknown>:0 
  at MusicBrainz.Query`1[MusicBrainz.Release].get_Count () [0x00000] in <filename unknown>:0 
  at MusicBrainz.Query`1[MusicBrainz.Release].PerfectMatch () [0x00000] in <filename unknown>:0 
  at Banshee.Metadata.MusicBrainz.MusicBrainzQueryJob.Lookup () [0x00000] in <filename unknown>:0 
  at Banshee.Metadata.MusicBrainz.MusicBrainzQueryJob.Run () [0x00000] in <filename unknown>:0 
  at Banshee.Metadata.MetadataServiceJob.Run () [0x00000] in <filename unknown>:0 
Exception in Gtk# callback delegate
  Note: Applications can use GLib.ExceptionManager.UnhandledException to handle the exception.
System.OverflowException: Number overflow.
  at System.Int64.System.IConvertible.ToInt32 (IFormatProvider provider) [0x00000] in <filename unknown>:0 
  at System.Convert.ToInt32 (System.Object value, IFormatProvider provider) [0x00000] in <filename unknown>:0 
  at System.Convert.ToInt32 (System.Object value) [0x00000] in <filename unknown>:0 
  at Hyena.Data.Sqlite.HyenaSqliteConnection.Execute (Hyena.Data.Sqlite.HyenaSqliteCommand command) [0x00000] in <filename unknown>:0 
  at Hyena.Data.Sqlite.HyenaSqliteConnection.Execute (System.String command_str, System.Object[] param_values) [0x00000] in <filename unknown>:0 
  at Banshee.SmartPlaylist.SmartPlaylistSource.Refresh () [0x00000] in <filename unknown>:0 
  at Banshee.SmartPlaylist.SmartPlaylistSource.Reload () [0x00000] in <filename unknown>:0 
  at Banshee.Sources.DatabaseSource.Activate () [0x00000] in <filename unknown>:0 
  at Banshee.Sources.SourceManager.SetActiveSource (Banshee.Sources.Source source, Boolean notify) [0x00000] in <filename unknown>:0 
  at Banshee.Sources.SourceManager.SetActiveSource (Banshee.Sources.Source source) [0x00000] in <filename unknown>:0 
  at Banshee.Sources.Gui.SourceView.OnButtonPressEvent (Gdk.EventButton press) [0x00000] in <filename unknown>:0 
  at Gtk.Widget.buttonpressevent_cb (IntPtr widget, IntPtr evnt) [0x00000] in <filename unknown>:0 
   at GLib.ExceptionManager.RaiseUnhandledException(System.Exception e, Boolean is_terminal)
   at Gtk.Widget.buttonpressevent_cb(IntPtr widget, IntPtr evnt)
   at Gtk.Application.gtk_main()
   at Gtk.Application.Run()
   at Banshee.Gui.GtkBaseClient.Run()
   at Banshee.Gui.GtkBaseClient.Startup()
   at Hyena.Gui.CleanRoomStartup.Startup(Hyena.Gui.StartupInvocationHandler startup)
   at Banshee.Gui.GtkBaseClient.Startup()
   at Banshee.Gui.GtkBaseClient.Startup(System.String[] args)
   at Nereid.Client.Main(System.String[] args)
   at System.AppDomain.ExecuteAssembly(System.AppDomain , System.Reflection.Assembly , System.String[] )
   at System.AppDomain.ExecuteAssemblyInternal(System.Reflection.Assembly a, System.String[] args)
   at System.AppDomain.ExecuteAssembly(System.String assemblyFile, System.Security.Policy.Evidence assemblySecurity, System.String[] args)
   at System.AppDomain.ExecuteAssembly(System.String assemblyFile)
   at Booter.Booter.BootClient(System.String clientName)
   at Booter.Booter.Main()

This is the final callstack for opening banshee, clicking on a playlist, and having the program immediately crash.
Comment 7 Bertrand Lorentz 2013-05-19 14:38:20 UTC
I got your database file, but I wasn't able to look into it until now.
Thanks for pinging me about this.

I think I figured out what's going on: the CoreSmartPlaylistEntries has an INTEGER PRIMARY KEY column, which in SQLite is an auto-incremented 64 bit integer.
But when it inserts a new row, Banshee casts the value of that primary key as an Int32. And I've checked, the values in your DB are close to the limit for an Int32.

So yes, you have had more than 2 billion rows inserted in that table...
That number is so high because when Banshee refreshes a smart playlists, it deletes all corresponding entries in CoreSmartPlaylistEntries, and then inserts the new ones. And you have quite an impressive collection of smart playlists :)

So this kind of a follow-up on bug #547218, and I think the fix will be a bit annoying, but simple: we need to handle the value as an Int64 everywhere.

In the meantime, as a work-around, you can run the following query on your database (make a backup first):

DELETE from CoreSmartPlaylistEntries;

This will delete all the track entries from your smart playlists. But when you start Banshee, it will refresh them, filling them up again, but the primary key will start back at 1, so you should see the crash anymore, at least for some time.
Comment 8 cidthecoatrack 2013-05-19 15:10:54 UTC
OH MY GOD you brilliant, brilliant man. After two months of not having a media database, THE PRODIGAL DB HAS RETURNED!  I cannot thank you enough for this advice.

I do have a buttload of smart playlists, and a lot of them are large (thousands, or even tens of thousands of songs).  I am curious why Banshee casts it to Int32 instead of leaving it at Int64 - but a thought or discussion for another time, perhaps.

By the way, I am a C# developer who loves Banshee.  I would love to get involved with the software if at all possible.  I have some ideas for plugins I would like to write (for instance, ones that would automatically create sort strings removing articles and such), as well as maybe even delve into the core product.

Keep up the good work, and thanks again! This certainly works as a temporary fix, and it will certainly suit me until a more permanent solution arrives. :)
Comment 9 Bertrand Lorentz 2013-05-19 16:44:48 UTC
Let's keep this bug open until the underlying issue has been really fixed.
(the "RESOLVED INCOMPLETE" means that there is not enough information to fix the bug, not that it has not been fixed completely)

We first assumed that the value returned was an Int32, and that assumption is reflected in the whole code base: TrackId is an int, etc.

That caused bug #547218. We then opted to converting to Int32, to reduce impact to the existing codebase. But it wasn't the "correct" solution...

I'm looking forward to your contributions and extensions, don't hesitate to ask on the mailing-list if you have questions.
Comment 10 Bertrand Lorentz 2013-05-20 13:22:03 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.

This is fixed byt those 2 commits:
https://git.gnome.org/browse/hyena/commit/?id=11687d978
https://git.gnome.org/browse/banshee/commit/?id=f847cb0c742