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. ***

Moderator: Dreamer

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

External delete of image files leaves database inconsistent

Post by jonha4711 » Mon May 16, 2016 5:26 pm

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: 31891
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: External delete of image files leaves database inconsist

Post by xnview » Tue May 17, 2016 11:04 am

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: 55
Joined: Mon Feb 08, 2016 4:35 pm

Re: External delete of image files leaves database inconsist

Post by jonha4711 » Tue May 17, 2016 11:38 am

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: 31891
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: External delete of image files leaves database inconsist

Post by xnview » Wed May 18, 2016 8:56 am

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: 55
Joined: Mon Feb 08, 2016 4:35 pm

Re: External delete of image files leaves database inconsist

Post by jonha4711 » Wed May 18, 2016 11:23 am

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: 31891
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: External delete of image files leaves database inconsist

Post by xnview » Fri May 20, 2016 11:44 am

See Issue 855 for current status and details.
Pierre.

jonha4711
Posts: 55
Joined: Mon Feb 08, 2016 4:35 pm

Re: External delete of image files leaves database inconsist

Post by jonha4711 » Fri May 20, 2016 12:39 pm

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: 31891
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: External delete of image files leaves database inconsist

Post by xnview » Mon May 23, 2016 7:22 am

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: 55
Joined: Mon Feb 08, 2016 4:35 pm

Re: External delete of image files leaves database inconsist

Post by jonha4711 » Mon May 23, 2016 9:28 am

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 » Mon Jun 06, 2016 1:29 pm

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: 8174
Joined: Sun Oct 12, 2003 6:47 pm
Location: Frankfurt, Germany

Re: External delete of image files leaves database inconsist

Post by helmut » Thu Mar 02, 2017 4:48 pm

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