External delete of image files leaves database inconsistent

Older bugs which are supposed to be fixed in 0.84. *** Please try to reproduce your bug and confirm the bug fix. ***

Moderators: XnTriq, helmut, xnview, Dreamer

Post Reply
jonha4711
Posts: 62
Joined: Mon Feb 08, 2016 4:35 pm

External delete of image files leaves database inconsistent

Post 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.
User avatar
xnview
Author of XnView
Posts: 43357
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: External delete of image files leaves database inconsist

Post 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??
Pierre.
jonha4711
Posts: 62
Joined: Mon Feb 08, 2016 4:35 pm

Re: External delete of image files leaves database inconsist

Post 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.
User avatar
xnview
Author of XnView
Posts: 43357
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: External delete of image files leaves database inconsist

Post 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'?
Pierre.
jonha4711
Posts: 62
Joined: Mon Feb 08, 2016 4:35 pm

Re: External delete of image files leaves database inconsist

Post 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.
User avatar
xnview
Author of XnView
Posts: 43357
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: External delete of image files leaves database inconsist

Post by xnview »

See Issue 855 for current status and details.
Pierre.
jonha4711
Posts: 62
Joined: Mon Feb 08, 2016 4:35 pm

Re: External delete of image files leaves database inconsist

Post 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?
User avatar
xnview
Author of XnView
Posts: 43357
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: External delete of image files leaves database inconsist

Post 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
Pierre.
jonha4711
Posts: 62
Joined: Mon Feb 08, 2016 4:35 pm

Re: External delete of image files leaves database inconsist

Post 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.
moth3r
Posts: 1
Joined: Mon Jun 06, 2016 1:21 pm

Re: External delete of image files leaves database inconsist

Post 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 :)
User avatar
helmut
Posts: 8705
Joined: Sun Oct 12, 2003 6:47 pm
Location: Frankfurt, Germany

Re: External delete of image files leaves database inconsist

Post 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.
Post Reply