Develop Auto can produce noticeably incorrect histograms. To reproduce:
1. Import this raw file.
2. In Develop, click Auto. Observe this histogram:
3. Go to Library, then back to Develop on the same photo.
4. Observe this histogram, which differs a fair bit in the highlights:
Tested on LR 8.3.1 / Mac OS 10.14.5.
----------------------------------
The bug's cause: Auto doesn't set the following Develop settings, which are normally present in Process Version 5 photos:
Brightness = 50
Contrast = 25
Exposure = 0
Shadows = 5
Even though these settings are for Process Versions 1 and 2 and don't normally affect Process Version 5, somehow their absence is tripping up the histogram.
To prove this, insert these steps:
2b. Use the Show Catalog Metadata plugin to examine the develop settings -- those four settings are all nil.
3b. Use the plugin to examine the settings again, and notice those settings are now present with their default values.
4b. Use an SDK debugger to remove those settings from the photo, and notice the histogram changes immediately back to that from step 2:
s = targetPhoto:getDevelopSettings ()
s.Brightness, s.Contrast, s.Exposure, s.Shadows = nil, nil, nil, nil
catalog:withWriteAccessDo ("",
function () targetPhoto:applyDevelopSettings (s) end)