2 Replies Latest reply on May 1, 2018 1:35 PM by raymanningphotography

    Corrupted LrPhoto object in LR 7.3 / rootFile nil

    raymanningphotography Level 1

      While working on a plug-in, I came across a photo entry in my catalog that has corrupt file information.  After tracking it down in the interface, this photo has no preview nor does it have file information. The metadata panel just spins on this photo and doesn't display anything about it. The extra details around the icon in grid view are all blank.  I can mark the photo as rejected but the flag never appears on the grid entry.  When I try to delete this photo through ctrl-alt-shift-del, I receive the following error:

       

       

      I receive the same error for this photo when I access any of the file properties via the SDK. 

       

      Is there another way to remove this photo from the catalog other than trying to delete/remove it? Failing that, can someone point me to documentation about the underlying database schema or tell me how to do this via SQL?

        • 2. Re: Corrupted LrPhoto object in LR 7.3 / rootFile nil
          raymanningphotography Level 1

          I've done a little more sleuthing on this issue and found that the corrupted photo entry only appears in the Catalog->AllPhotos collection.  Since I'm able to programmatically retrieve the dateTimeOriginal from the photo without it faulting (but not the path), I was able to use the Catalog->AllPhotos collection sorted by capture time to find the offending entry but when I sort my top level photos directory (there is only one) the photo does NOT appear in the collection.  Not sure this is helpful since it's known that the photo doesn't have a valid path.  Since the Lightroom UI will not delete this photo, and there does not appear to be a way to delete a photo via the SDK, I'm afraid my only option is to access the SQLite database directly to delete the object.  I have concerns about modifying the database directly rather than through the Lightroom UI but I see no other solution and Adobe isn't stepping in here.  I'm welcome to other suggestions or comments about modifying the database directly. 

           

          I've tried a number of other potential solutions that failed:

          - the UI will not delete this file

          - removing the directory, where the photos should be, from the library (based on the timestamp) and then re-adding the directory

          - creating a new catalog and importing the old - the import fails with an "unknown error" (this should really be another bug but is likely caused by the same problem)

           

          I'd hate to go in and modify the database only to find that it creates problems down the road long after I've removed the offending photo. I don't want put the database into a state that Lightroom sees as invalid. Are there options I'm missing? Seems the only support option is this forum and I'm guessing they don't actually monitor this forum (no response in a week) or have no interest in (or perhaps they already know) why this database has a corrupted entry. Does Adobe monitor this forum? Is there a support mechanism I'm missing for the Lightroom Photography plan? When I look at the support options grid (What are my contact options?), it does mention chat and telephone support for the photography plan but when I actually got to the support page , it only offers up this forum.  How do I chat with an agent?

           

          I'm open to any/all suggestions or tips on dealing with this.