Crash with SQLiteDatabase.Error

crash

#1

What I did: Tried to start Agenda

What happened: Agenda immediately crashes without managing to open any windows. The reported error is:

Could not set up the Agenda library at path file:///Users/xxx/Library/Containers/com.momenta.agenda.macos/Data/Documents/Agenda/ because of error: The operation couldn’t be completed. (NBFoundation.SQLiteDatabase.Error error 2.)

What I expected: Agenda to open.

Things that might be helpful to know (Agenda version, OS and model, etc):

Version is 2.2.1. I’ve only been using Agenda for a few days, though it has opened successfully in the past to allow me to use it. I’m on OS X 10.12.6, on a Macbook Pro.

Crash log (up to the binary images, I can’t attach the report because I’m a new user):

Process: Agenda [97125]
Path: /Applications/Agenda.app/Contents/MacOS/Agenda
Identifier: com.momenta.agenda.macos
Version: 2.2.1 (36)
App Item ID: 1287445660
App External ID: 826898070
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Agenda [97125]
User ID: 503

Date/Time: 2018-06-14 12:45:37.943 +0100
OS Version: Mac OS X 10.12.6 (16G1036)
Report Version: 12
Anonymous UUID: 24EDCE8F-35E6-DBB8-CF98-F935E03B2DF5

Sleep/Wake UUID: B4189A73-BF5D-4336-A7B1-C2556494CB62

Time Awake Since Boot: 45000 seconds
Time Since Wake: 1600 seconds

System Integrity Protection: enabled

Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Exception Type: EXC_BAD_INSTRUCTION (SIGILL)
Exception Codes: 0x0000000000000001, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY

Termination Signal: Illegal instruction: 4
Termination Reason: Namespace SIGNAL, Code 0x4
Terminating Process: exc handler [0]

Application Specific Information:
Fatal error: Failed to setup the Library Manager: Error Domain=LibraryManager Code=2 “Could not set up the Agenda library at path file:///Users/xxx/Library/Containers/com.momenta.agenda.macos/Data/Documents/Agenda/ because of error: The operation couldn’t be completed. (NBFoundation.SQLiteDatabase.Error error 2.)” UserInfo={NSLocalizedDescription=Could not set up the Agenda library at path file:///Users/xxx/Library/Containers/com.momenta.agenda.macos/Data/Documents/Agenda/ because of error: The operation couldn’t be completed. (NBFoundation.SQLiteDatabase.Error error 2.), NSLocalizedFailureReason=Error Domain=NBFoundation.SQLiteDatabase.Error Code=2 “(null)”}: file /Users/cormack/CocoaPrograms/Agenda/AgendaMac/Sources/MainControllers/MainWindowController.swift, line 228


#2

We’re sorry to hear that.

Does it help if you:

  • quit Agenda
  • in Go > Go to Folder in Finder, paste:
    ~/Library/Containers/com.momenta.agenda.macos/Data/Documents/Agenda/
  • make a backup copy of the DerivedInfo folder, then delete it
  • start Agenda

Do things works as they should after that?

In the 2 or 3 times that we’ve seen this issue it was caused by a database corruption as the result of a sudden power loss or reboot or kernel panic. Do you recall that this is also preceded things in your case?


#3

Thanks! That does fix the problem (though unsurprisingly I had to wait for all the data to download from iCloud). Agenda starts now.

I have had some issues with the battery on this laptop leading to running down to 0% unexpectedly, so it’s quite possible it’s a power-related corruption.


#4

Glad to hear it fixed the issue, those are nasty and indeed the battery dropping out in the middle of a database write sounds like the explanation.