After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 790668 - Sorting photos by title causes incorrect display order
Sorting photos by title causes incorrect display order
Status: RESOLVED FIXED
Product: shotwell
Classification: Other
Component: general
0.26.x
Other Linux
: Normal major
: 0.28
Assigned To: Shotwell Maintainers
Shotwell Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-11-21 14:21 UTC by Lyle Reimer
Modified: 2017-11-26 15:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Photo album appearing jumbled when first opened and sorted by title (136.58 KB, image/jpeg)
2017-11-21 21:59 UTC, Lyle Reimer
  Details
Photo album appearing correctly sorted (135.50 KB, image/png)
2017-11-21 22:01 UTC, Lyle Reimer
  Details
Do not reset title on startup (1.10 KB, patch)
2017-11-26 14:59 UTC, Jens Georg
committed Details | Review

Description Lyle Reimer 2017-11-21 14:21:03 UTC
Selecting to sort photos by title causes them to display in a broken order. This can only be fixed be reselecting to sort by title over and over again until is finally organises itself correctly, although the broken order will reset when you change libraries or folders. 

This bug is happening consistently without fail, even with correctly tagged photo titles.
Comment 1 Jens Georg 2017-11-21 20:19:08 UTC
I can sort-of reproduce it; once it is stable, it seems to stay stable for me
Comment 2 Lyle Reimer 2017-11-21 21:09:16 UTC
(In reply to Jens Georg from comment #1)
> I can sort-of reproduce it; once it is stable, it seems to stay stable for me

I'll make a small library of numbered photos to see if I can create some example screenshots of this.
Comment 3 Jens Georg 2017-11-21 21:26:52 UTC
Can you try scrolling through the whole collection, then selecting the sorting and see if it sticks then?
Comment 4 Lyle Reimer 2017-11-21 21:55:42 UTC
(In reply to Jens Georg from comment #3)
> Can you try scrolling through the whole collection, then selecting the
> sorting and see if it sticks then?

Ok, I've been doing some fiddling around and found some things:

When I initially open the folder of photos, the order of photos when organised by title is incorrect. If I reselect Sort Photos -> By Title a couple of times, the order of the folder slowly shuffles into the correct order. Selecting a new folder to view and switching back and forth between the two also shuffles their orders back into their correct place (both resorting and switching between multiple folders can take from 2-5 attempts onwards to fully organise depending on the size of the library).

Once in order, the folders appear to remain in their correct positions for the rest of that current Shotwell session, but return to their unsorted state when you start a new session, meaning you must re-sort all of your folders again. The biggest issue with this is when trying to view the entire library collectively, because with a large library it can take a minute or two of clicking Sort Photos -> By Title before they're in order, but only for that session.

I'll include some examples of how the files appear jumbled when opened.
Comment 5 Lyle Reimer 2017-11-21 21:59:06 UTC
Created attachment 364150 [details]
Photo album appearing jumbled when first opened and sorted by title

This is how a photo album is displayed at first when opened.
Comment 6 Lyle Reimer 2017-11-21 22:01:55 UTC
Created attachment 364151 [details]
Photo album appearing correctly sorted

When reselecting Sort Photos -> By Title or by switching in between this and another folder, the photo album is then displayed correctly
Comment 7 Lyle Reimer 2017-11-21 22:03:09 UTC
Comment on attachment 364150 [details]
Photo album appearing jumbled when first opened and sorted by title

Incorrectly listed as a jpeg image when it is, in fact, a png.
Comment 8 Jens Georg 2017-11-22 07:49:29 UTC
My current assumption is that you have to shuffle until you moved every image into the visual area, and only then the title is available and a proper collation key is generated. At least that what it looked like when doing a quick debugging yesterday.

I need to check if that is a regression or was there before the switch to GAction.
Comment 9 Jens Georg 2017-11-22 13:57:23 UTC
Also weird with 0.22, but admittedly less weird.
Comment 10 Jens Georg 2017-11-25 17:46:52 UTC
The issue is that in https://git.gnome.org/browse/shotwell/tree/src/Thumbnail.vala#n123 the title is cleared during startup. this was done for performance optimisation. I don't really know why it doesn't show up in older versions, because it's not particularly new.
Comment 11 Jens Georg 2017-11-26 14:59:26 UTC
Created attachment 364441 [details] [review]
Do not reset title on startup

This partially reverts some of the startup optimisation made in 125bfbe
but doesn't seem to make the startup any worse

Fixes sorting by title
Comment 12 Jens Georg 2017-11-26 15:00:19 UTC
Attachment 364441 [details] pushed as 2f0cb48 - Do not reset title on startup