How to lose your categories

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
jadO
Posts: 419
Joined: Wed Apr 29, 2015 6:36 am

How to lose your categories

Post by jadO » Fri Aug 19, 2016 6:20 am

I have just destroyed lots of categories which is reallyl annoying even if I know it is beta software.
Here is what I did:

In the category panel created some new categories and subcategories.
I move around some existing categories into better fitting main categories and new categories
Sometime category names doubled. I will have to repeat it a couple of times to explain it better, but on creating a new subcategory it happend that it appeard twice with the same name after you moved existing subcategories into it. I think it was this way: Create new subcategory->Move existing categories into this new subcategory->Will leave you with the new created subcategory empty + the new subcategory with the items you have just moved.
Now when you delete the empty subcategory everything seems fine and working. Until you close XnviewMP. If you open it again, the new subcategory has gone and with it all the subcategories you have moved into it.

Badass!!!

Now I need was to fix it. I have a complete backup from around 3 weeks ago.

I have several questions:

When I export the categories from the backup and import them into the fucked up mess, what will happen?
How are categories saved in the database? Can I make a database dump for the categoies to get correct association between files and database again?

jadO
Posts: 419
Joined: Wed Apr 29, 2015 6:36 am

Re: How to lose your categories

Post by jadO » Fri Aug 19, 2016 7:06 am

After examining the database file my idea would be:

1. Import old tags where not exist to get the categories back
2. Same goes for Tagsets and TagSetsTree
3. And finally import non existing TagsTress from old database

@Xnview: Do you think this will work. Can you tell me the sql statements for that otherwise I have to work them out.

jadO
Posts: 419
Joined: Wed Apr 29, 2015 6:36 am

Re: How to lose your categories

Post by jadO » Fri Aug 19, 2016 5:15 pm

I was able to fix it. However I have no idea what kind of state the database is no.
I was working with the old backup and imported the tags-tables into it without overwriting existing entries.
From within XnviewMP it look good and I have at least my categories back and files assigned them.
What is lost is probably everything between my backup and today that was assigned to one of the deleted categories. Still bad but I guess I have to live with that.

User avatar
xnview
Author of XnView
Posts: 32081
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: How to lose your categories

Post by xnview » Sun Aug 21, 2016 2:04 pm

jadO wrote:I have just destroyed lots of categories which is reallyl annoying even if I know it is beta software.
:(

How do you have 'Sometime category names doubled'??
you have twice same category name with same parent?
Pierre.

jadO
Posts: 419
Joined: Wed Apr 29, 2015 6:36 am

Re: How to lose your categories

Post by jadO » Tue Aug 23, 2016 6:14 am

It is not easy to reproduce as the issue does not happen always.
You need to open the category pane with the check boxes and create some main categories and sub categories. When you start moving them around with your mouse then you will soon notice a lot fo weird things to happen.
What I noticed is: One category replicated itself several times (Every time I moved a completely different category around) and I was left with 5 instances of it in the category tree. A subcategory completely disappeared when I moved it one level up. And again I had a subcategory that i moved into another subcategory duplicating itself so that I was left with one instance at the original place in the tree and one instance at the new place.

As it requires some moves to replicate this, maybe other users who read this can try it too and confirm this issue.

Erixx haxx
Posts: 330
Joined: Tue Jul 28, 2015 10:37 am

Re: How to lose your categories

Post by Erixx haxx » Tue Aug 23, 2016 10:57 am

Hi:

Just wanted to say that I'Ve seen this happen also. Mainly while renaming and moving around Categories inside the Cat. panel.
I think it might be a refresh problem, because sometimes you have to restart Mp to make the Double Categories disappear or to take on new names you just entered.

My post here (2nd down) doesn't explain how, but does confirms it. http://newsgroup.xnview.com/viewtopic.php?f=82&t=33560

Here's The quote:
Mp does have its sync problems though, Mainly while changing category names or having doubles. As I am finding out now for myself. This is a Big problem for me.

Just Removing and adding categories from pictures seems to be working for me for the most part by using the category panel ticks. I have seen a few post about problems with the db not updating always as one would expect. So you may want to search the forum on the topic.
Before I mainly used it for a viewer and new options added made me want to try it to catalog also, But so far is not agreeing with me... :(
I also think when you change the name of a category to one that is already their, they should be able to merge togehther.

jadO
Posts: 419
Joined: Wed Apr 29, 2015 6:36 am

Re: How to lose your categories

Post by jadO » Wed Aug 24, 2016 6:16 am

@Erix haxx
Great that someone else experiencint this also.
I noticed that when you use the context menu for moving category it seems more reliable. At least I have not experienced that issue so far when using the context menu.
xnview wrote:
jadO wrote:I have just destroyed lots of categories which is reallyl annoying even if I know it is beta software.
:(

How do you have 'Sometime category names doubled'??
you have twice same category name with same parent?
Yes exactly. I moved a subcategory with its subcategories into a new category. After that I was seeing the moved subcategory at the new place and the old empy subcategory at its old place.
it seems that this is an display issue. Because after deleting the old empyt subcategory and restarting XnviewMP the old and the new subcategory was gone.

antineff
Posts: 17
Joined: Wed Oct 05, 2016 10:38 am

Re: How to lose your categories

Post by antineff » Fri Oct 07, 2016 8:18 pm

I have the same problem as described in the top posting. I havn't gone any further as I'm afraid to finally destroy some of the real meta data.

But I have also noticed the following:
If you find a picture in the browser that should have a keword assigned that you now miss in the list, the category actually is missing in the "categories groups" (Kategoriegruppen; German version used) pane too. But if you select the picture to be active in the "Info" pane and you choose tab "IPTC-IIM" here, you will find the keyword ist still contained in the meta data of the file. I also can search for the keyword in the top right command field and the pictures will be found.

IMO this would confirm the theory of sync problems.

I also tried to refresh the complete catalog via deleting and adding a new folder in the program settings. No change. The categories are still gone!

So it would help as a workaround to know how to read a completely new catalog from the directories (or refresh the existing one).

(Version 0.83 x64 on Win7 used)

User avatar
xnview
Author of XnView
Posts: 32081
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: How to lose your categories

Post by xnview » Mon Oct 10, 2016 1:17 pm

antineff wrote: I also tried to refresh the complete catalog via deleting and adding a new folder in the program settings. No change. The categories are still gone!

So it would help as a workaround to know how to read a completely new catalog from the directories (or refresh the existing one).
Do you export categories in IPTC/XMP?
Pierre.

antineff
Posts: 17
Joined: Wed Oct 05, 2016 10:38 am

Re: How to lose your categories

Post by antineff » Mon Oct 10, 2016 6:47 pm

In the meantime, I started to understand the interaction of IPTC keywords and categories: Creating a catalog reads the IPTC tags and creates categories from them. But creating a categorie does not automatically create the same keyword within the IPTC tag. I have to use the Ctrl-I dialog for that. Knowing about that makes everything much easier! :) Also I got the hint for the checkboxes within the settings from another threat in the meantime.

So, if I understood your question correctly: Yes, I now know how to write the IPTC tags with XnView and I'm heavily using that now! So, sorry for creating that excursion to that little off topic, but the problem described in the top posting is still existing!

The workaround I use for now is to delete both DB files Thumb.db and XnView.db, then create a new catalog and let all categories be created from the IPTC tag. At last I make a copy of both DB files, from which I can recover when the original DB is corrupted again (simply copy back). I'd recommend to do the copy right before you plan to struggle with the categories. Of course all changes between the copy and the corruption are gone.

Also, this little trick costs about 4 Gigs of extra space, in my case! And it can get time consuming if you must recover quite often. A fix ist highly appreciated! (Like all the thousands of other things, I guess! ;) )

User avatar
xnview
Author of XnView
Posts: 32081
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: How to lose your categories

Post by xnview » Tue Oct 11, 2016 6:58 am

antineff wrote: The workaround I use for now is to delete both DB files Thumb.db and XnView.db, then create a new catalog and let all categories be created from the IPTC tag. At last I make a copy of both DB files, from which I can recover when the original DB is corrupted again (simply copy back). I'd recommend to do the copy right before you plan to struggle with the categories. Of course all changes between the copy and the corruption are gone.

Also, this little trick costs about 4 Gigs of extra space, in my case! And it can get time consuming if you must recover quite often. A fix ist highly appreciated! (Like all the thousands of other things, I guess! ;) )
do you have a way to reproduce the corrupted database?
Pierre.

antineff
Posts: 17
Joined: Wed Oct 05, 2016 10:38 am

Re: How to lose your categories

Post by antineff » Tue Oct 11, 2016 10:45 pm

To find any regularities in the behavior of the database will take some time. I think perhaps I find time the next days to do some testing. I will report!

But did you try to organize your categories in the way jadO described? What he is writing about is exactly the same that happened to me!

User avatar
xnview
Author of XnView
Posts: 32081
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: How to lose your categories

Post by xnview » Tue Oct 18, 2016 11:59 am

i'm able to reproduce this bug, i've sent you a PM
Pierre.

User avatar
helmut
Posts: 8175
Joined: Sun Oct 12, 2003 6:47 pm
Location: Frankfurt, Germany

Re: How to lose your categories

Post by helmut » Mon Dec 05, 2016 8:43 pm

This problem is supposed to be fixed in XnView MP 0.84 beta 1. jad0, could you please try and confirm the bug fix?

Post Reply