GNOME Bugzilla – Bug 564389
Banshee crashes on startup; SQL logic error or missing database
Last modified: 2011-08-17 13:41:39 UTC
Steps to reproduce: 1. Open Banshee Stack trace: An unhandled exception was thrown: SQL logic error or missing database at Mono.Data.SqliteClient.SqliteCommand.ExecuteStatement (IntPtr pStmt, System.Int32& cols, System.IntPtr& pazValue, System.IntPtr& pazColName) [0x00000] at Mono.Data.SqliteClient.SqliteCommand.ExecuteStatement (IntPtr pStmt) [0x00000] at Mono.Data.SqliteClient.SqliteCommand.ExecuteReader (CommandBehavior behavior, Boolean want_results, System.Int32& rows_affected) [0x00000] at Mono.Data.SqliteClient.SqliteCommand.ExecuteNonQuery () [0x00000] at Hyena.Data.Sqlite.HyenaSqliteCommand.Execute (Hyena.Data.Sqlite.HyenaSqliteConnection hconnection, Mono.Data.SqliteClient.SqliteConnection connection) [0x00000] Exception has been thrown by the target of an invocation. at System.Reflection.MonoCMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] at System.Reflection.MonoCMethod.Invoke (BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] at System.Reflection.ConstructorInfo.Invoke (System.Object[] parameters) [0x00000] at System.Activator.CreateInstance (System.Type type, Boolean nonPublic) [0x00000] at System.Activator.CreateInstance (System.Type type) [0x00000] at Banshee.Gui.GtkBaseClient.Startup () [0x00000] at Hyena.Gui.CleanRoomStartup.Startup (Hyena.Gui.StartupInvocationHandler startup) [0x00000] .NET Version: 2.0.50727.42 OS Version: Unix 2.6.27.9 Assembly Version Information: Banshee.CoverArt (1.4.0.0) Banshee.MultimediaKeys (1.4.0.0) Migo (1.4.0.0) Banshee.Podcasting (1.4.0.0) Lastfm (1.4.0.0) Banshee.Lastfm (1.4.0.0) Banshee.MiniMode (1.4.0.0) notify-sharp (0.4.0.0) Banshee.NotificationArea (1.4.0.0) Banshee.Bookmarks (1.4.0.0) Banshee.Daap (1.4.0.0) Banshee.AudioCd (1.4.0.0) pango-sharp (2.12.0.0) Banshee.Widgets (1.4.0.0) Banshee.Dap.Ipod (1.4.0.0) Banshee.Dap (1.4.0.0) Banshee.Hal (1.4.0.0) Banshee.Unix (1.4.0.0) Banshee.GStreamer (1.4.0.0) gconf-sharp (2.20.0.0) Banshee.Gnome (1.4.0.0) Banshee.NowPlaying (1.4.0.0) System.Transactions (2.0.0.0) NDesk.DBus.GLib (1.0.0.0) Mono.Cairo (2.0.0.0) System.Data (2.0.0.0) Mono.Data.SqliteClient (2.0.0.0) System.Xml (2.0.0.0) Mono.Addins (0.3.0.0) gdk-sharp (2.12.0.0) atk-sharp (2.12.0.0) Hyena.Gui (1.4.0.0) gtk-sharp (2.12.0.0) Banshee.ThickClient (1.4.0.0) Nereid (1.4.0.0) NDesk.DBus.Proxies (0.0.0.0) Mono.Posix (2.0.0.0) Banshee.Core (1.4.0.0) System (2.0.0.0) Hyena (1.4.0.0) NDesk.DBus (1.0.0.0) glib-sharp (2.12.0.0) Banshee.Services (1.4.0.0) Banshee (1.4.0.0) mscorlib (2.0.0.0) Platform Information: Linux 2.6.27-9-generic i686 unknown GNU/Linux Disribution Information: [/etc/lsb-release] DISTRIB_ID=Ubuntu DISTRIB_RELEASE=8.10 DISTRIB_CODENAME=intrepid DISTRIB_DESCRIPTION="Ubuntu 8.10" [/etc/debian_version] lenny/sid Other information: I'm not sure what I did before this crash - and the log itself is missing the statement that failed.
Could you start banshee with the following command ? banshee-1 --debug-sql It should then show all SQL statements. Post the output here.
It says: [Debug 18:22:40.665] Executed in 249ms SELECT COUNT(*), SUM(CoreTracks.FileSize) FROM CoreTracks,CoreAlbums,CoreArtists WHERE CoreArtists.ArtistID = CoreTracks.ArtistID AND CoreAlbums.AlbumID = CoreTracks.AlbumID AND CoreTracks.PrimarySourceID = 1 [Debug 18:22:40.667] Exception executing command: BEGIN; DELETE FROM CoreCache WHERE ModelID = 125; INSERT INTO CoreCache (ModelID, ItemID) SELECT 125, CoreTracks.TrackID FROM CoreTracks,CoreAlbums,CoreArtists WHERE CoreArtists.ArtistID = CoreTracks.ArtistID AND CoreAlbums.AlbumID = CoreTracks.AlbumID AND CoreTracks.PrimarySourceID = 1 ORDER BY CoreArtists.NameLowered ASC, CoreAlbums.TitleLowered ASC, CoreTracks.Disc ASC, CoreTracks.TrackNumber ASC; COMMIT Exception has been thrown by the target of an invocation. System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Mono.Data.SqliteClient.SqliteExecutionException: SQL logic error or missing database at Mono.Data.SqliteClient.SqliteCommand.ExecuteStatement (IntPtr pStmt, System.Int32& cols, System.IntPtr& pazValue, System.IntPtr& pazColName) [0x00000] at Mono.Data.SqliteClient.SqliteCommand.ExecuteStatement (IntPtr pStmt) [0x00000] at Mono.Data.SqliteClient.SqliteCommand.ExecuteReader (CommandBehavior behavior, Boolean want_results, System.Int32& rows_affected) [0x00000] at Mono.Data.SqliteClient.SqliteCommand.ExecuteNonQuery () [0x00000] at Hyena.Data.Sqlite.HyenaSqliteCommand.Execute (Hyena.Data.Sqlite.HyenaSqliteConnection hconnection, Mono.Data.SqliteClient.SqliteConnection connection) [0x00000] --- End of inner exception stack trace --- at System.Reflection.MonoCMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] at System.Reflection.MonoCMethod.Invoke (BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] at System.Reflection.ConstructorInfo.Invoke (System.Object[] parameters) [0x00000] at System.Activator.CreateInstance (System.Type type, Boolean nonPublic) [0x00000] at System.Activator.CreateInstance (System.Type type) [0x00000] at Banshee.Gui.GtkBaseClient.Startup () [0x00000] at Hyena.Gui.CleanRoomStartup.Startup (Hyena.Gui.StartupInvocationHandler startup) [0x00000]
Ok, I've now checked a few things. Removing the "BEGIN" and "COMMIT" helps to some degree so the statements execute without any problems. Afterwards banshee starts up but the artist and cd list are both empty. Will someone look into this or do I have to completely erase my banshee database?
Would you happen to be on a PowerPC system ? Your symptoms seem similar to bug #547218 and bug #539683.
It's not only familiar to bug #547218 - I'd say it's the same (especially since there are only 2 statements in Banshee that are executed via BEGIN + COMMIT). The thing is though - that I'm not running a PPC machine - but a Intel Core 2 Duo. So the things that I would suspect are: - Multithread issue - Sqllite messup
I just noticed we all are running Ubuntu. A coincidence?
*** Bug 581142 has been marked as a duplicate of this bug. ***
Another heavily aged bug. Any progress?
For me it was fixed somewhere along the line. Anyway - since it's critical for almost 3 years now - I would say it's a WONTFIX.
I'm getting this too on 11.04 natty 64bit. Crash occurred after a power failure and now everytime I open banshee I get an error message and it closes sometimes causing my computer to reboot. I tried reinstalling it, but no dice. I can get it to start by running as sudo via terminal. Here's what it says when it starts: [Info 16:28:54.655] Running Banshee 2.0.0: [Ubuntu 11.04 7fd9361 (linux-gnu, x86_64) @ 2011-04-27 16:18:27 UTC] [Warn 16:28:55.547] DBus support could not be started. Disabling for this session. [Info 16:28:55.730] Migrating album-art cache directory [Warn 16:28:55.733] Caught an exception - Hyena.Data.Sqlite.SqliteException: Sqlite error 1: no such table: CoverArtDownloads (SQL: DELETE FROM CoverArtDownloads) (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 [Info 16:28:55.735] Migrated 0 files in 0.003984s [Warn 16:28:58.024] 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 16:28:58.024] Extension `Banshee.MultimediaKeys.MultimediaKeysService' not started: No support GNOME Settings Daemon could be reached. [Warn 16:28:58.042] Caught an exception - System.ArgumentNullException: Argument cannot be null. Parameter name: address (in `NDesk.DBus') at NDesk.DBus.Bus.Open (System.String address) [0x00000] in <filename unknown>:0 at NDesk.DBus.Bus.get_Session () [0x00000] in <filename unknown>:0 [Warn 16:28:58.042] Extension `Banshee.SoundMenu.SoundMenuService' not started: Unable to open the session message bus. [Info 16:28:58.045] Updating web proxy from GConf [Warn 16:28:58.146] 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 16:28:58.146] Extension `Banshee.MultimediaKeys.MultimediaKeysService' not started: No support GNOME Settings Daemon could be reached. (Banshee:3201): Gtk-WARNING **: Refusing to add non-unique action 'CloseAction' to action group 'Global' [Warn 16:28:58.147] Caught an exception - System.ArgumentNullException: Argument cannot be null. Parameter name: address (in `NDesk.DBus') at NDesk.DBus.Bus.Open (System.String address) [0x00000] in <filename unknown>:0 at NDesk.DBus.Bus.get_Session () [0x00000] in <filename unknown>:0 [Warn 16:28:58.147] Extension `Banshee.SoundMenu.SoundMenuService' not started: Unable to open the session message bus. [Info 16:28:58.148] All services are started 2.599443 ** (Banshee:3201): DEBUG: Syncdaemon not running, waiting for it to start in NameOwnerChanged (Banshee:3201): libsoup-WARNING **: No feature manager for feature of type 'U1RequestChrome' ** (Banshee:3201): WARNING **: Error calling get_info: Process /usr/lib/ubuntuone-client/ubuntuone-syncdaemon exited with status 1 ** (Banshee:3201): CRITICAL **: syncdaemon_folder_info_get_subscribed: assertion `SYNCDAEMON_IS_FOLDER_INFO (finfo)' failed [Warn 16:28:59.063] Migrating Internet Radio Stations - System.IO.DirectoryNotFoundException: Directory '/root/.config/banshee/plugins/stations/user' not found. (in `mscorlib') at System.IO.Directory.GetFileSystemEntries (System.String path, System.String searchPattern, FileAttributes mask, FileAttributes attrs) [0x00000] in <filename unknown>:0 at System.IO.Directory.GetFiles (System.String path, System.String searchPattern) [0x00000] in <filename unknown>:0 at Banshee.InternetRadio.XspfMigrator.Migrate () [0x00000] in <filename unknown>:0 [Info 16:28:59.075] AmazonMP3 store redirect URL: http://integrated-services.banshee.fm/amz/redirect.do/ ** (Banshee:3201): WARNING **: Error rescanning Purchased Music: No such file or directory ** (Banshee:3201): DEBUG: Loading the real store page ** (Banshee:3201): WARNING **: Got less number of items in credentials hash table than expected! [Info 16:28:59.391] nereid Client Started [Info 16:28:59.438] GStreamer version 0.10.32.0, gapless: True, replaygain: False [Warn 16:32:09.012] Service disposal (MprisService) threw an exception - System.ArgumentNullException: Argument cannot be null. Parameter name: address (in `NDesk.DBus') at NDesk.DBus.Bus.Open (System.String address) [0x00000] in <filename unknown>:0 at NDesk.DBus.Bus.get_Session () [0x00000] in <filename unknown>:0 System.Exception: Unable to open the session message bus. (in `NDesk.DBus') at NDesk.DBus.Bus.get_Session () [0x00000] in <filename unknown>:0 at Banshee.Mpris.MprisService.System.IDisposable.Dispose () [0x00000] in <filename unknown>:0 at Banshee.ServiceStack.ServiceManager.Shutdown () [0x00000] in <filename unknown>:0 [Warn 16:32:09.021] Unable to unregister DBus object Banshee.PlayQueue.PlayQueueSource, does not appear to be registered
(In reply to comment #10) > I'm getting this too on 11.04 natty 64bit. Crash occurred after a power failure Sounds like files got corrupted when the power cut. > I tried reinstalling it, but no dice. Re-installing on debian (including Ubuntu) won't remove config files. (You'd need to "purge" them). >I can get it to start by running as sudo via terminal. SUDO runs it as root (a different user), so it will have different config files. For you (at least), deleting ~/.config/banshee-1 (banshee config and database) should do the trick. You may also need to remove ~/.cache/banshee-1 (extensions cache) and/or ~/.gconf/apps/banshee-1 (gconf settings). If this fixes the bug, then its not a bug (at least for whoever this fixes it for).
Worked like a charm. Deleting .config/banshee-1 fixed everything for me. Thanks for the quick reply.
(comment #9) > For me it was fixed somewhere along the line. I feel this should be marked OBSOLETE, since the original reporter no longer has it, and no one else can replicate it.
This issue was apparently fixed at some point, so closing. Please file bugs for any other issue you might find.