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

speaker.Init function shoud add recover to deal panic? #155

Open
ttmars opened this issue Sep 18, 2022 · 0 comments
Open

speaker.Init function shoud add recover to deal panic? #155

ttmars opened this issue Sep 18, 2022 · 0 comments

Comments

@ttmars
Copy link

ttmars commented Sep 18, 2022

go func() {
	for {
		select {
		default:
			update()
		case <-done:
			return
		}
	}
}()

panic: runtime error: index out of range [-111848]

goroutine 155 [running]:
github.com/faiface/beep.(*Resampler).Stream(0xc00084d880, {0xc00083e000?, 0x67?, 0xc0000c9ee0?})
C:/Users/Ares/go/pkg/mod/github.com/faiface/beep@v1.1.0/resample.go:96 +0x3d3
github.com/faiface/beep.(*Ctrl).Stream(0x1000000000067?, {0xc00083e000?, 0xc00047dcd8?, 0x1010000000000?})
C:/Users/Ares/go/pkg/mod/github.com/faiface/beep@v1.1.0/ctrl.go:43 +0x65
github.com/faiface/beep.Seq.func1({0xc00083e000?, 0x7ff76a618320?, 0x7ff769398701?})
C:/Users/Ares/go/pkg/mod/github.com/faiface/beep@v1.1.0/compositors.go:86 +0xb4
github.com/faiface/beep.StreamerFunc.Stream(0x44e8?, {0xc00083e000?, 0xc0000c9f80?, 0x7ff76972a996?})
C:/Users/Ares/go/pkg/mod/github.com/faiface/beep@v1.1.0/interface.go:100 +0x2a
github.com/faiface/beep.(*Mixer).Stream(0x7ff76aa36d80, {0xc002310000, 0x113a, 0x113a})
C:/Users/Ares/go/pkg/mod/github.com/faiface/beep@v1.1.0/mixer.go:42 +0x194
github.com/faiface/beep/speaker.update()
C:/Users/Ares/go/pkg/mod/github.com/faiface/beep@v1.1.0/speaker/speaker.go:109 +0x65
github.com/faiface/beep/speaker.Init.func1()
C:/Users/Ares/go/pkg/mod/github.com/faiface/beep@v1.1.0/speaker/speaker.go:52 +0x1b
created by github.com/faiface/beep/speaker.Init
C:/Users/Ares/go/pkg/mod/github.com/faiface/beep@v1.1.0/speaker/speaker.go:48 +0x1e9

Process finished with the exit code 2

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