I use 1.6.17 and I just moved two images and one .odt (libreoffice doc) into a vault and I got this error. I used to get this a lot with .exe files but now I always .7zip them to avoid this issue. I didn’t expect it with image files on a freshly formatted system.
This issue with the failed lock seems to be happening since at least 2021 (regardless of what might be causing it) and is probably the most commonly reported issue I think:
In case it helps anyone, I got past this failed lock by selecting all folders/files in the vault and right-clicked → properties. When the stats finished loading (i.e. number of files and total size), I could lock the vault again. If anyone else could confirm this worked for them that would be great.