MemeLabs / MemeLabs/dggchat

random panic

Open
#7 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
4
Forks
5
PR merge metrics
No merged PRs in 30d

Description

I sometimes get this when trying to connect.
seems to happen randomly, I don't change anything.

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x70 pc=0x228b60]

goroutine 28 [running]:
github.com/gorilla/websocket.(*Conn).NextReader(0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
        /home/pi/go/pkg/mod/github.com/gorilla/websocket@v1.4.0/conn.go:938 +0x14
github.com/gorilla/websocket.(*Conn).ReadMessage(0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
        /home/pi/go/pkg/mod/github.com/gorilla/websocket@v1.4.0/conn.go:1028 +0x1c
github.com/Memelabs/dggchat.(*Session).listen(0x20824d0)
        /home/pi/go/pkg/mod/github.com/!memelabs/dggchat@v0.0.0-20171209033102-97642b4d160e/session.go:164 +0x24
created by github.com/Memelabs/dggchat.(*Session).open
        /home/pi/go/pkg/mod/github.com/!memelabs/dggchat@v0.0.0-20171209033102-97642b4d160e/session.go:115 +0xfc

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The stack trace points to session.go in Session.listen and Session.open, with the nil value reaching gorilla/websocket ReadMessage. Read those entry points first and trace how the connection is assigned during connection attempts. Done means identifying and resolving the nil connection path so repeated connection attempts no longer produce this panic.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
networking
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.