Skip to content

NPE in WebSocket client subscriptions #3093

@cthulhu-rider

Description

@cthulhu-rider

caught suddenly while debugging nspcc-dev/neofs-node#2444, don’t have a special context. I subscribe to new blocks and notary requests

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

goroutine 14 [running]:
github.com/nspcc-dev/neo-go/pkg/rpcclient.(*WSClient).notifySubscribers(0xc000224480, {0x16?, {0xa11180?, 0xc000283ea0?}})
	/home/ll/go/pkg/mod/github.com/nspcc-dev/neo-go@v0.101.1/pkg/rpcclient/wsclient.go:599 +0x299
github.com/nspcc-dev/neo-go/pkg/rpcclient.(*WSClient).wsReader(0xc000224480)
	/home/ll/go/pkg/mod/github.com/nspcc-dev/neo-go@v0.101.1/pkg/rpcclient/wsclient.go:513 +0x545
created by github.com/nspcc-dev/neo-go/pkg/rpcclient.NewWS
	/home/ll/go/pkg/mod/github.com/nspcc-dev/neo-go@v0.101.1/pkg/rpcclient/wsclient.go:422 +0x638

may be i violated some strict requirement on my side, but didn't find it after a quick look

Metadata

Metadata

Assignees

Labels

I4No visible changesS4RoutineU1Critically important to resolve quicklybugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions