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? #17

Closed
duysqubix opened this issue Oct 10, 2023 · 1 comment
Closed

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

duysqubix opened this issue Oct 10, 2023 · 1 comment
Labels
bug Something isn't working wontfix This will not be worked on

Comments

@duysqubix
Copy link
Contributor

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

Original issue: faiface/beep#155

@MarkKremer
Copy link
Contributor

I prefer to fix the cause of the panic. In this case it seems like a problem in the resampler. Closing in favor of #20.

@MarkKremer MarkKremer closed this as not planned Won't fix, can't repro, duplicate, stale Oct 11, 2023
@MarkKremer MarkKremer added bug Something isn't working wontfix This will not be worked on labels Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants