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

Crash when attaching "gumbleutil.AutoBitrate" #19

Closed
jcdesimp opened this issue Feb 13, 2016 · 3 comments
Closed

Crash when attaching "gumbleutil.AutoBitrate" #19

jcdesimp opened this issue Feb 13, 2016 · 3 comments
Labels

Comments

@jcdesimp
Copy link

I get the following errors and a crash if I attempt to connect mumble to a server after attaching the gumbleutil.AutoBitrate to the client:

panic: runtime error: integer divide by zero
[signal 0x8 code=0x7 addr=0x40c7c5d pc=0x40c7c5d]

goroutine 5 [running]:
github.com/layeh/gumble/gumbleutil.glob.func1(0xc82011ea80)
    /Users/jcdesimp/dev/go/src/github.com/layeh/gumble/gumbleutil/bitrate.go:14 +0x2d
github.com/layeh/gumble/gumbleutil.Listener.OnConnect(0x43fcdd0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
    /Users/jcdesimp/dev/go/src/github.com/layeh/gumble/gumbleutil/listener.go:26 +0x30
github.com/layeh/gumble/gumbleutil.(*Listener).OnConnect(0x4515b00, 0xc82011ea80)
    <autogenerated>:1 +0xa0
github.com/layeh/gumble/gumble.(*eventMultiplexer).OnConnect(0xc8200c0018, 0xc82011ea80)
    /Users/jcdesimp/dev/go/src/github.com/layeh/gumble/gumble/eventmultiplexer.go:55 +0xcc
github.com/layeh/gumble/gumble.(*Client).handleServerSync(0xc8200c0000, 0xc820135560, 0x11c, 0x11c, 0x0, 0x0)
    /Users/jcdesimp/dev/go/src/github.com/layeh/gumble/gumble/handlers.go:243 +0x2c5
github.com/layeh/gumble/gumble.(*Client).readRoutine(0xc8200c0000)
    /Users/jcdesimp/dev/go/src/github.com/layeh/gumble/gumble/client.go:233 +0x3e2
created by github.com/layeh/gumble/gumble.(*Client).Connect
    /Users/jcdesimp/dev/go/src/github.com/layeh/gumble/gumble/client.go:146 +0x725

goroutine 1 [chan receive]:
main.main()

...

goroutine 17 [syscall, locked to thread]:
runtime.goexit()
    /usr/local/go/src/runtime/asm_amd64.s:1721 +0x1

goroutine 6 [select]:
github.com/layeh/gumble/gumble.(*Client).pingRoutine(0xc8200c0000)
    /Users/jcdesimp/dev/go/src/github.com/layeh/gumble/gumble/client.go:210 +0x2b4
created by github.com/layeh/gumble/gumble.(*Client).Connect
    /Users/jcdesimp/dev/go/src/github.com/layeh/gumble/gumble/client.go:147 +0x74a
exit status 2

Any particular caveats I should know about regarding setting the AutoBitrate that I may have fallen into here?

client.Attach(gumbleutil.AutoBitrate) is being called before client.Connect()

The crash does not happen if I remove client.Attach(gumbleutil.AutoBitrate)

Thanks!

@ghost
Copy link

ghost commented Feb 13, 2016

In order to use gumbleutil.AutoBitrate, there are certain Config fields that must be set. You can either set these yourself, or use the gumble.NewConfig, which initializes these values for you.

@jcdesimp
Copy link
Author

@bontibon ah ok, switched to using gumble.NewConfig() and it works. What were the config values that needed to be set?

@ghost
Copy link

ghost commented Feb 14, 2016

Config.AudioInterval

@ghost ghost closed this as completed Feb 14, 2016
@ghost ghost added the question label Feb 14, 2016
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

1 participant