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

Calling net.Record.PrevID() crashes when the client is closing #517

Open
merlinran opened this issue May 20, 2021 · 2 comments
Open

Calling net.Record.PrevID() crashes when the client is closing #517

merlinran opened this issue May 20, 2021 · 2 comments

Comments

@merlinran
Copy link
Contributor

Same for other methods I believe. Caught this because I mistakenly closed the client while processing records in another goroutine.

Error getting record: rpc error: code = Unavailable desc = transport is closing
...
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x48 pc=0x1fe57cd]
...

It isn't necessarily a bug, but it would be better if the panic reveals the root problem more apparently. For example, we could have a null object which panics more soundly before the record is loaded.

@sanderpick
Copy link
Member

Is that due to net.Record.obj being nil? Seems odd that it's related to the client closing, but likely I'm missing a connection here.

@merlinran
Copy link
Contributor Author

Maybe not nil because addr is not zero. It stops complaining once I remove the line to close the client.

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

2 participants