Adium

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#10028 closed defect (duplicate)

Sorting of contacts in the list and of contacts inside meta contacts isn't remembered across restarts

Reported by: Robby Owned by: nobody
Milestone: Component: Adium Core
Version: Severity: major
Keywords: Cc:
Patch Status:

Description

Sorting contacts never really worked well but after some time I had managed to get them sorted somehow.

Yesterday, though, I started on a fresh set of preferences and wanted to sort my contacts again. However, after restarting Adium all the sorting I had done obviously hadn't been saved.
I don't know how this can be tackled, tell me what information I need to provide. :)

Change History (32)

comment:1 Changed 12 years ago by Robert

priority: normalhigh
Severity: normalmajor

I could imagine this being related to #9804.

comment:2 Changed 12 years ago by Robert

Summary: Adium doesn't remember how contacts were sorted across restartsSorting of contacts isn't remembered across restarts

comment:3 Changed 12 years ago by Robert

Summary: Sorting of contacts isn't remembered across restartsSorting of contacts in the list and of contacts inside meta contacts isn't remembered across restarts

Sorting inside meta contacts is also b0rked. Maddening...

comment:4 Changed 12 years ago by Jordan

Sorting inside metacontacts works ok for me - I re-arranged myself as a metacontact, remembering the 'before' configuration. I restarted Adium and it was exactly like the 'after' sort order, so it definitely saves for me.

comment:5 Changed 12 years ago by Jordan

Same with regular contact sorting - works ok for me. [23900] on 10.5.3

comment:6 Changed 12 years ago by Robert

This did work in most cases before I started out on the fresh set of preferences. This is [23898] on 10.4.11, by the way.

comment:7 in reply to:  1 Changed 12 years ago by Evan Schoenberg

Does this happen every time, or did it happen once?

Replying to Robby:

I could imagine this being related to #9804.

Did you lose all your aliases and contact-specific preferences?

comment:8 Changed 12 years ago by Robert

My contacts I haven't been able to get sorted at all.
Adium does seem to keep the order of sub-contacts in metas at times. Oddly, my perception is that it loves to have AIM contacts as the bottom-most subcontacts inside meta contacts but maybe this is random.
I just said

I could imagine this being related to #9804.

because that also describes Adium forgetting contact related information. I haven't set any aliases as Adium retrieves names from the AB. I don't know what other "contact-specific preferences" there are but I'm not really missing anything in this direction.

comment:9 Changed 12 years ago by Evan Schoenberg

I'll add debug logging to the sort-setting and we'll see what we see, then.

comment:10 Changed 12 years ago by Evan Schoenberg

(In [24033]) Added debug logging for setting order indexes. Refs #10028

comment:11 Changed 12 years ago by Robert

Ok, here's some debug logging for when I moved some contacts inside meta contacts.

comment:12 Changed 12 years ago by Evan Schoenberg

Did you update before producing this log?

comment:13 Changed 12 years ago by Robert

Oh my god, where was my mind!? :O

comment:14 Changed 12 years ago by Robert

Ok, sorry for that, here's a log after updating. I tried to cut out the entries that that were in these 10 seconds when I performed the sorting. It appears the changes I made have been kept across the restart.
I'll see how it goes with contacts that are offline in a second.

comment:15 Changed 12 years ago by Robert

Ok, I'm seeing something very odd:
The changes I did this time to contacts that were offline have been saved across a restart but the change I did in the first round of testing is gone again.

comment:16 Changed 12 years ago by Evan Schoenberg

The order index is being set properly in all these logs.

If you can reproduce this, I need to know what dragging you've done, within which metacontact, with what results. "Evan's metacontact was ordered X-Y-Z, then I dragged it to be Y-X-Z, which worked until I restarted, at which point it was back to X-Y-Z." If you're thinking it has to do with online/offline status, please note the online/offline nature of each contact being listed.

I have not been able to reproduce this problem.

comment:17 Changed 12 years ago by Robert

Ok, I just did a new test, this time with Jordan ;), whose accounts were and are all online (AIM, Gtalk, MSN).

The order was: 1. MSN, 2. Gtalk, 3. AIM.
But what I wanted was: 1. AIM, 2. Gtalk, 3. MSN.
So I first dragged AIM to the top of the three and then Gtalk in the middle, above MSN.

After the first restart the change was still there as I wanted it, after the second, though, AIM had been dropped to the bottom.
Now, after a few more restarts AIM is suddenly in the middle of the three accounts.

I'm puzzled. :/

comment:18 Changed 12 years ago by Evan Schoenberg

And the log files for inital setting, restart with invalid order, and restart with new invalid order?

I'm puzzled that you can reproduce this so easily (yay!) but I can't (boo). Perhaps the eventual solution will explain why.

comment:19 Changed 12 years ago by Robert

I'm sorry I can't attribute them precisely. I'll do a new test with Jordan.

Order was: 1. MSN, 2. AIM, 3. Gtalk
I dragged AIM to the top, Gtalk in the middle.

comment:20 Changed 12 years ago by Robert

First restart: changes kept.

comment:21 Changed 12 years ago by Robert

After the sixth restart, AIM has landed – in the middle... I was connected to AIM, but not ICQ because of rate limiting errors, I think. These errors had also affected AIM the restart before that, if I remember correctly.
Do you need the logs of the third, fourth and fifth restart, Evan?

comment:22 in reply to:  18 Changed 12 years ago by Robert

Replying to evands: [...]

I'm puzzled that you can reproduce this so easily (yay!) but I can't (boo). Perhaps the eventual solution will explain why.

Assumption made up out of thin air: this only happens when you start out with a fresh set of prefs and 1.3. Sorting was easier before I did that, I think.
Jordan will check in the next few days.

comment:23 Changed 12 years ago by Evan Schoenberg

  1. Those aren't complete logs. They don't contain any the debug logging from retrieving order. Rather than copying the tail of the log from Console, please post the actual log file.
  2. Please don't upload logs in RTF format; they can't be read directly within Trac.

comment:24 Changed 12 years ago by Evan Schoenberg

Nevermind about posting the logs; thinking about how this could possibly happen I came up with a solution, I believe. Let me know if the following fix works for you.

comment:25 Changed 12 years ago by Evan Schoenberg

Resolution: fixed
Status: newclosed

(In [24087]) Wow, ordering was a mess, especially as objects moved between groups.

Previously, an object was responsible for its order index, a value which followed it wherever it went. This goes horribly wrong when a contact changes containing objects (groups or metacontacts), as it may have the same order index as one of its siblings after moving. Same order index means rather arbitrary sorting behavior.

This sort of association would also break down if an object could be in multiple groups.

A containing object is now responsible for keeping track of objects within it. This should fix many obscure problems with sorting. We do a one-time upgrade from the old (possibly incorrect) order index preference as needed.

Fixes #10028

comment:26 in reply to:  23 Changed 12 years ago by Robert

Resolution: fixed
Status: closedreopened

Replying to evands:

  1. Those aren't complete logs. They don't contain any the debug logging from retrieving order. Rather than copying the tail of the log from Console, please post the actual log file.
  2. Please don't upload logs in RTF format; they can't be read directly within Trac.

Sorry about that. :(

Ok, sorting still has problems. Still, I am only testing sorting inside combined contacts with all contacts online.

Order was: 1. AIM 2. Gtalk, 3. ICQ, 4. Jabber
I dragged Jabber to the top.

comment:27 Changed 12 years ago by Robert

Actually, this was the fifth, sorry.

comment:28 Changed 12 years ago by Robert

I have been running [24087] for this.

comment:29 Changed 12 years ago by Jordan

Milestone: Adium X 1.3zzzDuplicate tickets
Resolution: duplicate
Status: reopenedclosed

In case of the possibility that running with a fresh set of prefs is where the problem lies, I cleaned my prefs (also to try to solve another problem I'm having) and it did not allow me to reproduce this. I noted the default arrangement of subcontacts within a metacontact, re-arranged them and reboot multiple times - they always remained the same.

I had a feeling I know what is causing this, and asked Robby if he has me in his Address Book. His answer: "yes, every contact that I have" so my guess is that this is ticket #8742 and that when it recreates them from the Address Book there's no order specified in which to combine them.

comment:30 Changed 12 years ago by Evan Schoenberg

Good work! Yes, #8742 would mean that ordering is completely obliterated with each restart... my fix in [24087] actually makes this worse. Before, there was a possibility the ordering would be right the next time, though it might not be; now, a new metacontact without its own concept of ordering will lead to no chance of your ordering being preserved. Yay :)

comment:31 Changed 12 years ago by Robert

I can confirm. Well done, Jordan! :)

comment:32 Changed 12 years ago by Robert

Milestone: zzzDuplicate tickets
Note: See TracTickets for help on using tickets.