question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

System.NullReferenceException When calling Stop()

See original GitHub issue

Operating 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 image

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:10 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
Tilationcommented, Oct 15, 2020

I’ll try testing it outside the form and I’ll catch to you! Maybe de garbage collector is doing weird things

0reactions
jchristncommented, Oct 21, 2020

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found