Author Topic: False "away" status when server connection is lost  (Read 15900 times)

0 Members and 2 Guests are viewing this topic.

Offline Testertime

Hello! I have reported over a month ago a bug which is easily reproducible. Here is the link: http://trac.miranda-ng.org/ticket/984

It has probably to do with the plugin "KeepStatus". This is the bug: If I'm away, and one Jabber server goes down (or the connection is lost) in the meantime while my status is set to away by 5 minutes of idle time, there is a small glitch. If I'm coming back, and the connection is still lost, my status is at first "online" as it should be. But after a few seconds the status is changing back to "away" again. And I have to change it manually by hand back to "online". It becomes quite annoying after a while if there are even small connection problems.

I haven't tested if all other account types like ICQ, MSN, etc are effected by this little bug too. I hope somebody can please look into this. Thanks a lot! :)
 

Offline Wishmaster

Re: False "away" status when server connection is lost
« Reply #1 on: 05 09 2015, 18:31:44 »
Can you make a Netzwerklog?
Maybe it logs something useful
 

Offline Testertime

Re: False "away" status when server connection is lost
« Reply #2 on: 05 09 2015, 19:29:44 »
Thanks for your answer, here is the log. Hopefully it's really useful for you :) The important part where the bug occurs is probably more at the end of the log.

Originally I wrote in my bug report that it happens with two (Jabber) accounts, but I saw that it's also happening with a single (Jabber) account - it's only a little less obvious at the user interface.
« Last Edit: 05 09 2015, 19:35:31 by Testertime »
 

Offline Wishmaster

Re: False "away" status when server connection is lost
« Reply #3 on: 05 09 2015, 20:11:27 »
Yes, the most important parts are those "SetAwayMsg called", where wParam 40072 is online and 40073 is away. KeepStatus sets the status to away because it was away before the connection loss, and it doesn't know if away is set because of idle or not.
 

Offline Testertime

Re: False "away" status when server connection is lost
« Reply #4 on: 05 09 2015, 21:38:22 »
Great to see that you found it! If you have some spare time, I hope you (or someone else) can please fix this bug somewhere in the next weeks, if possible. Thank you so much in advance! :THUMBS UP: If I had the skills, I would seriously do it by myself.
 

Offline Wishmaster

Re: False "away" status when server connection is lost
« Reply #5 on: 05 09 2015, 21:44:13 »
Not sure if it is a bug. What if you are really away and you are online because of a connection loss?
people would assume that you returned and start to write you. It doesn't make sense.
 

Offline Testertime

Re: False "away" status when server connection is lost
« Reply #6 on: 05 09 2015, 21:53:50 »
Not sure if it is a bug. What if you are really away and you are online because of a connection loss?

I agree with this, but it isn't the case here (and I guess I have explained it badly - sorry for the confusion). If I'm really back on my computer, Miranda would change the status back to online. But while the server is down, it will still keep my status as "away" if the server is back online, even though I'm not away anymore. It can't be intended, because this doesn't make sense. At my bug report I had linked a video, can you please take a look?

https://vimeo.com/135305217 - the important part starts at 01:05. Thanks :)
« Last Edit: 05 09 2015, 21:58:04 by Testertime »
 

Offline Wishmaster

Re: False "away" status when server connection is lost
« Reply #7 on: 05 09 2015, 22:19:36 »
Well, you talked about " there are even small connection problems.", and you just came back in that time?  That's a coincidence. :)
Do we have a different understanding of the word "small" here?


So what you mean is that your status has been changed in that time?
 

Offline Testertime

Re: False "away" status when server connection is lost
« Reply #8 on: 05 09 2015, 22:43:32 »
Well, you talked about " there are even small connection problems.", and you just came back in that time?  That's a coincidence. :)

If for example the server (or my internet connection) is down for 10 minutes, and I was idle before and I'm coming back while the connection is down, this small time frame is still enough to trigger this bug (that it doesn't change my status back to online like it should). 10 minutes is small for me, and I already had a situation where I was away for this short amount of time, and in the meantime the connection to a Jabber server was lost. The jit.si Jabber server is sometimes down quite often, so in the long run this coincidence has a high chance.

So what you mean is that your status has been changed in that time?

No. And that is the problem. If I'm not idle anymore, it should properly change back my status to "online", but Miranda doesn't do it when even one Jabber server is unreachable. As you can see in the video, the second Jabber server is still online, and still both accounts have the false "away" status because just one was down.

In my video I have moved my mouse at 02:30 while one Jabber server is down. At first the account "tester33345" was properly changed back to "online", but then it's suddenly "away" again, because Miranda tries to reconnect to the Jabber server who is down.

Sorry again if my text sounds too confusing - I thought the video would show this already perfectly.
 

Offline Robyer

Re: False "away" status when server connection is lost
« Reply #9 on: 06 09 2015, 18:18:28 »
Testertime, if I understand correctly:

1) protocol is auto-away because you are idle for x minutes (keepstatus remembers protocol is away)
2) network drops and protocol goes offline (keepstatus know that it should return it to away)
3) protocol is still down and you came back to computer and interact
4) auto away plugin react and change protocols to online
Now here is the question (and my guessing):
    a) does the auto away plugin TRY to switch status to online of these offline protocols?
       -> if so, perhaps issue of Keep status plugin, who didn't remember that you (= auto away plugin) wanted this protocol to be online now (maybe because protocol never went to this status and keep status remembers only status in which protocol was?)
    b) or does the auto away plugin IGNORE the change back to online, because protocol is offline.
       -> if it is this case, perhaps it is issue of auto away plugin

Do I understand it correctly?
I was developing mainly Facebook, Omegle, Steam, Dummy and MobileState plugins. Now I'm retired. Goodbye, everyone. ~ You can still find me on Facebook.
 

Offline White-Tiger

  • Developer
  • *****
  • Posts: 182
  • Country: 00
  • SendSS maintainer
Re:False "away" status when server connection is lost
« Reply #10 on: 07 09 2015, 09:29:19 »
I'm for "b)"
"a)" doesn't make much sense here.. If you manually set the status to offline while keep status is trying to "reconnect", it'll accept the offline status and says "status set successfully" as a response. Job done...

So KeepStatus actually uses the last set, last tried status (at least it usually does and is a bug otherwise)

Also, Testertime mentioned that not only the protocol that went offline had a wrong status, but others do as well. This also sounds more like an auto-away issue.
Yet, if "b)" is really the case, how to fix it? Would require auto-away to know that the protocol was / is online... (KeepStatus tries to reconnect it) So KeepStatus might have to export a service for that and auto-away use it.
Otherwise it would be a quite expected behavior... as auto-away shouldn't switch manually set offline protocols to away/online

 

Offline AnrDaemon

Re: False "away" status when server connection is lost
« Reply #11 on: 08 09 2015, 02:26:28 »
As far as I recall, KeepStatus remember the last status the protocol was set to, and is trying to set protocol to that status in order to reconnect to the network.
If your away plugin is trying to raise status upon your return ahead of the time KeepStatus did its job, and the status is not the one desirable, I would blame that away plugin.
 

Offline Testertime

Re: False "away" status when server connection is lost
« Reply #12 on: 08 09 2015, 20:54:14 »
Thanks for your answers!

As far as I recall, KeepStatus remember the last status the protocol was set to, and is trying to set protocol to that status in order to reconnect to the network.
If your away plugin is trying to raise status upon your return ahead of the time KeepStatus did its job, and the status is not the one desirable, I would blame that away plugin.

That's the magic question, which plugin is doing this? Personally I still believe it's KeepStatus, because once I moved my mouse at 02:30 in my video, my status was properly "online" again, but a few seconds after that, it's "away" again. KeepStatus tries to reconnect while this happened, and this bug doesn't happen if the connection is not down. So my conclusion is that it's probably KeepStatus fault. But I'm not a developer, so I can't say that for sure.


Now here is the question (and my guessing):
    a) does the auto away plugin TRY to switch status to online of these offline protocols?
       -> if so, perhaps issue of Keep status plugin, who didn't remember that you (= auto away plugin) wanted this protocol to be online now (maybe because protocol never went to this status and keep status remembers only status in which protocol was?)

This is what I'm thinking. The AutoAway plugin properly restores my status to "online" as seen in my video at 02:30, but a few seconds after that, it's back to "away" again, and this happens while KeepStatus is reconnecting. By watching this behavior, I guess it's a)

    b) or does the auto away plugin IGNORE the change back to online, because protocol is offline.
       -> if it is this case, perhaps it is issue of auto away plugin

I'm a little bit confused about this one. Why should the AutoAway plugin ignore my change back to online, when it has changed my status to "online" as seen after 02:30 in my video? For me it looks like it's working as intended, and that KeepStatus doesn't respect the status change from AutoAway, while one account is offline because of a disconnect. It seems KeepStatus is using the status before one account went offline due to a disconnect, and doesn't care about status changes, which results in overwriting my "online" status to the "away" status. (I hope this text isn't confusing again, because personally I can understand it ::))

After all you do know more about the program and plugins than I do. Thanks in advance again! :)
« Last Edit: 08 09 2015, 20:59:13 by Testertime »
 

Offline AnrDaemon

Re: False "away" status when server connection is lost
« Reply #13 on: 09 09 2015, 04:36:45 »
That's an interesting question.
Does KeepStatus watch protocol status changes between reconnects?
 

Offline Robyer

Re: False "away" status when server connection is lost
« Reply #14 on: 09 09 2015, 05:48:26 »
It's problem of Keep Status.
Internal StdAutoAway module is very simple. It just watch for idle event and if user is now idle, it remember old status and switch to wanted status; if user stop being idle, it load last status (must be either online or free for chat) and set it. Which means it could bring protocol even from offline (it doesn't care).

What to try:
1) Could you try to install AdvancedAutoAway (which is from same author as KeepStatus) and reproduce problem with it too?
2) Could you try SmartAutoAway plugin instead of KeepStatus? It provides own "auto reconnect" function. - hm, it's not adopted for NG yet. So, what about trying it in Miranda IM? Reproduce it with KeepStatus and then try SmartAutoAway (install both "Smart Auto Away" and "Smart Auto Away NI" plugins). Hm, Miranda IM addons are down and I didn't found a mirror... Ok, forget it for now.
3) Will enabling setting "Switch to offline before try new connection attempt" (I'm guessing name) of KeepStatus make any change to the behavior?
4) Could you also enable showing popups of KeepStatus behavior? (there should be some option for that) Maybe it would help understand what's going on with the first protocol that hasn't lost connection.
I was developing mainly Facebook, Omegle, Steam, Dummy and MobileState plugins. Now I'm retired. Goodbye, everyone. ~ You can still find me on Facebook.