Lightroom Classic: 'unique constraint failed' error

  • 1
  • Problem
  • Updated 5 months ago
  • (Edited)
I am running Lightroom CC on Windows 10. After a Windows 10 failure I have had to reload Lightroom, plus my catalog, photos etc.  Since then when I am in the Develop module I regularly receive the following error message:

An internal error has occurred: Database "C\Users\User\Pictures\Lightroom\Lightroom Catalog.lrcat": UNIQUE constraint failed: Adobe_libraryImageDevelopHistoryStep.id_local 

Statement INSERT INTO Adobe_libraryImageDevelopHistoryStep( id_local, id_global

 

I click on OK and the message goes away, and may often reoccur several times a couple of steps later. It doesn't stop me completing my Develop actions or exporting the finished picture, but its a nuisance and I'm concerned there may be a more serious underlying problem with my Catalog
Photo of Chris Harding

Chris Harding

  • 7 Posts
  • 0 Reply Likes
  • frustrated

Posted 2 years ago

  • 1
Photo of Victoria Bampton - Lightroom Queen

Victoria Bampton - Lightroom Queen, Champion

  • 4300 Posts
  • 1565 Reply Likes
Does it happen on one photo or lots of different photos? If you clear the Develop history for a photo, does it go away for that photo?
Photo of Michel DELFELD

Michel DELFELD

  • 241 Posts
  • 33 Reply Likes
try to reorganise the catalogue
Photo of Chris Harding

Chris Harding

  • 7 Posts
  • 0 Reply Likes
Lots of different photos. I will keep trying 'clear development history' - seemed to work once but will try again.  Would that mean there is not a wider catalog issue?
Photo of Victoria Bampton - Lightroom Queen

Victoria Bampton - Lightroom Queen, Champion

  • 4277 Posts
  • 1552 Reply Likes
Adobe_libraryImageDevelopHistoryStep is the table of the catalog that holds Develop History, and yes, it sounds like there may be some corruption in that table. If clearing it works, and you're not too attached to the history, I might be inclined to clear it across all photos (or the bunch of photos that you're seeing the issues). 

It's certainly possible that there's corruption that's more widespread, but I'd wait and see if anything else shows up before worrying too much. If anything else does show up, exporting the photos as a new catalog and then importing into a clean catalog often cleans up any gremlins, at the cost of losing publish services and sync settings.
(Edited)
Photo of Chris Harding

Chris Harding

  • 7 Posts
  • 0 Reply Likes
Thanks Victoria, that's clear and very helpful
Photo of lava_web

lava_web

  • 3 Posts
  • 0 Reply Likes
For me I tried creating a fresh catalog and re-importing the photos and I'm still getting the error. It feels like this pops up after a crash of the app though...
Photo of Victoria Bampton - Lightroom Queen

Victoria Bampton - Lightroom Queen, Champion

  • 4277 Posts
  • 1552 Reply Likes
If you're getting it in a clean catalog, I'd try standard troubleshooting steps next   https://www.lightroomqueen.com/standard-lightroom-troubleshooting-steps/
Photo of Just Shot Me

Just Shot Me

  • 210 Posts
  • 54 Reply Likes
It has been my experience that modern operating systems don't fail for no reason.
99% of the time that reason is faulty and or failing hardware. Hard drive, RAM, Heat (failed or faulty fans and dust in the system).
So I would start with checking out all the hardware in your computer.
Photo of lava_web

lava_web

  • 3 Posts
  • 0 Reply Likes
This is happening to me now too. Single catalog per shoot, and it's coming up on every image. I use to be able to hit ok and move on, but now it's not writing my changes to the XMP anymore... When I restart LR my edits are gone! (Lightroom Classic CC)
Photo of lava_web

lava_web

  • 3 Posts
  • 0 Reply Likes
It feels like both times it popped up after a crash...
Photo of Victoria Bampton - Lightroom Queen

Victoria Bampton - Lightroom Queen, Champion

  • 4277 Posts
  • 1552 Reply Likes
This sounds like there's some kind of catalog corruption there lava_web. What's the exact error you're getting?
Photo of Patrick Feldhusen

Patrick Feldhusen

  • 1 Post
  • 0 Reply Likes
Hello,

since today i have this error, too.  i do some developments on a picture and then the "unique constraint failed" error appears.

if i do a integrity test on start, it always finds a corrupt cataluge and is able to repair it. but it comes again and again. feels not good :(  

i try the hint to clear the development history, without success.


Lightroom Classic-Version: 7.2 [ 1156743 ]
Lizenz: Creative Cloud
Spracheinstellung: de
Betriebssystem: Windows 10 - Home Premium Edition
Version: 10.0.16299
Anwendungsarchitektur: x64
Systemarchitektur: x64
Anzahl logischer Prozessoren: 4
Prozessorgeschwindigkeit: 3,1 GHz
Integrierter Speicher: 16321,9 MB
Für Lightroom verfügbarer phys. Speicher: 16321,9 MB
Von Lightroom verwendeter phys. Speicher: 4018,9 MB (24,6%)
Von Lightroom verwendeter virtueller Speicher: 4096,4 MB
Anzahl GDI-Objekte: 677
Anzahl BENUTZER-Objekte: 2098
Anzahl Prozess-Handles: 1582
Cache-Speichergröße: 732,8MB
Interne Camera Raw-Version: 894
Maximale Anzahl Threads, die Camera Raw verwendet: 3
Camera Raw SIMD-Optimierung: SSE2,AVX,AVX2
Virtueller Speicher in Camera Raw: 2091MB / 8160MB (25%)
Physischer Speicher in Camera Raw: 2140MB / 16321MB (13%)
DPI-Einstellung des Systems: 96 DPI
Desktop-Komposition aktiviert: Ja
Monitore/Anzeigegeräte: 1) 1920x1080, 2) 1920x1080
Eingabetypen: Multitouch: Nein, integrierte Toucheingabe: Nein, integrierter Stift: Ja, externe Toucheingabe: Nein, externer Stift: Ja, Tastatur: Nein

Informationen zum Grafikprozessor: 
OpenGL: GeForce GTX 745/PCIe/SSE2

Check OpenGL support: Passed
Vendor: NVIDIA Corporation
Version: 3.3.0 NVIDIA 388.73
Renderer: GeForce GTX 745/PCIe/SSE2
LanguageVersion: 3.30 NVIDIA via Cg compiler
Total Video Memory: 4096 MB


Anwendungsordner: C:\Program Files\Adobe\Adobe Lightroom Classic CC
Bibliothekspfad: D:\patri\Pictures\2018\02_Feb\20180227_MakeupSchule\GO!Makeup_Schule\GO!Makeup_Schule.lrcat
Einstellungen-Ordner: C:\Users\patri\AppData\Roaming\Adobe\Lightroom
Photo of Jeffrey Tranberry

Jeffrey Tranberry, Sr. Product Manager, Digital Imaging

  • 14146 Posts
  • 1765 Reply Likes
Some other posts I have seen have also pointed to permissions issues (locked/unreadable files).
Photo of Patrycja Stańczyk

Patrycja Stańczyk

  • 1 Post
  • 0 Reply Likes
Same problem over here, though - so far - only in one large library, containing imported data from several other libraries in which the problem did not appear before.
Photo of Reetesh Mukul

Reetesh Mukul, Employee

  • 21 Posts
  • 2 Reply Likes
Are you still seeing this issue?