• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Understanding lock file lightroom classic

Participant ,
Mar 03, 2021 Mar 03, 2021

Copy link to clipboard

Copied

After abnormal closure of Lightroom Classic (LrC), the catalog lock file is remaining next to the catalog file. I learned that this will lock the catalog file and prevent opening it in LrC until the lock file is deleted manually, but now behavior is different.
On my Mac I can reopen LrC without deleting the lock file.
Windows users tell me that they can not reopen LrC, but if they just restart Windows, LrC can reopen the catalog file again.
I would like to know and understand in detail how this works now, because I offer help to LrC users, and would like to be trustworthy.
Both my MacBook and Windows machine are running the latest update of OS and LrC

TOPICS
Windows

Views

538

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 03, 2021 Mar 03, 2021

Copy link to clipboard

Copied

I have seen reports of users re-opening with the .LOCK file in existence, but I think, to be authorative in your "help to LrC users" it might be best to stick to the official 'Help' article by Adobe. (Not updated since July 2019!)

https://helpx.adobe.com/lightroom-classic/kb/lightroom-error-catalog-cannot-be-opened-lrcat-lock.htm...

 

 

Regards. My System: Lightroom-Classic 13.2 Photoshop 25.5, ACR 16.2, Lightroom 7.2, Lr-iOS 9.0.1, Bridge 14.0.2, Windows-11.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Mar 03, 2021 Mar 03, 2021

Copy link to clipboard

Copied

Thank you for replying so quickly.

Yes, I know the article, and have referred to it over and over again, but now...
Either the article us outdated, or there is a bug in both the Windows and Mac LrC.

So  - I still like to know: Is it a bug or a feature?


Mye experience is:

 

  • On both Windows and Mac I can reopen the  locked LrC catalog file without deleting the lock file.
  • Users who get the error message (Lightroom can not open this Catalog because it is open in another app), keep telling me that they can just restart the computer to reopen the "locked" catalog file.

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 03, 2021 Mar 03, 2021

Copy link to clipboard

Copied

"a bug or a feature?"  Beyond my knowledge, sorry. We will have to wait for a more knowledgable person to reply.

If a bug- lets hope it is fixed.

If a Feature (Opening LRCAT with 'LOCK' present)- I cannot imagine why, as it is designed to avoid catalog corruption. Who would NOT want the 'lock' to work as it should?

 

Regards. My System: Lightroom-Classic 13.2 Photoshop 25.5, ACR 16.2, Lightroom 7.2, Lr-iOS 9.0.1, Bridge 14.0.2, Windows-11.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 03, 2021 Mar 03, 2021

Copy link to clipboard

Copied

Yes, I have noticed too that I can restart Lightroom on my Mac after a crash, without looking for the .lock file first. I kind of like it, I must admit (although Lightroom rarely crashes). I don't know if this is a bug, or if Adobe realised that the lock file does more harm than good if it is present when you start Lightroom. It usually results in panic, because most Lightroom users don't know what happened and what to do. And let's be practical: What is the chance that another application has really opened the catalog already? What other application do you have on your Mac that can open the catalog file in the first place? Apart from perhaps beta-testers, who may have two versions of Lightroom that can both open the same catalog, there will be very few people who really need the lock file to protect them against catalog corruption.

 

-- Johan W. Elzenga

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 03, 2021 Mar 03, 2021

Copy link to clipboard

Copied

[This post contains formatting and embedded images that don't appear in email. View the post in your Web browser.]

 

Being a nerd, I did some experiments to determine the behavior of the catalog .lock file with LR 10.1.1 on Mac OS 10.15.7 Windows 10.  The behavior on the two systems is almost identical and has been improved in some recent version to avoid needless warnings.  Here's how it works:

 

When LR opens a catalog, it creates the .lock file, which contains the path to the LR app and its current process id (PID). When LR exits normally, it deletes the .lock file.

 

On Mac, the .lock file contains:

 

path-to-app

PID

 

On Windows, the .lock file contains

 

<unknown>

PID

 

(The literal string "<unknown>".)  

 

When opening a catalog, if a previous .lock file exists, LR reads its contents and checks if refers to another process that's  currently running.  If it finds such a process, it opens the warning dialog. If it doesn't find such a process, then it reasonably assumes that the .lock was left around due to a program crash and proceeds normally, without the warning dialog.

 

The precise check differs slightly between the two platforms. On Mac, it sees if there is a process whose id is PID and whose path path-to-app. On Windows, it sees if there is a user process whose id is PID.   

 

[Use the blue reply button under the first post to ensure replies sort properly.]

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 03, 2021 Mar 03, 2021

Copy link to clipboard

Copied

"Users who get the error message (Lightroom can not open this Catalog because it is open in another app), keep telling me that they can just restart the computer to reopen the "locked" catalog file."

 

If they're running LR 10.1.1, I don't know why they would ever see the warning dialog after a crash, unless the LR process is still running but no longer has a window and is not responding (a "zombie" process, something I've seen just a few reports about over the years).  Perhaps the change was relatively recent and they're running an earlier version of LR.

 

Restarting Windows will close all existing processes and the "PID counter" gets reset. So after a restart it's very unlikely that any PID recorded in the .lock file will match that of a currently running user process.

 

[Use the blue reply button under the first post to ensure replies sort properly.]

 

 

 

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 03, 2021 Mar 03, 2021

Copy link to clipboard

Copied

LATEST

Good to hear. This is definitely an improvement!

 

-- Johan W. Elzenga

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines