glfw
glfw copied to clipboard
Error with HORIPAD mini4
When I call glfw.Init
with a Hori PS4 Mini I get this error.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000000d0f0000ee00000000000000 (HORIPAD mini4)
GLFW: Please report this bug in the Go package immediately.
The issue is either in the upstream GLFW C library (which use a different issue tracker, https://github.com/glfw/glfw/issues), or in this Go binding for it.
In order to fix it, we need to identify where the problem is. I doubt many people have the same hardware, so it's likely you're the only person who can reproduce it.
Can you try using the latest GLFW C library release, or master version, and see if it happens with it too? If so, you should report the issue in the https://github.com/glfw/glfw/issues issue tracker. Otherwise, post the C and Go programs so we can try to find out what might be different.
My reading of this is that we're coming through the default select case here:
https://github.com/go-gl/glfw/blob/e5ec43523f6ff18bd5fc260244ea6ff9d5d6bc96/v3.3/glfw/error.go#L111-L124
If so that seems a bit surprising as it would imply that two errors have been fed into the pipe (and we're seeing the second of them?).
@Windblade-GR01:
- What is the minimal procedure to reproduce? Do I need to plug in a Hori PS4? Do I need to do anything other than call glfw.Init? Is there any other setup required?
- Please can you try instrumenting the following line of code to print every error you see, and report back?
https://github.com/go-gl/glfw/blob/e5ec43523f6ff18bd5fc260244ea6ff9d5d6bc96/v3.3/glfw/error.go#L117
Hello, I'm getting the same error with Ebiten and an 8BitDo SF30 Pro gamepad on Linux (Solus OS).
solarlune@solarlune ~/Documents/Projects/Go/LDJam46 $ go run ./test
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 050000005e040000e002000003090000 (Xbox One Wireless Controller)
GLFW: Please report this bug in the Go package immediately.
...
...
...
panic: InvalidValue: Invalid button in gamepad mapping 050000005e040000e002000003090000 (Xbox One Wireless Controller)
goroutine 1 [running]:
github.com/go-gl/glfw/v3.3/glfw.acceptError(0xc00014de58, 0x1, 0x1, 0xc000159410, 0xc00000e160)
/home/solarlune/go/pkg/mod/github.com/go-gl/glfw/v3.3/[email protected]/error.go:174 +0x216
github.com/go-gl/glfw/v3.3/glfw.Init(0x55176dd2, 0xbefbdaa537231e59)
/home/solarlune/go/pkg/mod/github.com/go-gl/glfw/v3.3/[email protected]/glfw.go:37 +0x54
github.com/hajimehoshi/ebiten/internal/glfw.Init(...)
/home/solarlune/go/pkg/mod/github.com/hajimehoshi/[email protected]/internal/glfw/glfw_notwindows.go:291
github.com/hajimehoshi/ebiten/internal/uidriver/glfw.initialize(0xc000024450, 0xc000024420)
/home/solarlune/go/pkg/mod/github.com/hajimehoshi/[email protected]/internal/uidriver/glfw/ui.go:125 +0x26
github.com/hajimehoshi/ebiten/internal/uidriver/glfw.init.1()
/home/solarlune/go/pkg/mod/github.com/hajimehoshi/[email protected]/internal/uidriver/glfw/ui.go:115 +0x22
exit status 2
Worth noting is that the controller identifies as an Xbox One Wireless Controller in Antimicro and in the terminal output. This issue does not happen with an iPega 9118 (golden d-pad Xbox-style) mobile controller connected to my computer over Bluetooth, or to a PXN 9607S (Switch Pro Controller, also works wired through USB). The iPega is reported as just a "PG-9118" through Antimicro, and the PXN is reported as being an "X360 Controller".
Here's a minimal reproduction main.go using Ebiten:
package main
import (
"github.com/hajimehoshi/ebiten"
)
type Game struct{}
func (game *Game) Update(screen *ebiten.Image) error {
return nil
}
func (game *Game) Layout(w, h int) (int, int) {
return 320, 240
}
func main() {
ebiten.RunGame(&Game{})
}
The problem happens when "plugging in" (connecting) my 8BitDo controller, regardless of when (while the application is running, or beforehand). The problem persists until I power down the controller and my system stops recognizing it; after that, the program can run normally. I'm wondering if it's something like the controllers have one extra button that isn't there in the default mapping or something...?
Any ideas?
EDIT: More interesting information - the crash DOESN'T happen with the 8BitDo controller if I connect it via USB; then it identifies as an "X360 Controller". It only happens if connecting wirelessly.
seems related to #292