I am running ubuntu 10.10 Maverick Meerkat, and recently I am helping in testing out indicator-weather using the unstable buids. However there was a bug which caused my system to freeze suddenly (due to indicator-weather not ubuntu) and the only way to recover is to do a hard reset of the system. This happened a couple of times.
And when i tried to open banshee after a couple of such resets I get the following fatal error which forces me to quit banshee.
The screenshot is not clear enough to read the error, so I am posting it below,
An unhandled exception was thrown: Sqlite error 11: database disk image is malformed (SQL:
BEGIN TRANSACTION;
DELETE FROM CoreSmartPlaylistEntries WHERE SmartPlaylistID IN (SELECT SmartPlaylistID FROM CoreSmartPlaylists WHERE IsTemporary = 1);
DELETE FROM CoreSmartPlaylists WHERE IsTemporary = 1;
COMMIT TRANSACTION)
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
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] in <filename unknown>:0
at System.Reflection.MonoCMethod.Invoke (BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
at System.Reflection.ConstructorInfo.Invoke (System.Object[] parameters) [0x00000] in <filename unknown>:0
at System.Activator.CreateInstance (System.Type type, Boolean nonPublic) [0x00000] in <filename unknown>:0
at System.Activator.CreateInstance (System.Type type) [0x00000] in <filename unknown>:0
at Banshee.Gui.GtkBaseClient.Startup () [0x00000] in <filename unknown>:0
at Hyena.Gui.CleanRoomStartup.Startup (Hyena.Gui.StartupInvocationHandler startup) [0x00000] in <filename unknown>:0
.NET Version: 2.0.50727.1433
OS Version: Unix 2.6.35.27
Assembly Version Information:
gkeyfile-sharp (1.0.0.0)
Banshee.AudioCd (1.9.0.0)
Banshee.MiniMode (1.9.0.0)
Banshee.CoverArt (1.9.0.0)
indicate-sharp (0.4.1.0)
notify-sharp (0.4.0.0)
Banshee.SoundMenu (1.9.0.0)
Banshee.Mpris (1.9.0.0)
Migo (1.9.0.0)
Banshee.Podcasting (1.9.0.0)
Banshee.Dap (1.9.0.0)
Banshee.LibraryWatcher (1.9.0.0)
Banshee.MultimediaKeys (1.9.0.0)
Banshee.Bpm (1.9.0.0)
Banshee.YouTube (1.9.0.0)
Banshee.WebBrowser (1.9.0.0)
Banshee.Wikipedia (1.9.0.0)
pango-sharp (2.12.0.0)
Banshee.Fixup (1.9.0.0)
Banshee.Widgets (1.9.0.0)
gio-sharp (2.14.0.0)
gudev-sharp (1.0.0.0)
Banshee.Gio (1.9.0.0)
Banshee.GStreamer (1.9.0.0)
System.Configuration (2.0.0.0)
NDesk.DBus.GLib (1.0.0.0)
gconf-sharp (2.24.0.0)
Banshee.Gnome (1.9.0.0)
Banshee.NowPlaying (1.9.0.0)
Mono.Cairo (2.0.0.0)
System.Xml (2.0.0.0)
Banshee.Core (1.9.0.0)
Hyena.Data.Sqlite (1.9.0.0)
System.Core (3.5.0.0)
gdk-sharp (2.12.0.0)
Mono.Addins (0.4.0.0)
atk-sharp (2.12.0.0)
Hyena.Gui (1.9.0.0)
gtk-sharp (2.12.0.0)
Banshee.ThickClient (1.9.0.0)
Nereid (1.9.0.0)
NDesk.DBus.Proxies (0.0.0.0)
Mono.Posix (2.0.0.0)
NDesk.DBus (1.0.0.0)
glib-sharp (2.12.0.0)
Hyena (1.9.0.0)
System (2.0.0.0)
Banshee.Services (1.9.0.0)
Banshee (1.9.0.0)
mscorlib (2.0.0.0)
Platform Information: Linux 2.6.35-27-generic i686 unknown GNU/Linux
Disribution Information:
[/etc/lsb-release]
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=10.10
DISTRIB_CODENAME=maverick
DISTRIB_DESCRIPTION="Ubuntu 10.10"
[/etc/debian_version]
squeeze/sid
Just to make it clear, this happened only after the hard resets and not before. I used to use banshee everyday and it worked perfectly.
Can anyone help me fix this?
This problem is, unfortunately, not completely uncommon. It's often caused by a system crash or power outage while Banshee is running, but there may be other causes as well. The Banshee FAQ page has a list of instructions that work most of the time. In terminal, with the sqlite3 program installed, try this:
Change into the directory where Banshee stores the database:
Execute the ".dump" command on the database, which will convert all tables to text. Save this output in a file named
dump
. You may need tosudo apt-get install sqlite3
if you don't already have it.Rename your current database to create a backup:
Pass the contents of your
dump
through thesqlite3
command, creating a new database (hopefully with the same contents as the original):There is ongoing work in Banshee to make database backup and recovery automatic. If you want to stay up-to-date on the progress, feel free to CC yourself to the bug report.
It looks like Banshee's database has become corrupt. To make Banshee run, you should remove the corrupt database file (or repair it). The database is located at
Rename it, and Banshee can run again. But all your settings are lost. If you'd like to recover it, follow this article.
That consists of:
~/.config/banshee-1
and install sqlite3:sudo apt-get install sqlite3
banshee.db
by copying it.sqlite3 banshee.db
PRAGMA integrity_check;
. This reports errors, but does not correct thoseREINDEX;
If none of the above worked, continue reading Recovering a Corrupted Banshee Database.