ebiten: panic while accessing gamepadButtonDurations
The following error occurs when running a blank application (nothing drawn/updated) on the latest master (likely caused by c95049b).
panic: runtime error: index out of range [32] with length 32
goroutine 5 [running]:
github.com/hajimehoshi/ebiten/inpututil.(*inputState).update(0xb50f20)
/home/trevor/go/pkg/mod/github.com/hajimehoshi/ebiten@v1.12.0-alpha.1.0.20200526145011-f80719ef9a08/inpututil/inpututil.go:122 +0xdc6
github.com/hajimehoshi/ebiten/inpututil.init.0.func1(0x0, 0x0)
/home/trevor/go/pkg/mod/github.com/hajimehoshi/ebiten@v1.12.0-alpha.1.0.20200526145011-f80719ef9a08/inpututil/inpututil.go:64 +0x2d
github.com/hajimehoshi/ebiten/internal/hooks.RunBeforeUpdateHooks(0x0, 0x0)
/home/trevor/go/pkg/mod/github.com/hajimehoshi/ebiten@v1.12.0-alpha.1.0.20200526145011-f80719ef9a08/internal/hooks/hooks.go:38 +0xb8
github.com/hajimehoshi/ebiten.(*uiContext).update(0xb50d20, 0x0, 0x0)
/home/trevor/go/pkg/mod/github.com/hajimehoshi/ebiten@v1.12.0-alpha.1.0.20200526145011-f80719ef9a08/uicontext.go:287 +0xe7
github.com/hajimehoshi/ebiten.(*uiContext).Update(0xb50d20, 0xc00005de10, 0x8d0000)
/home/trevor/go/pkg/mod/github.com/hajimehoshi/ebiten@v1.12.0-alpha.1.0.20200526145011-f80719ef9a08/uicontext.go:241 +0xaa
github.com/hajimehoshi/ebiten/internal/uidriver/glfw.(*UserInterface).update(0xb132e0, 0x20001, 0x1)
/home/trevor/go/pkg/mod/github.com/hajimehoshi/ebiten@v1.12.0-alpha.1.0.20200526145011-f80719ef9a08/internal/uidriver/glfw/ui.go:816 +0x266
github.com/hajimehoshi/ebiten/internal/uidriver/glfw.(*UserInterface).loop(0xb132e0, 0x0, 0x0)
/home/trevor/go/pkg/mod/github.com/hajimehoshi/ebiten@v1.12.0-alpha.1.0.20200526145011-f80719ef9a08/internal/uidriver/glfw/ui.go:862 +0xcb
github.com/hajimehoshi/ebiten/internal/uidriver/glfw.(*UserInterface).run(0xb132e0, 0x0, 0x0)
/home/trevor/go/pkg/mod/github.com/hajimehoshi/ebiten@v1.12.0-alpha.1.0.20200526145011-f80719ef9a08/internal/uidriver/glfw/ui.go:731 +0x2e4
github.com/hajimehoshi/ebiten/internal/uidriver/glfw.(*UserInterface).Run.func1(0xc000098410, 0xc0000b4180, 0xb132e0)
/home/trevor/go/pkg/mod/github.com/hajimehoshi/ebiten@v1.12.0-alpha.1.0.20200526145011-f80719ef9a08/internal/uidriver/glfw/ui.go:568 +0x6b
created by github.com/hajimehoshi/ebiten/internal/uidriver/glfw.(*UserInterface).Run
/home/trevor/go/pkg/mod/github.com/hajimehoshi/ebiten@v1.12.0-alpha.1.0.20200526145011-f80719ef9a08/internal/uidriver/glfw/ui.go:565 +0x17b
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 25 (22 by maintainers)
Commits related to this issue
- uidriver/glfw: Bug fix: Skip some special 'joysticks' Apparently, there are some special devices that are recognized as joysticks by GLFW, even though they are not. Such devices can have too many 'bu... — committed to hajimehoshi/ebiten by hajimehoshi 4 years ago
- internal/gamepad: skip gamepads with more than 32 buttons This change was removed at ef450580370cdf84f8795181d6898cfbaebae6e2 accidentally. Updates #1173 Updates #2039 — committed to hajimehoshi/ebiten by hajimehoshi 2 years ago
Sorry for the noise, I have found that this panic was my fault and not ebiten’s. (I initialized two games)