Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

My MobileNotes app (the built in Notes app for iPhone) has entered some sort of inconsistent state and is now crashing on startup.

I would like to recover my notes from it (and also get the app working again, but that's secondary). Has anyone seen this, and/or succeeded at recovering their data?

Starting the app gives the following stack trace/crash data:

Jul  5 11:15:08 unknown MobileNotes[777] <Error>: *** Terminating app due to uncaught exception 'NSObjectInaccessibleException', reason: 'CoreData could not fulfill a fault for '0x14e620 <x-coredata://77E0D73C-42FB-4F50-A269-6459285C2296/Note/p180>''
    *** First throw call stack:
    (0x357dc88f 0x37b83259 0x361264f3 0x36125d5b 0x36125c0b 0x20dc3 0x33270efb 0x3326ffd9 0x3326f763 0x34723 0x1a103 0x33213f37 0x3573b1fb 0x3260baa5 0x3260b6bd 0x3260f843 0x3260f57f 0x32637911 0x326378e3 0x3325510f 0x33242b33 0x33210ac3 0x33210567 0x3320ff3b 0x373cf22b 0x357b0523 0x357b04c5 0x357af313 0x357324a5 0x3573236d 0x3324186b 0x3323ecd5 0x15e67 0x1564c)
Jul  5 11:15:08 unknown UIKitApplication:com.apple.mobilenotes[0xf629][777] <Notice>: terminate called throwing an exception
Jul  5 11:15:09 unknown ReportCrash[778] <Notice>: Formulating crash report for process MobileNotes[777]
Jul  5 11:15:09 unknown com.apple.launchd[1] <Warning>: (UIKitApplication:com.apple.mobilenotes[0xf629]) Job appears to have crashed: Abort trap: 6
> 
Jul  5 11:15:09 unknown SpringBoard[15] <Warning>: Application 'Notes' exited abnormally with signal 6: Abort trap: 6
Jul  5 11:15:09 unknown ReportCrash[778] <Notice>: Saved crashreport to /var/mobile/Library/Logs/CrashReporter/MobileNotes_2012-07-05-111508_braglearbgle.plist using uid: 0 gid: 0, synthetic_euid: 501 egid: 0

For a full crash log, see here

share|improve this question

migrated from stackoverflow.com Jul 6 '12 at 4:06

This question came from our site for professional and enthusiast programmers.

    
Even if you could, how would you go about fixing a system application? Send Apple a bug report or restore your system. –  CodaFi Jul 5 '12 at 15:38
    
From the crash report, it looks like it's failing on a data corruption issue somewhere in its data model. I should, in theory, be able to fix that, if I can get proper access to the data somehow. –  blueberryfields Jul 5 '12 at 15:40
    
That somehow is the problem. Even if you could get into the store, core data uses a proprietary format which is compiled, making most attempts futile. By the way, your Snipplr link is broken. –  CodaFi Jul 5 '12 at 15:43
1  
The link works fine for me. –  C0deH4cker Jul 5 '12 at 15:55
add comment

1 Answer

up vote 2 down vote accepted

Assuming that you are jailbroken, you can access the Notes database at /var/mobile/Library/Notes/notes.sqlite. In this database, the interesting tables are ZNOTE and ZNOTEBODY. The ZNOTE table contains the title of the note (first line you type in the note) and thr short summary shown in the table view, among other things. The ZNOTEBODY table contains the body of the note in HTML format.

Assuming that this database is corrupted, I suggest backing that db up and then deleting it. Apps usually recreate their databases if they don't exist, but not always (hence my statement about making a backup).

If this still doesn't fix your problem, you can try manually editing the database, finding a fresh copy of the db (probably from the respective ipsw), or, if all else fails, restoring. As long as you back up that database, you can still read the notes by looking in the ZNOTEBODY table. Each line is wrapped in a <div> and ends with a <br>.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.