happy9335 / jabber-net

Automatically exported from code.google.com/p/jabber-net
Other
0 stars 0 forks source link

m_stanzas NullReferenceException #63

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. tons of use.

What is the expected output? What do you see instead?
expect no crash, got crash

What version of the product are you using? On what operating system?
2.1.0.710

Please provide any additional information below.
This may already be fixed (i don't have svn) but in XmppStream.cs,
m_stanzas should be checked for null before attempting to write.  once in a
while it will throw a nullreferenceexception. 

Original issue reported on code.google.com by duffy.a...@gmail.com on 23 Mar 2009 at 10:48

GoogleCodeExporter commented 9 years ago
See also Issue 74 (http://code.google.com/p/jabber-net/issues/detail?id=74)

Original comment by jdmw...@gmail.com on 12 Jun 2009 at 9:37

GoogleCodeExporter commented 9 years ago
I had the same problem ( NullEx at XmppStream.SendNewStreamHeader ) but was not 
able
to reproduce the crash. But it turned out, I can reproduce the bug 100% now. I 
just
have to force my DSL router to reconnect. Next time jabber.net tries to ping the
server, the Exception pops up.

Original comment by omas.h...@gmail.com on 22 Jan 2010 at 10:41

GoogleCodeExporter commented 9 years ago
The line it crashes for me is:
      m_stanzas.WriteStartTag(str)

The stack trace is:

Object reference not set to an instance of an object.
   at jabber.connection.XmppStream.SendNewStreamHeader() in C:\Projects\JabberNet-2.1.0.710\jabber\connection\XmppStream.cs: line 1438
   at jabber.connection.XmppStream.jabber.connection.IStanzaEventListener.Connected() in C:\Projects\JabberNet-2.1.0.710\jabber\connection\XmppStream.cs: line 1589
   at jabber.connection.SocketStanzaStream.bedrock.net.ISocketEventListener.OnConnect(BaseSocket sock) in C:\Projects\JabberNet-2.1.0.710\jabber\connection\SocketStanzaStream.cs: line 396
   at bedrock.net.AsyncSocket.ExecuteConnect(IAsyncResult ar) in C:\Projects\JabberNet-2.1.0.710\bedrock\net\AsyncSocket.cs: line 821
   at System.Net.LazyAsyncResult.Complete(IntPtr userToken)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Net.ContextAwareResult.Complete(IntPtr userToken)
   at System.Net.Sockets.BaseOverlappedAsyncResult.CompletionPortCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)
   at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)

Original comment by greg.bra...@ensigne.com on 26 Mar 2013 at 11:30