MirrorNetworking / MirrorNetworking/Telepathy
Rare NRE on Telepathy.Server.GetClientAddress()
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 1.2k
- Forks
- 141
- PR merge metrics
- No merged PRs in 30d
Description
I apologize for being rather light on information, this issue crops up extremely rarely for us in production. It appears as if something is causing a null reference exception on connection events line 326 in Server.cs. My server is containerized and runs in Azure's cloud, but I don't have a lot of excellent infrastructure for tracking these sorts of issues. All I have is a stack trace from the event:
System.NullReferenceException: Object reference not set to an instance of an object.
at Telepathy.Server.GetClientAddress(Int32 connectionId) in /home/runner/work/ISG-Master/ISG-Master/Telepathy/Server.cs:line 326
at <my code>.HandleConnectedEvent(Int32 connectionId) in <my code>/TelepathyServerSocket.cs:line 108
at Telepathy.Server.Tick(Int32 processLimit, Func_1 checkEnabled) in /home/runner/work/ISG-Master/ISG-Master/Telepathy/Server.cs:line 378
at <my code>.Poll() in <my code>/TelepathyServerSocket.cs:line 67
at <my code>.RunAsync() in <my code>/NetworkManager.cs:line 86
at Program.<Main>$(String[] args) in <my code>/Program.cs:line 48
I don't quite know what's causing the NRE, but might propose that the line is rewritten with fewer chained method calls to make it more obvious in the future? I'll submit a PR for it, but if it's obvious to the author what the cause is, great. :)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in Telepathy/Server.cs at line 326 and trace GetClientAddress through the connection event path shown in the stack trace, including Tick at line 378. Determine which reference can be null during the rare production connection lifecycle, then validate the handling with focused coverage or reproduction. Done means the NRE cause is addressed and the connection event path remains safe.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100