• Welcome to the Lightroom Queen Forums! We're a friendly bunch, so please feel free to register and join in the conversation. If you're not familiar with forums, you'll find step by step instructions on how to post your first thread under Help at the bottom of the page. You're also welcome to download our free Lightroom Quick Start eBooks and explore our other FAQ resources.
  • Dark mode now has a single preference for the whole site! It's a simple toggle switch in the bottom right-hand corner of any page. As it uses a cookie to store your preference, you may need to dismiss the cookie banner before you can see it. Any problems, please let us know!

Unable to correct Lightroom CC Corrupted catalog

Status
Not open for further replies.

Janet Eschenlauer

New Member
Joined
May 28, 2017
Messages
16
Lightroom Experience
Advanced
Lightroom Version
Recently I found that my Lightroom catalog is corrupted. When I unzip and open a backup file I find that it is corrupted as well. I have gone back to backups up to 2 weeks old and they all say they are corrupted. I uninstalled and reinstalled Lightroom. Is there something related to Lightroom on my computer the is causing this to happen? I have not found any forums that address this problem.
 
You could try if something causes this by creating a new catalog. If that too gets corrupted, then indeed something may interfere. An incompatible plugin could be the culprit. If the new catalog is fine, then maybe your catalog got corrupted a longer time ago than you realized.
 
Welcome to the forum. This is a dilemma. LR catalogs don't often get corrupted and when they do it is usually because the computer crashes or some other process managed to damage the catalog file while it was open and in an unstable state. This instability could have persisted through several backups so that these too are corrupt. Is LR offering to attempt to repair the catalog when you try to open it?
Can you send one or more of the catalog files (the most recent backup and maybe original) to me using the website wetransfer.com? The email address to send to is customer(dot)lee(at)att(dot)net
 
A new catalog is not corrupted. So, I guess that the corruption occurred some time ago. The old catalog had collections in it. When I put files in the new catalog the collections are lost. Is that to be expected?
 
Cletus Lee, I'll try to send a catalog file. Would it be all right to send a zip backup or should I unzip it and sent the catalog?
 
A new catalog is not corrupted. So, I guess that the corruption occurred some time ago. The old catalog had collections in it. When I put files in the new catalog the collections are lost. Is that to be expected?
Collections live in the catalog database file. Like Develop adjustments they don't transfer. However you can re created the collections. Recreating the develop adjustments is more tedious. One of the things that I want to do if I get your catalog (should I be unable to open it) is to recreate the database file that is the catalog. I can do this with some database tools assuming that I can open the corrupt catalog file with the data base tools. It might be possible to extract the good records and leave the bad records.
 
Cletus, I tried to send the files requested, but the email address that you provided did not work. The link for the oldest backup zip is 2016_MasterLRcat.lrcat.zip and 1 more file
I was able to open "2017_MasterLRcat.lrcat" and "2016_MasterLRcat.lrcat" with no difficulties. Are you running the latest update to LR, LRCC2015.10.1? Delete or rename your Preferences file to force LR to create a new one. Then try opening your master catalog file. We will get this resolved.
 
Yes, I am running the latest update to LR LRCC2015.10.1
Where js the LR Preferences file? I have created a new catalog that is working fine. All I have to do is import all the photos. Maybe that is the way to go.
 
By the way. I can open "2017_MasterLRcat.lrcat", but cannot make a backup. When I try to do that I get the message that the file is corrupted.
 
Preferences is located at "/Users/{UserID}/Library/Preferences/com.adobe.Lightroom6.plist"

I tried backing up the file on exit and Had no problem there either.
Reset preferences as suggested and However, I did encounter the corrupt catalog problem when I tried to Optimise the catalog. Stay tuned...
 
Well, I was unable to do any of my database magic on the file. And it is most unusual that the file will open in LR but can not be optimized either in the LR Edit menu or on close before backup. Victoria Bampton has a contact at Adobe that is more knowledgable about the database structure than I and has been successful on other corrupt catalogs. I've asked her to take a look and pass the file along. Also, I think Adobe would be most curious to understand why your catalog file is corrupt and LR will still open it for regular processing but not to backup the file.
 
Last edited:
Don't get into panic, you will recover your catalog!

I was able to find error and also fix it. Seems to be related to an internal SQLite bug, see How To Corrupt An SQLite Database File, 8.4. Database pages leak from the free page list

That is the error I get:
Code:
c:\Temp>sqlite3 2017_MasterLRcat.lrcat
SQLite version 3.12.0 2016-03-29 10:14:15
Enter ".help" for usage hints.
sqlite> pragma integrity_check;
*** in database main ***
On tree page 39489 cell 7: 1 of 2 pages missing from overflow list starting at 39499
On tree page 39489 cell 6: 1 of 2 pages missing from overflow list starting at 39497
Page 39496 is never used
Page 39498 is never used
sqlite> .quit

c:\Temp>

Dump SQLite DB and create new DB from it:
Code:
c:\Temp>sqlite3 2017_MasterLRcat.lrcat .dump | sqlite3 2017_MasterLRcat_new.lrcat

Check new catalog for errors:
Code:
c:\Temp>sqlite3 2017_MasterLRcat_new.lrcat
SQLite version 3.12.0 2016-03-29 10:14:15
Enter ".help" for usage hints.
sqlite> pragma integrity_check;
ok
sqlite> .quit

c:\Temp>


You can download SQLite command-line shell from here SQLite Download Page

However, I recommend you first try to get your problem solved with Adobe support. Consider this solution as second option.

Best Regards
 
Victoria Bampton has a contact at Adobe that is more knowledgable about the database structure than I and has been successful on other corrupt catalogs. I've asked her to take a look and pass the file along.

It's on its way to the engineer and I'll let you know when I hear back.
 
Dump SQLite DB and create new DB from it:
Thanks Wernfried. I had dumped the DB file and decided abandon my efforts and to turn it over to Adobe before I tried recreating the DB from the dump. Knowing that the usable data was available via the dump, I felt certain that everything important would be recoverable. Though I'm not certain what state of panic the OP might be in.
 
Cletus and Victoria, I do appreciate your help, but am not sure I have the skills to follow your instructions. So, I have created a new catalog and am importing my photos. So far, whenever I finish importing a couple of folders , I can quit LR and backup the catalog without trouble. Luckily, I am not a professional and do not need the collections I created. They seem to be the only thing (besides time) that I have lost.
Thank you for your help,
Janet
 
The repaired catalog opened and backed up as promised. Some feature such as the label colors and view have changed, but I think I can fix that. There are also some photos that evidently have been relocated and I'll have to fix that too. I think I'll be OK from here on. Thank you very much for all this help. I have lots of praise for Laura Shoe who suggested that I join the forum.
Best regards to all,
Janet
 
Cletus and Victoria, I do appreciate your help, but am not sure I have the skills to follow your instructions. So, I have created a new catalog and am importing my photos
Victoria has sent your damaged catalog to Adobe t see if it can be repaired. There is a good chance that it can. I suggest not doing anything until we/you hear back from the Adobe engineer.
 
Hi Cletus, Victoria had Wernfried send a repaired catalog. I was able to open it and back it up again, so it truly seems to be repaired. It did not include some of the changes I had made in photo data, but had all the collections in order. The main problem I have with it now is that I cannot get the choices of label color to show in the menu below the grid view of the library. Thanks again for staying with my catalog problem.
 
Wernfried wasn't the engineer - just a helpful forum member - but I'm glad he was able to help. I'm still waiting to hear back from Paul the engineer.

If you look in the Metadata panel, do your label names show up there? If so, you just need to change the label set to match.
 
Well, I am a software engineer - but not working for Adobe. I use SQLite database even in some of my applications.
 
Victoria and Wernfried,
I think all is well with my catalog. I cannot remember the date of the backup file that I sent because I kept going to earlier backups to see if one was not corrupt and I may have thrown away the newer backups. I lost some work done before the catalog would not work, but not much. I also have figured out how to see this label colors in the Filters bar.
Thank you for your help.
 
Status
Not open for further replies.
Back
Top