Skip to main content
Inspiring
December 15, 2018

P: Reset your Preferences: Moving from the magic spell to a more serious approach

  • December 15, 2018
  • 26 replies
  • 1395 views

Hi,

Under many circumstances, whenever your copy of LR crashes, freezes, doesn't start,... the most frequent answer you'll get from the support is "Reset your preferences". And in many cases, that works. But 1) you have to re-configure LR again and 2) this will not fix the bug generating the problem so, it will happen again . Should we be happy with this ? No.

If resetting the Preferences file(s) solves a problem, that's only because

- The piece of LR code reading or writing from or to this file is buggy
OR
-  A particular combination of parameters generates a problem.

Do not accept the idea that the Preferences file was corrupted. If it's corrupted, it's by LR itself. Spontaneous file corruption does not occur that often.

Since the developers at Adobe don't seem ready to investigate this case more deeply, I guess it's time to help ourselves and to collect information that could help them debug this issue. There's a few things that are easy to do :

1. Make a backup copy of your Preferences file(s) while LR is behaving correctly. This could also help you restoring a standard behavior instead of resetting the Preferences.

2. When a problem occurs, make a copy of the current Preferences file(s).

3. If resetting the Preferences solves the problem, then make a comparison of the files created in #1 and #2. You can also compare with the new Preferences file(s).

4. Make a ZIP archive of these files possibly including the comparison result and send them to the support or better, post a link to the archive in this thread.

Comparison can be made manually or by using a text comparison tool. I'm personally using Beyond Compare since years (this is not an ad) but there are others (a Google search will show you a lot).

Actually, there are 2 Preferences files :

C:\Users\\AppData\Roaming\Adobe\Lightroom\Preferences\Lightroom Classic CC 7 Preferences.agprefs

C:\Users\\AppData\Roaming\Adobe\Lightroom\Preferences\Lightroom Classic CC 7 Startup Preferences.agprefs

(note that the name didn't change with version 😎

So apply the above to both files. This procedure also applies to the Mac version although I don't know the file path.

Hoping that this will help solve this very old and annoying issue.

26 replies

johnrellis
Genius
January 14, 2019
The plugin I posted will keep up to 15 snapshot copies of the preferences, of increasing age, e.g. 

1 min, 5 mins, 10 mins, 20 mins, 40 mins. 80 mins, ..., 56 days.

So it's likely that one or more of those snapshots is prior to the corruption.  The total size of the snapshots in my LR is less than 1 MB on Windows, 10 MB on Mac.

Having preferences right before and right after the Reset would likely be helpful for diagnosing, but having a longer-term history might narrow down some kinds of problems more effectively.
Rikk Flohr_Photography
Community Manager
Community Manager
January 14, 2019
#1 would likely never be obtained with surety, I fear.  Until you stumble upon an area of bad behavior, it might lurk quietly in the background for days...months.  At least #2 and #3 are known quantities. 
Rikk Flohr: Adobe Photography Org
SamoreenAuthor
Inspiring
January 14, 2019
Hi Rikk,

> 2. A copy of the preference file before reset

The preference file before reset might have been already corrupted. So, if I were the developer, I would ask for 3 files :

#1 : a copy of the preference file when everything is working correctly (thanks to John for providing the tool allowing to get it automatically)
#2 : a copy of the preference file before reset (the bug just occurred)
#3 : a copy of the preference file after reset, which will be different from #1 and less useful since everything will be... reset (witch exception of values specific to the user's environment).

My two cents.
--Patrick
Rikk Flohr_Photography
Community Manager
Community Manager
January 14, 2019
Actually, John your timing is really good.  This is something we are kicking around on our side right now.  (In response to this thread)

Basically, we want to be able to identify a bug (with reproducible steps) and have a copy of the Preferences before and after the reset of the Preference file.  In order for this to do engineering any good we need to know the following:
  1. A complete description of the bad behavior prior to reset
  2. A copy of the preference file before reset
  3. A copy of the preference file after the reset
  4. Verification that the preference file reset cured the issue in item 1
With those four pieces of information that may help us track down:
  • what in preferences changed by viewing the differential
  • what behavior it affected
  • clues as to what process, plugin or other circumstance generated the preference file issue and the subsequent aberrant behavior. 
Having the before/after preference files allows us to test user-reported issues in greater depth. 

If we were to create a process for the gathering before/after and possibly reporting of bad behavior resolved by a preference file reset how would it work best for you?
Rikk Flohr: Adobe Photography Org
SamoreenAuthor
Inspiring
January 14, 2019
Thanks a lot, John. Excellent idea.
--Patrick
johnrellis
Genius
January 13, 2019
Building on Patrick's suggestion for saving backup copies of LR's preferences, I wrote this simple plugin:
https://www.dropbox.com/s/vd0pd48b3u9mtkt/snapshotprefs.1.1.zip?dl=0

From its _README.txt:
-----------------------------------------------------------------------------------------------------
Snapshot Prefs - Lightroom Plugin

This plugin runs in background, making snapshot copies of Lightroom's preferences. If at some point you need to reset Lightroom's preferences, you can submit these snapshots to Adobe, helping them identify the bug that corrupted the preferences. 

The plugin will make a snapshot copy at most once every 5 minutes, and it will retain at most 15 copies, intelligently pruning them to keep increasingly older versions, up to 56 days. The plugin uses negligible disk space and processor time doing this.

To see the snapshot copies in Finder / File Explorer, do File > Plug-in Extras > Snapshot Prefs > Show Snapshots.

johnrellis
Genius
January 11, 2019
Instead of:
local key1, key2 = f1(), f2()
prefs.key1= key1
prefs.key2 = key2
the prefs object could provide this method:
prefs:store {
    key1 = f1(),
    key2 = f2()}
which would be trivial to implement and would provide the same safe semantics.

johnrellis
Genius
January 10, 2019
Also, you should restart your LR after running that plugin -- otherwise, it will run continually.
Jerry Syder
Inspiring
January 10, 2019
Cheers, will give it a read 
johnrellis
Genius
January 10, 2019
That means it detected an inconsistency caused by the race condition.  The two values should be identical.  Technical details are provided at the top of the file "testprefswriting.lua".