Opened 6 years ago

#15438 new defect

Sorting by status is unstable

Reported by: immerrr Owned by:
Milestone: Component: pidgin (gtk)
Version: 2.10.6 Keywords:
Cc:

Description

This issue has been there since I've started using Pidgin @ 2.4.smth. Here's how it goes:

  • set "Buddies" -> "Sort Buddies" -> "By status"
  • try skimming through the list by pressing and holding <down> key
  • sometimes if there are 3+ away or invisible contacts in a row, as the selection passes to the next item, the item itself goes 1-2 steps back
  • on the next iteration, same thing happens and if you hold the key long enough, you see the pattern: the selection effectively stays in place and three items revolve around it instead.

I've done some research and it appears that status.c:1600:purple_presence_compare is the reason. I've injected debug trace into gtkblist.c:7763:sort_method_status to log the swaps being made on buddy update and here's an excerpt from my log:

(13:52:17) swap(ng, sl): presence_cmp 0 name_cmp -5 (13:52:17) swap(is, ng): presence_cmp 0 name_cmp -5 (13:52:17) swap(sl, is): presence_cmp -1 name_cmp 10

(13:52:17) swap(ng, sl): presence_cmp 0 name_cmp -5 (13:52:17) swap(is, ng): presence_cmp 0 name_cmp -5 (13:52:17) swap(sl, is): presence_cmp -1 name_cmp 10

So, ng swaps with sl which swaps with is which swaps with ng and so on, that's the revolving observed. And, obviously, this is caused by presence_cmp whose equivalency relation is not transitive.

Change History (0)

Note: See TracTickets for help on using tickets.
All information, including names and email addresses, entered onto this website or sent to mailing lists affiliated with this website will be public. Do not post confidential information, especially passwords!