Problem copying Lightroom catalog

Get help for specific problems
Posts: 4
Joined: 28 Oct 2018

joh

Hi,

I am getting an error when syncing a drive which contains a Lightroom catalog file. Lightroom is running while FreeFileSync is trying to copy the catalog:

08:14:22 Error Cannot copy file
"....lightroom.lrcat" to
"....lightroom.736e.ffs_tmp".
Error Code 0: Der Vorgang wurde erfolgreich beendet. [CopyFileEx]

Doesn't sound like a real error :-)

"Copy locked files" is activated in the options. Task is running with highest privileges.
FreeFileSync 10.5 Build: 11.10.2018 - Unicode x64 [Donation Edition]

Any ideas?

Regards,
Joh
User avatar
Site Admin
Posts: 7052
Joined: 9 Dec 2007

Zenju

Indeed a great error message! This looks like a Windows bug inside CopyFileEx. Maybe some driver-level call fails internally and doesn't set the error code, and CopyFileEx doesn't verify.
There probably won't come much of it, but if you like you can send me a Process Monitor trace, which might reveal why CopyFileEx is internally failing:
https://freefilesync.org/faq.php#trace
User avatar
Site Admin
Posts: 7052
Joined: 9 Dec 2007

Zenju

I need a Process *Monitor* trace file, not a Process Explorer dump file.
User avatar
Site Admin
Posts: 7052
Joined: 9 Dec 2007

Zenju

Reading the file "E:\Adobe Lightroom Bilderkatalog\Bilderkatalog.lrcat" fails with a "FILE LOCK CONFLICT" at offset 1.073.741.824 inside of CopyFileEx. This is expected since Lightroom has this byte range locked.

CopyFileEx however does not properly return this error and fails with a misleading ERROR_SUCCESS instead of ERROR_LOCK_VIOLATION as would be expected.
Posts: 4
Joined: 28 Oct 2018

joh

Is this anything you can work around in FreeFileSync?
User avatar
Site Admin
Posts: 7052
Joined: 9 Dec 2007

Zenju

I don't think so. The only information available is a failed API call and an incorrect error code. Not a lot to work with.
Posts: 4
Joined: 28 Oct 2018

joh

I see. What I dont understand, what's special in this case. Is Lightroom locking the file in a different way then other applications?
User avatar
Site Admin
Posts: 7052
Joined: 9 Dec 2007

Zenju

I have no idea. The bug is clearly somewhere inside CopyFileEx.
Posts: 4
Joined: 28 Oct 2018

joh

The problem is gone with Windows 10 version 1903.