Not logged in. · Lost password · Register
Forum: MatriX RSS
Avatar
cvoluter #1
Member since Jan 2015 · 14 posts
Group memberships: Members
Show profile · Link to this post
Subject: System.IndexOutOfRangeException after reconnection attempt (Matrix 2.0)
Hello,

If i disconnect a XmppClient and attemp to reconnect, a System.IndexOutOfRangeException thrown.

Please follow exception details :

Interception de System.IndexOutOfRangeException
  HResult=-2146233080
  Message=L'index se trouve en dehors des limites du tableau.
  Source=Matrix
  StackTrace:
       à #=qDS26H8M_O_OijsIwfXmuczJl1oF_8PIzIkZphUpD_KE=.#=qeEYfPL1772bHH$8bBOZQiPaEebyjbUMWAtZAkoRmaQw=[T](T #=qtnPzF$MzL57OGwXlEq3v4IjSsfrXB3UeJxcZPP$TIFI=)
       à #=qDS26H8M_O_OijsIwfXmuczJl1oF_8PIzIkZphUpD_KE=.#=qNdEvQ3xOM0SrdEd8K$0EKg==(#=qzB6gSzP8KEAdXvra2LZoLQ== #=qRiJ4847sPtQFhb41GJPN3Q==)
       à Matrix.XmppStream.Open()
       à Matrix.Xmpp.Client.XmppClient.Open()
       à XMPP_POC_Phase3.Product.Scenario1.OnIq(Object sender, IqEventArgs e) dans d:\test\test1.cs:ligne 332
  InnerException:
Avatar
Alex #2
Member since Feb 2003 · 4328 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Can you please post the stanza which is causing the exception?
It should be a stanza which contains an <error/> tag

Alex
Avatar
Alex #3
Member since Feb 2003 · 4328 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
not sure if its caused by the Xml. Can you please let us know how we can cause this exception? Or attach a small test app?

Thanks
Avatar
cvoluter #4
Member since Jan 2015 · 14 posts
Group memberships: Members
Show profile · Link to this post
Hello,

Please find into zip file a solution that produce exception.

Globally, exception has been thrown when i trying a connection from server after Xmpp Client.close() disconnection.

Regards,
The author has attached one file to this post:
Test_2015-07-23 11-31-43Z.zip 4.2 kBytes
You have no permission to open this file.
Avatar
Alex #5
Member since Feb 2003 · 4328 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Can you update to MatriX 2.0.0.4 from NuGet?
You should not get this exception there anymore, instead you get the OnError in MatriX.

You code tried to open the connection before the old connection was properly closed.

When you close a connection you should wait until you get the OnClose event before you reopen it. If you don't want to wait for some reason then just create a complete new XmppClient object.

Alex
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