Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

panic: nil pointer of map #12

Closed
bo-er opened this issue May 6, 2022 · 0 comments
Closed

panic: nil pointer of map #12

bo-er opened this issue May 6, 2022 · 0 comments

Comments

@bo-er
Copy link

bo-er commented May 6, 2022

Here is the error message, it seems that line 84: stream.MetaHeaders[key] = value is the root casue.

[root@udp1 ~]# ./main -p 5700 -proto-path /root -proto-files ucore.proto
INFO[0000] Starting sniff ethernet packets at interface eth0 on port 5700
panic: assignment to entry in nil map

goroutine 52 [running]:
github.com/rmedvedev/grpcdump/internal/app/framereader.(*FrameReader).Read(0xc00011cef0, 0xc00012a080)
	/root/grpcdump/internal/app/framereader/framereader.go:84 +0x62d
github.com/rmedvedev/grpcdump/internal/app/httpparser.tryReadHttp2(0xc00012a080?, {0xc00011cdb0?, 0x4?}, 0x18614ac?, 0x0?)
	/root/grpcdump/internal/app/httpparser/httpparser.go:148 +0x86
github.com/rmedvedev/grpcdump/internal/app/httpparser.(*httpStream).run(0xc000112180)
	/root/grpcdump/internal/app/httpparser/httpparser.go:201 +0x81b
created by github.com/rmedvedev/grpcdump/internal/app/httpparser.(*httpStreamFactory).New
	/root/grpcdump/internal/app/httpparser/httpparser.go:60 +0x22a

So I'm about to fix it.

rmedvedev added a commit that referenced this issue May 13, 2022
close #12;fix nil pointer to nil map
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant