System.NullReferenceException When calling Stop()
See original GitHub issueOperating system and version: Windows 10 x64 Framework and runtime: .NET Framework 4.7.2 Issue encountered: System.NullReferenceException when Stopping a server. Expected behavior: The server should stop without errors. Steps to reproduce: Instantiate a tcp server, and then call Stop() Sample code encapsulating the problem:
WatsonTcpServer tcpServer = new WatsonTcpServer(ip, port);
[...]
tcpServer.Start();
[...]
tcpServer.Stop(); <---------
Exception details: System.NullReferenceException
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:10 (7 by maintainers)
Top Results From Across the Web
c# - What is a NullReferenceException, and how do I fix it?
This means the reference is null , and you cannot access members (such as methods) through a null reference. The simplest case: string...
Read more >How can I fix the error: System.NullReferenceException
A NullReferenceException exception is thrown when you try to access a member on a type whose value is null. A NullReferenceException exception ......
Read more >NullReferenceException Class (System)
To address this problem, instantiate the object so that its value is no longer null . The following example does this by calling...
Read more >Object Reference Not Set to an Instance of an Object
The following code will throw a NullReferenceException if the variable “text” being passed in is null. You can't call ToUpper() on a null...
Read more >Debugging System.NullReferenceException - elmah.io Blog
The exception happens when you try to invoke a reference that you were expecting to point to an object but in fact, points...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ll try testing it outside the form and I’ll catch to you! Maybe de garbage collector is doing weird things
Got it. Thanks for the update @Tilation
If you have any interested, I published an updated version today that caused a NullReferenceException in
Stop()
(I’m doing a total facepalm on it; I had misplaced a?
on a logging statement).Closing this out.