Author Topic: Bug: Tipper messes up protocol icon order in system tray.  (Read 6511 times)

0 Members and 1 Guest are viewing this topic.

Offline Ratha

Miranda NG 0.95.4 Bug:

This started off as a plea for help, but i've figured out the current cause of the problem below:

This is an issue that ive been experiencing since the migration from Miranda 9 to 10, and it seems to persist in Miranda NG 0.95.4 as well: When i start Miranda, the icons in my system tray are ordered 1 (ICQ), 3 (Yahoo), 2 (Yahoo). However the order of the protocols on the contact list and in the protocol list (Options>Contact list>Accounts) are in the correct order of 1, 2, 3.

Attempting to rearrange these icons has some weird effects. In some circumstances you cannot rearrange the icons.

- Icon in the #1 slot (Leftmost). You can never drag the #1 icon on the system tray to the right. It will not go into position #2 or #3. It refuses to move.
- Icon in the #2 slot (Middle). You can always drag the #2 (middle) icon to the left or right, however when doing this, it always swaps the position of the #1 and #2 icon, the 3rd icon never moves.
- Icon in the #3 slot (Right). You can always drag the #3 (right) icon to the left, however doing this -always- causes the #3 icon to swap with the #1 slot. It will never move to the center.

With some effort, I have tracked the cause of this problem down to the Tipper plugin. Disabling tipper seems to fix the problem with the wrong startup order, and the inability to move the icons around in a natural way. I can provide video of this behavior if necessary. Tested this bug with all plugins disabled except for ICQ, Yahoo, and Tipper. Theres a small chance this could be a database related issue but dont have an easy way of testing that at the moment. Can someone else try to reproduce this behavior using 3 enabled accounts? (Also have 2 disabled accounts if that makes any difference)

VersionInfo
Quote
CPU: Intel(R) Core(TM) i5-4670K CPU @ 3.40GHz [Intel64 Family 6 Model 60 Stepping 3] [DEP Enabled] [4 CPUs]
Installed RAM: 8137 MBytes
Operating System: Microsoft Windows 7 Ultimate Edition, 64-bit Service Pack 1 (build 7601)
Internet Explorer: 8.0.7601.17514 (build 87601)
Administrator privileges: Yes
OS Languages: (UI | Locale (User/System)) : English/English | English/English
Free disk space on Miranda partition: 20463 MBytes

Miranda NG Version: 0.95.4 build #13028 [running inside WOW64]
Build time: 22 Apr 2015 0:43:30
Profile: C:\Program Files (x86)\Miranda NG - Copy (3)\Profiles\Ratha\Ratha.dat
Profile size: 67567616 Bytes
Profile creation date: 3 May 2015 3:24:29
Language pack: No language pack installed
Service Mode: No

Active Plugins (6):
  AdvaImg.dll v.0.11.0.2 [22 Apr 2015 0:44:52] - Miranda image services
  CrashDumper.dll v.0.0.5.2 [22 Apr 2015 0:49:18] - Crash dumper
  Dbx_mmap.dll v.0.95.3.1 [22 Apr 2015 0:43:54] - Miranda NG mmap database driver
  ICQ.dll v.0.11.3.2 [22 Apr 2015 0:45:04] - IcqOscarJ protocol
  Tipper.dll v.2.1.0.7 [22 Apr 2015 0:46:36] - Tipper
  Yahoo.dll v.0.11.0.1 [22 Apr 2015 0:44:48] - Yahoo protocol

Unloadable Plugins (1):
  DbChecker.dll v.0.0.0.0 [22 Apr 2015 0:49:52] - <unknown>


Protocols and Accounts:
-------------------------------------------------------------------------------
ICQ                      1 - Enabled 1 - Disabled  Loaded
YAHOO                    2 - Enabled 1 - Disabled  Loaded
MetaContacts             1 - Enabled 0 - Disabled  Loaded
YAMN                     0 - Enabled 1 - Disabled  Not Loaded

Icon Packs:
-------------------------------------------------------------------------------
 Flags_icons.dll [22 Apr 2015 0:52:46]
 HistoryPP_icons.dll [22 Apr 2015 0:50:40]
 Proto_ICQ.dll [22 Apr 2015 0:47:50]
 Proto_MetaContacts.dll [22 Apr 2015 0:55:16]
 Proto_Yahoo.dll [22 Apr 2015 0:47:52]
 Proto_YAMN.dll [22 Apr 2015 0:51:52]
 TabSRMM_icons.dll [22 Apr 2015 0:50:46]
 xStatus_ICQ.dll [22 Apr 2015 0:45:02]
[close]
« Last Edit: 03 05 2015, 15:10:47 by Ratha »
 

Offline White-Tiger

  • Developer
  • *****
  • Posts: 182
  • Country: 00
  • SendSS maintainer
Re: Bug: Tipper messes up protocol icon order in system tray.
« Reply #1 on: 03 05 2015, 11:14:52 »
right, Tipper seems to change the icons "dramatically" though I actually like what it does :P They are all attached to each other :P

Without Tipper, I've even got one icon that doesn't want to stay "always visible" and hides when I restart Miranda.. Likely caused by the fact that that specific icon is from an account without a name :P So Windows got nothing to remember as the "title" / "name" is empty

Windows seems to remember tray icons by their name. And Tipper seems to name all icons "Miranda NG", that's why you can't properly move them.. (kind of a Windows bug actually, or at least partially)
Without Tipper, they are named after their account name... (the way you've named them)

So I would suggest a rewrite of all this icon stuff^^ Especially handling the case that account names aren't unique (they don't have to be unique) or don't have a name at all.. yep I'm using an account without a name because I don't want it to use up space on my contact list.. so it just shows the icon for that one while others have a name

 

Offline Ratha

Re: Bug: Tipper messes up protocol icon order in system tray.
« Reply #2 on: 03 05 2015, 12:00:04 »
In your knowledge of how its broken, is there a way to rename the account / internal account names so that this does not happen?

There are a couple of entries in the database which look like they might pertain to icon ordering, but its going to take a lot of trial and error without knowing much about how accounts are ordered or numbered within the database. Theres an option under Database++ > Settings > Tipper "IconOrder" but its already set 00 01 02 03 04 05 which should be roughly the correct order of both how my accounts are named, and by their creation order.

Question: Where does one find the internal account name for accounts? (Its just the prefix name on all of the users inside the Database > Contacts section isnt it?)
Question: Where does Miranda store its account ordering in the database settings tree?

Additional data:

Account order in Miranda:
#1 - ICQ - R (Supposedly just "ICQ" internally)
#2 - ICQ - N
#3 - Yahoo - K
#4 - Yahoo - R
#5 - Yahoo - W

Account order on start bar with Tipper:
#1 - ICQ - R (Supposedly just "ICQ" internally)
#4 - Yahoo - R
#3 - Yahoo - K
#2 - ICQ - N
#5 - Yahoo - W (This account does not show on system tray with all 5 enabled.)
« Last Edit: 03 05 2015, 12:42:21 by Ratha »
 

Offline White-Tiger

  • Developer
  • *****
  • Posts: 182
  • Country: 00
  • SendSS maintainer
Re: Bug: Tipper messes up protocol icon order in system tray.
« Reply #3 on: 03 05 2015, 13:13:00 »
ugh.. not sure if you've understood me right (wasn't really meant to "help" you, just to confirm what and why :P)

Without Tipper, its not the "internal account name", it's the account name you'll see when you go: Main menu->Accounts...

If you really want to know the internal account name (which is mostly <protocol>_<number> such as ICQ_1 unless you've entered something else on account creation), you could use the DB editor, though I'm sure there are better ways^^

About the "account ordering" I don't think there's a generic way for it.. as it's not important for most things.. your Contact list, what so ever, stores an order that you can change at any time. Options->Contact list->Accounts

Though none of these will help you to "correct" the tray order... that one is completely on Windows hands. So without Tipper, it should in most cases sort the tray icons the way you wanted to (once you've dragged them around) With Tipper, currently no one can change that without "fixing" Tipper.

P.S. what were those letters after the protocol names supposed to be? your account names? In that case, even without Tipper, your R accounts would "share" a tray icon.. (well each their own icon, but they'll show and sort together)
« Last Edit: 03 05 2015, 13:16:41 by White-Tiger »

 

Offline Ratha

Re: Bug: Tipper messes up protocol icon order in system tray.
« Reply #4 on: 03 05 2015, 14:20:34 »
I knew that you were not intending to provide specific help to resolving this issue without an update to Tipper. But was hoping that you could shed some light on how things are stored in the database. Ive spent a lot of time in there, but my profile is a bit messy in there from old versions of SRMM and other plugins. Its hard to know whats active and what is just trash in there. I went through the entire thing up and down multiple times, but couldnt seem to find where the order of the accounts (Options > Contact List > Accounts) was stored.

I realize that knowing the answer to this this wouldnt directly help with the Tipper problem. My thought was that if i knew how the account ordering worked, i could compare that to the tipper-entries in the database and see if i could identify the cause of the weirdness within the database itself, assuming that its in there, which it probably isnt. Knowing more about how the database handles internal account names and identifiers however would be useful to me regardless. :)

-

The account names i listed were truncated for privacy reasons, they are all uniquely named but i limited them here to the first few characters of each account name. "ICQ" and "Yahoo" are part of the internal names that i set for them to be able to differentiate the different accounts back when i was setting them up. At that time i knew that if you left the internal name blank it would cause your accounts to be listed "ICQ_1" and so on, and did not find that descriptive enough so i cleaned my profiles and started again and named them to something descriptive.

In this case "(ICQ - R)" and "(Yahoo - R)" are for all intents and purposes the names that appear in the DB editor in front of each of my friends in the contacts section, and they match the account names as they appear on the accounts page with the exception of the parenthesis. The only account whose account name does not match its (internal?) databse name is my main "(ICQ)" account. In the database its just listed as "(ICQ)" with the contact name following it. On the account page its listed as "ICQ - R" because i didnt want to fix that one originally.

I only included the account names to indicate that the Tipper issue was not some sort of re-sorting based on alphabetical account name. Nor is it based on the vertical order that the accounts are listed in the database (as shown in DBEditor++).
 

Offline White-Tiger

  • Developer
  • *****
  • Posts: 182
  • Country: 00
  • SendSS maintainer
Re: Bug: Tipper messes up protocol icon order in system tray.
« Reply #5 on: 03 05 2015, 15:41:19 »
The sorting with Tipper will actually be based on the very internal sorting (eg. the order these accounts were created) + some weird Windows sorting^^

The order is saved under Settings->Protocols and there those numbered entries in range 2xx, so the value of "200" is the position of your protocol #0

 

Offline Ratha

Re: Bug: Tipper messes up protocol icon order in system tray.
« Reply #6 on: 03 05 2015, 23:15:16 »
Thanks.. i saw those but didnt know what to make of them. After you clarified that the whole section makes a lot more sense now. :)

What does the #400 value represent if i may ask? And can you correct me if im wrong about these?:

__1 - __6 - Internal Account Name (Probably linked to by all sorts of other internal data in the database?)
200 - 206 - Account ordering (200 = Account Order  -  Data Value = Internal Account Number.)
400 - 406 - Unknown (All accounts have hex value of 1 (0x00000001))
600 - 606 - Account Enabled / Disabled
800 - 806 - External Account Name

-

Everything below this line is personal notes about local configuration and can probably be disregarded. (Saved here for reference purposes.)

Code: [Select]
Internal Protocol Identifier
0 = ICQ
1 = ICQ - N
2 = Metacontacts
3 = Yahoo - K
4 = Yahoo - R
5 = Yahoo - W
6 = YAMN

Protocol Sorting Order ___ (Protocol Internal Name)
200 = 0 ___ (ICQ)
201 = 3 ___ (Yahoo - K)
202 = 6 ___ (YAMN)
203 = 4 ___ (Yahoo - R)
204 = 1 ___ (ICQ - N)
205 = 2 ___ (Meta Contacts)
206 = 5 ___ (Yahoo - W)

External Protocol Name
800 = ICQ - R ("ICQ" Internally)
801 = ICQ - N
802 = Meta Contacts
803 = Yahoo - K
804 = Yahoo - R
805 = Yahoo - W
806 = YAMN
 

Offline White-Tiger

  • Developer
  • *****
  • Posts: 182
  • Country: 00
  • SendSS maintainer
Re: Bug: Tipper messes up protocol icon order in system tray.
« Reply #7 on: 04 05 2015, 00:38:03 »
Not sure why you want to know that, but 400+ is the "visible" flag
Generally, you shouldn't mess with the database^^ Bad things happen :P
« Last Edit: 04 05 2015, 00:40:52 by White-Tiger »

 

Offline Ratha

Re: Bug: Tipper messes up protocol icon order in system tray.
« Reply #8 on: 04 05 2015, 01:39:28 »
Not sure why you want to know that, but 400+ is the "visible" flag
Generally, you shouldn't mess with the database^^ Bad things happen :P

Agreed, but it was messing with the database that helped me pinpoint and then solve a very obscure problem the other day. :) Anyway thanks for all the insight. Always good to know how your favorite (cant-live-without) messenger works under the hood, especially when tinkering or troubleshooting is required.

Will likely await a rewrite of Tipper, but have a few things to fiddle around with in the meantime. Going to consider re-creating my profile from scratch to clean up my database once i settle on a final set of plugins to replace those lost in the migration from Miranda 10.16 to NG 0.95.4, but in the meantime have a few new things i want to play around with in the database. :)