0.61: Rating & Colour labels dissappear

*** Please report new bugs here! ***

Moderator: Dreamer

User avatar
Eyael
Posts: 66
Joined: Mon May 09, 2011 10:27 pm
Location: France
Contact:

Re: MP 0.61 - Rating & Colour label

Post by Eyael » Fri Aug 23, 2013 5:17 pm

I was just about to answer piXuniverse and say that I trusted Pierre to eventually find out how to reproduce this bug. He always does and I've very confident he will. Enjoy your holiday, Pierre :)
Windows XP Professional SP3 32 bit

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

Re: MP 0.61 - Rating & Colour label

Post by xnview » Mon Sep 02, 2013 9:30 am

piXuniverse wrote:No rush, it's awesome to hear that you didn't give up on this bug just yet, that's all that matters!
Do you have always your backup? could you contact me by mail?
Pierre.

piXuniverse
Posts: 23
Joined: Sat Jul 27, 2013 2:13 pm

Re: MP 0.61 - Rating & Colour label

Post by piXuniverse » Mon Sep 02, 2013 10:56 am

Nah i don't have backup, i had one after updating to 0.60 and 0.61 but after i saw that everything was fine, i deleted it.

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

Re: MP 0.61 - Rating & Colour label

Post by xnview » Wed Sep 04, 2013 2:07 pm

piXuniverse wrote:Nah i don't have backup, i had one after updating to 0.60 and 0.61 but after i saw that everything was fine, i deleted it.
Do you have a way to reproduce this bug? I've tried on a big folder, put some color label on files, restart but it's always good :(
Pierre.

piXuniverse
Posts: 23
Joined: Sat Jul 27, 2013 2:13 pm

Re: MP 0.61 - Rating & Colour label

Post by piXuniverse » Wed Sep 04, 2013 2:33 pm

Well i don't know, for me it happens 90% of the time when labeling files, my hope when opening this thread was that someone more technical will notice this problem and can find a reliable way to reproduce it for everybody.
All i know is, even with default config, fresh db, i open a folder with pics, label some, quit, restart the program and the labels are gone MOST of the time.

Tried reinstalling the microsoft visual c++ redistributables (i have 2005, 2008 (x86 and x64) and 2010 (x86 and x64) installed), tried opening as admin, tried running the program from the other hard drive, tried different color labels :P tried that xmp thing options, nothing :|

Saw some more people in this thread that have this problem, maybe they can tell more!

piXuniverse
Posts: 23
Joined: Sat Jul 27, 2013 2:13 pm

Re: MP 0.61 - Rating & Colour label

Post by piXuniverse » Wed Sep 04, 2013 2:47 pm

Just now, i tried reinstalling it again, default config, no db again. Started labeling files, everything went good, after a few program restarts, i labeled 3 random files, was about to exit when i got the "configm session save" dialog, clicked on don't save session, program closed, i restarted it, labels were gone. Can this be linked to the labels disappearing ? the session save thing?
I had that option disabled so when i start the program, it starts the browser and not the last image in the viewer.

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

Re: MP 0.61 - Rating & Colour label

Post by xnview » Fri Sep 06, 2013 7:14 am

Ok, i think that you have found the problem. If the viewer is opened, AND browser too, and your files are not yet checked, and you rate some files not checked...
Pierre.

piXuniverse
Posts: 23
Joined: Sat Jul 27, 2013 2:13 pm

Re: MP 0.61 - Rating & Colour label

Post by piXuniverse » Fri Sep 06, 2013 11:40 am

Awesome news, thank you! :)

User avatar
Eyael
Posts: 66
Joined: Mon May 09, 2011 10:27 pm
Location: France
Contact:

Re: MP 0.61 - Rating & Colour label

Post by Eyael » Sun Sep 08, 2013 5:16 pm

Then how comes all my XMP color labels won't appear as an icon on the thumbnails and all those files won't be displayed when clicking on the color label menu. As I mentioned by email I have about 3800 pictures with a green label (added to XMP) but XnView only displays 50 of these. Just now, I saw 120 pictures displayed when I clicked on label "Green" though only 50 had an icon on their thumbnails. I clicked onto another menu then back to the green label stuff and where I just saw 120 pix, I now have 50 pix. I did not quit XnView and those pix have been labelled eons ago. So what would session saving have to do with all this ? :shock:
Windows XP Professional SP3 32 bit

User avatar
m.Th.
XnThusiast
Posts: 1580
Joined: Wed Aug 16, 2006 6:31 am
Contact:

Re: MP 0.61 - Rating & Colour label

Post by m.Th. » Thu Sep 12, 2013 7:23 am

How to reproduce:

Let us have the files named: 001.jpg,002.jpg,003.jpg... sorted by name.

1. Open the first file in the folder (001.jpg) by doulbe clicking on it. The file is opened in the viewer.
2. Return back to the browser.
3. Ctrl+Sh+1 on 001.jpg
4. (Optional) Ctrl+2 on 002.jpg
5. Go to the viewer and close the 001.jpg
6. Come back to the browser and force a directory refresh. (Go to another folder and come back, or close/(re)open the program).

Expected:

The rating and the color from 001.jpg and 002.jpg are kept.

Actual:

They are lost.


Tested many times on a folder with 4125 JPGs.

What's happening inside:


If we look at the database (more specifically at the Images table where the Colors and Ratings are kept) we'll see that the values for rating / color are not saved at all if the Viewer is opened. However if we rate / color from the Viewer (yes, the Viewer does support this through the shortcuts, even if is a hidden feature :) ) then the values are saved correctly.

If the viewer is closed, any rating / color is saved immediately after pressing the corresponding shortcuts[*] with the correct values (1-5 respectively)

[*] Except of Ctrl+Shift+0 which. Does. NOT. Work. :( http://newsgroup.xnview.com/viewtopic.php?f=60&t=28303
m. Th.

The Ascetic Experience - The best photos and texts from Holy Mountain (Athos)

- Dark Themed XnViewMP 0.90 64bit & XnView 2.00 x64 on Win7 x64 -

User avatar
Eyael
Posts: 66
Joined: Mon May 09, 2011 10:27 pm
Location: France
Contact:

Re: MP 0.61 - Rating & Colour label

Post by Eyael » Sat Sep 14, 2013 8:13 pm

That still doesn't explain why I lost all my color tags which had been applied ages ago prior to MP 0.61.
Windows XP Professional SP3 32 bit

User avatar
m.Th.
XnThusiast
Posts: 1580
Joined: Wed Aug 16, 2006 6:31 am
Contact:

Re: MP 0.61 - Rating & Colour label

Post by m.Th. » Sun Sep 15, 2013 7:31 am

Eyael wrote:That still doesn't explain why I lost all my color tags which had been applied ages ago prior to MP 0.61.
Yes, but:

1. Nobody said that this bug appeared in 0.61 - only Pierre can clarify this.
2. In my hunt for this bug I "managed" few times (by opening the viewer) to clear the color / rating of the viewer image even if the color / rating was applied in a previous session. I cannot trace now but from my little experience I find it quite possible to have a code path in the viewer which will put 0 in the color and rating fields without the user's (known) consent.


Proposal:


Refactor the code by adding the same code from the browser tab together with its menu:
Rating-Color.jpg
Rating-Color.jpg (137.08 KiB) Viewed 818 times
In this way, IMHO we'll have two advantages:

1. The same(?) code will be executed for both cases hence the quality of code / maintenance will grow
2. The feature will be much more discoverable because of menu. Till now who knew that it existed? I don't.
m. Th.

The Ascetic Experience - The best photos and texts from Holy Mountain (Athos)

- Dark Themed XnViewMP 0.90 64bit & XnView 2.00 x64 on Win7 x64 -

User avatar
GeorgD
Posts: 283
Joined: Thu Oct 12, 2006 2:45 pm

0.61: Rating not displayed, but existing in XMP data

Post by GeorgD » Sun Nov 03, 2013 4:58 pm

I have a similar issue like jeremyh described Aug 14, 2013 8:04 pm and like m.Th. described Sep 12, 2013 7:23 am, but with little changed details. XnViewMP 0.61 does not "recognize" certain ratings any more, i.e. does not show the rating star in top right (both in thumbnails in browser and in single image display) and not in the information (toggled with key I), but XnViewMP is able to show those ratings in the properties area in browser (see screenshot). All ratings are still existent in the XMP metadata area of the pictures. Other ratings work fine, other tools like GeoSetter have no troubles with any of the files.

I observed it several times in a folder of 22 files that sum up to 100 megabytes, so nothing very big. I observed it for folders on the local machine as well as over WLAN network, I observed it on 2 machines, both running Win 7 64bit, one with admin user, one with restricted user.

I can reproduce it in 2-8 of 10 tries (no idea why it's not always the same) like this (Tipp: you can increase the probability a lot by using \\myComputerName\D\foldername instead of D:\foldername)
1 Open XnViewMP in browser mode
2 go to a test folder (only JPEGs), double click a pic, land in viewer (so 1 pic with menu bar), rate a few files with CTRL+4 etc.
3 close viewer, in browser move up one directory (clicking "file" .. or icon "arrow up" next to path)
4 repeat 2 and 3 with other files of the same folder
5 go to the folder, only the files rated in 4 do show the ratings, all ratings done in 2 are not visible

BTW: I tried a few times with 0.60 and did not observe that behaviour, but it was no throughout test so it's not that significant.

In Settings > Metadata, I have checked "export rating in XMP metadata" as I do want to be able to move/copy/... files and keep the metadata.
In the XnView Wiki, you can improve the user guide / documentation / F1-help for XnView (classic/Windows) and for XnViewMP

CameronD
Posts: 305
Joined: Wed Aug 01, 2007 1:28 pm
Location: Australia

Re: 0.61: Rating & Colour labels dissappear

Post by CameronD » Wed Nov 06, 2013 7:19 am

It is not just having a view window open that triggers the problem.
I can always reproduce the problem - in fact I have never not had the problem on two Win-7 x64 systems. (and now an XP system as well)

I initially installed my first copy of MP starting at v0.61 and started playing with how the new system handled keywords (a different story).
When I started looking at ratings and colours I noticed they were never retained, but I put that down to the fact that I had been messing around with settings related to the DB.

So I installed MP 0.61 on my laptop, that until then had only had XnView classsic 2.05. Classic is still installed on both systems, but I presume that is OK, since they use different folders for settings.
The laptop has almost default settings for MP - I changed thumbnail format from zip to jpeg hq and made sure it updates file times on changing file contents.

I created a test directory with 10 copies of a small file (~400x600 jpeg - 46kb) on a second local partition.
I changed a couple of captions with windows 7 and with XnView classic, just to create a few differences, then ran XnViewMP.
Open browser, select details mode, and drag the columns for caption, colour, tag and ratings where I can easily see them.

I then change an image's rating, either by right-click or by ctrl-number and/or another image's colour, again trying both techniques.
I can then open a view window on either of these images and the properties box shows the applied rating/colour. When I close the view window, the list is still showing the ratings and colour.
If I view->refresh the settings are still displayed.
I then click in the browser folder view to show the folder one above (or any other folder) and then go back to the target folder. The rating/colour settings are gone.
The tag checkbox is remembered correctly.

I don't know if it is relevant, but during all this time, the db file ..appdata/roaming/XnViewMP/XnView.db is updating its date modified, while settings->Browser->database shows my target cache directory has 11 files and zero bytes.
Optimizing has no effect. Rebuild thumbnails has no effect.


On the first PC that had shown the problem, I had enabled saving ratings and colours to XMP, and these values are written to the xmp block in the file.
If I then trigger a change of date-modified of the image, MP will correctly reread the rating/colour from XMP when I return to teh folder. But it always forgets it again when leaving the folder.

Cameron.

Update:
I resurrected an old XP 32-bit system, and after updating everything, installed MP 0.61 (system already had XnView classic 1.99).
I started with a copy of the same folder with 10 images and this system also does not save ratings or colour.

Update again:
On the XP system I uninstalled Classic and MP and the shellext, deleted the appdata folders and then downloaded the old v0.56.
When I ran it, the colours and ratings did work as expected and were retained across reloads - I used completely default settings, so ratings and colours were not saved to XMP.
Then I reinstalled MP 0.61 over the top, it warned about database changes and I selected "keep thumbnails". The behaviour went the same as reported above - ratings and colours are not retained after leaving a directory.
I also copied back the old appdata folder, and reran MP0.61 this time not saving thumbs, but the results were the same.

There seems to be no way at all I can install MP 0.61 and have it retain ratings and colours, except when they are newly written to XMP.

CameronD
Posts: 305
Joined: Wed Aug 01, 2007 1:28 pm
Location: Australia

Re: 0.61: Rating & Colour labels dissappear

Post by CameronD » Thu Nov 07, 2013 3:51 am

Here's a bit more debugging.

I opened SQLiteExpert on the XnView.db file, selected a view of the Images table where FolderID equalled the one I was checking.

If I refresh the DB view after changing rating and colour, then I see the new values in the db table as expected.

When I leave the directory, the db still has the rating/colour.

When I re-enter the folder and refresh the DB the values are zeroed.

Now, one odd thing I notice about the tables is that SQLiteExpert lists the ModifiedDate as 1899-12-30.
However if I run SQLite database browser from sourceforge then it displays a fairly sensible date and time, although they are all yesterday afternoon. The value of ModifiedDate is not changed when I apply a rating or colour, nor if I write a caption.
Both programs show the ModifiedDate as being type "DATE", so I don't know how the second program can report a time of day.

The Browser view in MP displays the filesystem's concept of file modified date/time, not the value in the database. I have MP set to make the file modification time the file modification time (OT: that this is not default really annoys me, but I guess that is set in stone now).

Edit: I have just read the SQLite docs on date and time - yechh, what a mess. No wonder the browsers get confused.

Post Reply