Not logged in. · Lost password · Register
Forum: MatriX and XmppDotNet RSS
Avatar
Marco_Vank #1
Member since Aug 2015 · 8 posts
Group memberships: Members
Show profile · Link to this post
Subject: NullRefException during connect
Hello,

In our application we have 2 Xmpp clients who simultaneously connect to 2 different Openfire servers.
I'm not sure if the 2 instances connecting at the same time results in some multi threading issue, but during this connecting we often see the following exception.
Should we be able to execute this scenario or do we have to change our code that we don't connect bot clients at the same time?

System.NullReferenceException: Object reference not set to an instance of an object.
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at Matrix.Util.Enum.GetValues[T]()
   at Matrix.Xmpp.Sasl.Mechanism.GetSaslMechanism(String mechanism)
   at Matrix.Xmpp.Sasl.Mechanisms.<>c__DisplayClass1.<SupportsMechanism>b__0(Mechanism mech)
   at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source, Func`2 predicate)
   at Matrix.SaslHandler.SelectSaslMechanism(Mechanisms mechanisms)
   at Matrix.SaslHandler.StartSasl(StreamFeatures features)
   at Matrix.Xml.XmppStreamParser.DoRaiseOnStreamElement(XmppXElement el)
This post was edited on 2015-11-16, 19:24 by Alex.
Avatar
Alex #2
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
we have found an threading issue in a new internal caching routine.
Can you please upgrade to 2.0.0.12 and let us know if this fixed your problems?

Thanks,
Alex
Avatar
Marco_Vank #3
Member since Aug 2015 · 8 posts
Group memberships: Members
Show profile · Link to this post
We've been running this version for a day now, with a couple of times connecting.
I haven't seen the issue anymore so far.
Avatar
Alex #4
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
thanks for your feedback.
I am pretty sure that this build solves your problem. There was a not thread safe global collection before which caused your problem.

Thanks,
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: