nagyistoce / growl

Automatically exported from code.google.com/p/growl
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Growl can't recover from corrupt database #391

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Corrupt the Library/Application\ Support/Growl/notifications.history 
database somehow, while Growl is not running (I encountered this problem when 
the database became corrupted after a kernel panic happened while Growl was 
running)
2. Try to start Growl

What is the expected output?
Growl starts up

What do you see instead?
Growl never starts, in the Console log I see these messages:
01/12/2011 15:48:51.155 Growl: <GCDAsyncSocket: 0x7fc3096063d0> now accepting 
((null))
01/12/2011 15:48:51.160 Growl: CoreData: error: (11) Fatal error.  The database 
at  /Users/hugh/Library/Application Support/Growl/notifications.history is 
corrupted.  SQLite error code:11, 'database disk image is malformed'
01/12/2011 15:48:51.161 Growl: Unresolved error Error Domain=NSCocoaErrorDomain 
Code=259 "The file couldn’t be opened because it isn’t in the correct 
format." UserInfo=0x7fc3096085b0 {NSSQLiteErrorDomain=11, 
NSUnderlyingException=Fatal error.  The database at 
/Users/hugh/Library/Application Support/Growl/notifications.history is 
corrupted.  SQLite error code:11, 'database disk image is malformed'}, {
    NSSQLiteErrorDomain = 11;
    NSUnderlyingException = "Fatal error.  The database at /Users/hugh/Library/Application Support/Growl/notifications.history is corrupted.  SQLite error code:11, 'database disk image is malformed'";
}

What version of the product are you using? On what operating system?
Version 1.3.1 on OS X 10.7.2

Please provide any additional information below.
I know it's hard to recover from these kind of errors, but a more friendly 
error popup or notification for the user would be good, instead of refusing to 
start. I was able to repair (I think) the database by dumping it with sqlite3 
and then restoring it, but the average user would have no idea how to do this.

Original issue reported on code.google.com by sigma...@gmail.com on 1 Dec 2011 at 4:01

GoogleCodeExporter commented 9 years ago

Original comment by rarich...@gmail.com on 7 Dec 2011 at 11:09

GoogleCodeExporter commented 9 years ago
This has been started, will do more testing tomorrow on the soft failover.  In 
the event of being a corrupt database we move it aside.  Failure to move it 
aside and/or create the new database, or any other error results in history 
being disabled.

Original comment by dan...@growl.info on 1 Feb 2012 at 8:53

GoogleCodeExporter commented 9 years ago
Added an attempt, after all attempts at making an on disk store have failed, to 
create an in memory store, strictly for the purposes of the rollup.   If it 
can't create an in memory store, something has gone horribly wrong and we alert 
the user, and we will exit(-1) upon return from the alert.

This could probably still use some improvement,  particularly in preventing 
more permanent history when using the in memory store, as it will balloon 
memory usage.  However, we warn the user about this, so for the time being, 
marking as FixedInSource

relevant commits in Default in the dev repo:
[acd6c91d742e] - Initial work
[f576a9f68fa5] - In Memory store creation

Original comment by dan...@growl.info on 1 Feb 2012 at 3:10

GoogleCodeExporter commented 9 years ago

Original comment by dan...@growl.info on 1 Feb 2012 at 3:11

GoogleCodeExporter commented 9 years ago

Original comment by ch...@growl.info on 11 Jan 2013 at 6:36