Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Avatar
javad@valentiatech.com #1
Member since Sep 2015 · 1 post
Group memberships: Members, Premium
Show profile · Link to this post
Subject: Getting Exception and Get Disconnected
Hi,

Our application make connection with openfire server through MatriX SDK. Things seem fine but yesterday evening we get following exception and get disconnected. your prompt response will be appreciated.


Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Reflection.TargetInvocationException
Stack:
   at System.RuntimeMethodHandle.InvokeMethod(System.Object, System.Object[], System.Signature, Boolean)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(System.Object, System.Object[], System.Object[])
   at System.Reflection.RuntimeMethodInfo.UnsafeInvoke(System.Object, System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo)
   at System.Delegate.DynamicInvokeImpl(System.Object[])
   at Matrix.XmppStream.#=qYKHI5HVjz6SCA78JCrF21Q==(System.Delegate, System.Object[])
   at Matrix.XmppStream.#=qy5qtCq80DI6jN9ohvGJEpw==(System.Delegate, System.Object, Matrix.EventArgs)
   at Matrix.XmppStream.FireOnClose()
   at Matrix.XmppStream.CleanupSession()
   at Matrix.Xmpp.Client.XmppClient.CleanupSession()
   at Matrix.XmppStream.????? ?? ????? ?(System.Object, Matrix.EventArgs)
   at Matrix.Net.BaseSocket.FireOnDisconnect()
   at Matrix.Net.ClientSocket.Disconnect()
   at Matrix.Net.ClientSocket.EndReceive(System.IAsyncResult)
   at System.Net.LazyAsyncResult.Complete(IntPtr)
   at System.Net.LazyAsyncResult.ProtectedInvokeCallback(System.Object, IntPtr)
   at System.Net.FixedSizeReader.ReadCallback(System.IAsyncResult)
   at System.Net.LazyAsyncResult.Complete(IntPtr)
   at System.Net.ContextAwareResult.CompleteCallback(System.Object)
   at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
   at System.Net.ContextAwareResult.Complete(IntPtr)
   at System.Net.LazyAsyncResult.ProtectedInvokeCallback(System.Object, IntPtr)
   at System.Net.Sockets.BaseOverlappedAsyncResult.CompletionPortCallback(UInt32, UInt32, System.Threading.NativeOverlapped*)
   at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32, UInt32, System.Threading.NativeOverlapped*)
Thanks,
Yusuf Usmani
This post was edited on 2015-09-17, 12:43 by Alex.
Avatar
Alex #2
Member since Feb 2003 · 4327 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
as you can see there is a System.Reflection.TargetInvocationException

Usually you get such exceptions when your IO code is not thread safe. According to your stacktrace it may come from the OnClose event.

I suggest to add try/catch to your code in the MatriX event handlers, then you will see which of your code results in this exception.

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: agsXMPP RSS