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

ServiceProcessor.RegisterHandler & ServiceProcessor.RegisterStreamingHandler fail for function with unscoped type of request #667

Open
tharvik opened this issue Dec 14, 2020 · 0 comments

Comments

@tharvik
Copy link
Contributor

tharvik commented Dec 14, 2020

When register a handler with an unscoped (ie, not existing at the root of a package, such as struct{} used directly), it fails with the following.

RegisterHandler(func (struct{}) (struct{}, error))
panic: runtime error: index out of range [1] with length 1 [recovered]
	panic: runtime error: index out of range [1] with length 1
[...]
panic(0xa27f60, 0xc00009a000)
	/usr/lib/go/src/runtime/panic.go:969 +0x1b9
go.dedis.ch/onet/v3.(*ServiceProcessor).RegisterStreamingHandler(0xc00013bcb8, 0x9c89c0, 0xaa0718, 0x0, 0x0)
	/home/tharvik/c4dt/onet/processor.go:129 +0xa92
go.dedis.ch/onet/v3.(*ServiceProcessor).RegisterStreamingHandlers(0xc00013bcb8, 0xc00013bd08, 0x3, 0x3, 0xc0000686e0, 0xc000056cd4)
	/home/tharvik/c4dt/onet/processor.go:384 +0x6c
[...]

You can see some tests triggering it in #666.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant