random panic
Open
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
- 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
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