Page 1 of 1

External delete of image files leaves database inconsistent

Posted: Mon May 16, 2016 5:26 pm
by jonha4711
I have exactly one image with set categories and XMP tags. I delete this image, though not with XnViewMP but with an external program (say explorer) while XnViewMP is not running. Now, when I restart XnViewMP the image is of course gone but it still shows up in tab "Category Filter" in the sense that its set categories are set to (1). "Refresh" or "Update Catalog from Files" has no effect. Clicking on one of the categories has no effect either. I also tried various options in "Settings > Browser > Catalog > Optimize" but there seems to be no way to return the database to a consistent state, short of rebuilding the catalog.

BTW, while experimenting with the options in "Settings > Browser > Catalog > Optimize" I once selected "Remove data for orphaned directories" and lost the complete database and the thumbnails. (I have backups.) This option either does not what it says or it's buggy.

Re: External delete of image files leaves database inconsist

Posted: Tue May 17, 2016 11:04 am
by xnview
XnViewMP can't detect automatically deleted files, so you need to use 'Optimize'
I've tried 'Optimize' and no problem. After pressing the button you have no more entries?? And if you try 'Remove data for orphaned files' only??

Re: External delete of image files leaves database inconsist

Posted: Tue May 17, 2016 11:38 am
by jonha4711
xnview wrote:XnViewMP can't detect automatically deleted files, so you need to use 'Optimize'
I've tried 'Optimize' and no problem. After pressing the button you have no more entries?? And if you try 'Remove data for orphaned files' only??
Nope, this did not work. I first tried optimise orphaned files, that didn't help (ie the bogus categories were still there). I then tried, just for the sake of it and though I felt it was not to do with the problem, optimise orphaned folders. At that point the whole database and the thumbnails db lost all file information. I will later test this specific scenario again and confirm.

BTW all work done with XnViewMP .79, Win 7.

EDIT: I am now at my main machine and have repeated the steps I did yesterday. When I have the database category count in an inconsistent state due to external deletion of an image, no option in the "Catalog optimization" puts the database back into a consistent state. I've double checked this.

Further I can confirm that, if I check "Remove data for orphaned directories", all file and directory information in the database is removed and all thumbnails are deleted. This is reproducible.

Re: External delete of image files leaves database inconsist

Posted: Wed May 18, 2016 8:56 am
by xnview
jonha4711 wrote: Further I can confirm that, if I check "Remove data for orphaned directories", all file and directory information in the database is removed and all thumbnails are deleted. This is reproducible.
i've tried and can reproduce. The folder in settings>Catalog exists? you don't use 'base folder'?

Re: External delete of image files leaves database inconsist

Posted: Wed May 18, 2016 11:23 am
by jonha4711
xnview wrote:
jonha4711 wrote: Further I can confirm that, if I check "Remove data for orphaned directories", all file and directory information in the database is removed and all thumbnails are deleted. This is reproducible.
i've tried and can reproduce. The folder in Settings>Catalog exists? you don't use 'base folder'?
I do use a base folder and it certainly exists. In fact, all my photos are in a huge tree below that base folder and the listbox in Settings>Catalog which lists the directories is filled with all those subdirectories. When I check "Remove data for orphaned directories" and do it, this whole box is afterwards completely empty; all thumbnails are gone as well.

Re: External delete of image files leaves database inconsist

Posted: Fri May 20, 2016 11:44 am
by xnview
See Issue 855 for current status and details.

Re: External delete of image files leaves database inconsist

Posted: Fri May 20, 2016 12:39 pm
by jonha4711
xnview wrote:See Issue 855 for current status and details.
Merci bcp. I understand this deals with the secondary problem of deleting database information when optimising. What about the original problem of an inconsistent database?

Re: External delete of image files leaves database inconsist

Posted: Mon May 23, 2016 7:22 am
by xnview
jonha4711 wrote:
xnview wrote:See Issue 855 for current status and details.
Merci bcp. I understand this deals with the secondary problem of deleting database information when optimising. What about the original problem of an inconsistent database?
i can't know if a file was deleted from external program, so here optimize is a help

Re: External delete of image files leaves database inconsist

Posted: Mon May 23, 2016 9:28 am
by jonha4711
xnview wrote:i can't know if a file was deleted from external program, so here optimize is a help
Sure it would... if it worked! In the current version .79 it doesn't. That was the reason why I posted this in the first place...

Also I understand that it is not easy to detect automatically AND fast whether a file was deleted and to remove its information from the database. So some kind of explicit consistency check in the Settings>Catalog options dialog might be a good idea.

Re: External delete of image files leaves database inconsist

Posted: Mon Jun 06, 2016 1:29 pm
by moth3r
Hi,

completely agree! People have been asking for that for years. If Picasa did not have it I would even side with developer saying that auto refresh is not possible. Considering Picasa is now killed because Google is all about the cloud there is not much alternatives. That should be opportunity for XnView to seize it and not the other way around. Also if we had this feature that should not be my first post either :)

Re: External delete of image files leaves database inconsist

Posted: Thu Mar 02, 2017 4:48 pm
by helmut
Catalogue optimization / maintenance handles various types of situations. E.g. ophaned categories will be removed.
@jonha4711: Please check with the current version v0.84 and let us know if the problem still occurs or not.