Not logged in. · Lost password · Register
Forum: MatriX RSS
Avatar
AaronKueng #1
Member since Aug 2014 · 8 posts
Group memberships: Members
Show profile · Link to this post
Subject: Matrix issue while Windows enter hibernate mode
The first time to be here, hello, everybody.

I am having trouble about Matrix reconnect after OS entering hibernate mode.

I make PC enter hibernate mode while Matix being connected (Alive time is 1 minute).
After 10 minutes, resume the PC.

Gernerally speaking,  Matrix can check network disconnect and send OnClose event.
But, sometimes,  I got the issue as following(2 / 20 failed, easily happened in Win8):

1, No OnError/OnClose event after resume the PC even after network recovered. 

2, I create a timer, and do 1 ping per 12 second, do XMPP ping 10 times in total, to trigger Matrix to check network state asap.
   Matrix looks like can not work successfully, because it can not send message to server, and still no OnClose event.

3,Then wait 20 miniutes, Matrix still no OnClose event. I got timeout error while do sendMessage.

4, To avoid above issue, I do close Matrix while PC entering suspend mode, but Matix can not be closed.
    Repeat close 10 times per 5 second , but Matix can not send OnError/OnClose event.

I am using version 1.4.4.7.  I know it is too old, and I update and try with latest version.
The issue still can be redo.

I am sorry that i can not provide log file. but while issue happend, there is no exception and error.

So, Anyone met this issue before ? Could anybody kindly give me some advice, thanks.
Avatar
Alex #2
Member since Feb 2003 · 4322 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
such issued were not reported yet.

It makes also no sense to call OnClose multiple times. Once is enough.

What you can do as a workaround is set your old XmppClient instance to null and create a complete new one after you machine wakes up hibernate.

To solve such issues I would need a logfile.
Do you hook into the hibernate event from Windows and call the Close() method when it appears?
Avatar
AaronKueng #3
Member since Aug 2014 · 8 posts
Group memberships: Members
Show profile · Link to this post
>>Do you hook into the hibernate event from Windows and call the Close() method when it appears?
Yes, I am using powerModeChanged  callback handle to check enter suspend/Resume or not.
Microsoft.Win32.SystemEvents.PowerModeChanged += new Microsoft.Win32.PowerModeChangedEventHandler(SystemEvents_PowerModeChanged);

Then, I do disconnect while entering suspend mode.
This post was edited on 2014-08-07, 12:00 by AaronKueng.
Avatar
AaronKueng #4
Member since Aug 2014 · 8 posts
Group memberships: Members
Show profile · Link to this post
We can confirm that matrix output nothing after resume.
This post was edited 2 times, last on 2014-08-07, 12:00 by AaronKueng.
Avatar
Alex #5
Member since Feb 2003 · 4322 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
It looks like you are using BOSH.
Are you using the latest build?
I have tested the MiniClient example with BOSH several times. I put my machine in Standby and Hibernate about 30 times. And I never had any issues.

Can you write and attach a test case where we can check your codes and reproduce the problem?
Also can you create an account on your server for us for testing then?

Alex
Avatar
AaronKueng #6
Member since Aug 2014 · 8 posts
Group memberships: Members
Show profile · Link to this post
Thanks for your reply.

Yes, I am using BOSH and got the log using latest version.
I will repro the issue using MiniClient example in my network enviroment.
Please wait my feedback.
Avatar
AaronKueng #7
Member since Aug 2014 · 8 posts
Group memberships: Members
Show profile · Link to this post
I do test with MiniClient, using jabber.ho-chilli.net account and server, and set proxy to access network.
To confirm issue, I add some log code to MiniClient. Some OnError exception happened while do matrix open.
But it looks like OK, because the demo can receive response from the server, and no OnClose following OnError.
So, let's check the result:

First, I try in Win7, please refer to following picture, we could find that matrix send OnClose event after resume.
It is what I expected.
[Image: http://v1.freep.cn/3tb_14080615283151e2512293.png]

and then, I try in Win8, for 3 times.
1, No OnClose event after resume, but I can got OnClose event by pushing [DisConnect] button(Print log " Close matrix" while pushing button).
2, Same as 1.
3, No OnClose event after resume, and pushed [DisConnect] button, but no OnClose event received.
I think it is same as what happend in my application.
[Image: http://v2.freep.cn/3tb_140806152914lodx512293.png]
This post was edited on 2014-08-06, 10:55 by AaronKueng.
Avatar
Alex #8
Member since Feb 2003 · 4322 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
  • are you connecting with BOSH to jabber.ho-chilli.net?
  • If yes, what are the BOSH settings for this server?
  • Which XMPP server software and which version is running on this server?
Avatar
Alex #9
Member since Feb 2003 · 4322 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
In reply to post #7
Quote by AaronKueng:
1, No OnClose event after resume, but I can got OnClose event by pushing [DisConnect] button(Print log " Close matrix" while pushing button).

Your log sais:
Close MatriX
OnClose
OnError
EnterSuspend Mode

There is an OnClose event before your machine enters hibernate. So I don't see where your problem is. You get the OnClose event and, and you should not call Close() again after you got this event and have not opened a new connection.
Avatar
Alex #10
Member since Feb 2003 · 4322 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
If you have a special setup with Proxy or whatever then please create us a test case with credentials to your servers where we can execute the code and check this. Sorry, but otherwise we are not able to debug your issues.
You can send your test cases directly to our support team by email.
Avatar
AaronKueng #11
Member since Aug 2014 · 8 posts
Group memberships: Members
Show profile · Link to this post
Thanks for your reply soon.

>>There is an OnClose event before your machine enters hibernate. So I don't see where your problem is.
About 3 test in Win8,
The OnClose event you said, actually it is because of pushing disconnect button.
It belongs to test 2, but not test 3.
To do test 3, I did matrix connect before enter suspend.
So, the issue still happend I think.

>>If you have a special setup with Proxy or whatever then please create us a test case...
I am not using special network enviroment to do the test I think. I didn't do something special at least.
I repro the issue in three proxy server(two in china, one in Japan).

>>are you connecting with BOSH to jabber.ho-chilli.net?
>>If yes, what are the BOSH settings for this server?
>>Which XMPP server software and which version is running on this server?

I only used jabber.ho-chilli.net to do the demo test today,
because I can not try third part program on team server.
I will send one copy of the MiniClient demo code to your support team by email.
Would you send me your demo with the test sever setting and account? 

More comment:
With the demo, I try 10 times in Win7, but it works OK.
But it doesn't work well in Win8.  No OnClose event after resume 100%.

As I said before, the issue is easily repro in Win8.  You can skip Win7/Vista.
About repro frequency,
Sometimes, I can not repro the issue for 40 ~ 50 test. But sometime, I can repro it for 3-4 times continously.
Avatar
AaronKueng #12
Member since Aug 2014 · 8 posts
Group memberships: Members
Show profile · Link to this post
By the way, could you tell me the support team's mail address ? Thanks.

I will send the demo tomorrow maybe.
Avatar
AaronKueng #13
Member since Aug 2014 · 8 posts
Group memberships: Members
Show profile · Link to this post
Please
This post was edited 2 times, last on 2014-08-07, 13:52 by AaronKueng.
Avatar
Alex #14
Member since Feb 2003 · 4322 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
In reply to post #12
with your license we sent you all the support details. If you have no license yet please use the Contact section on our homepage.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Forum: MatriX RSS