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

Immediate crash when running gamepad example locally #1229

Closed
semilin opened this issue Jul 2, 2020 · 38 comments
Closed

Immediate crash when running gamepad example locally #1229

semilin opened this issue Jul 2, 2020 · 38 comments

Comments

@semilin
Copy link

semilin commented Jul 2, 2020

I'm running Void Linux. I copied the code for the gamepad example and removed the // +build example jsgo. It compiles, but upon running it immediately crashes.

Error Log

GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
panic: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)

goroutine 1 [running]:
github.com/go-gl/glfw/v3.3/glfw.acceptError(0xc00015de58, 0x1, 0x1, 0xc00016a120, 0xc00000e160)
	/home/semi/go/src/github.com/go-gl/glfw/v3.3/glfw/error.go:174 +0x216
github.com/go-gl/glfw/v3.3/glfw.Init(0xddf27cfb, 0xb94fc6b71120b9e0)
	/home/semi/go/src/github.com/go-gl/glfw/v3.3/glfw/glfw.go:37 +0x54
github.com/hajimehoshi/ebiten/internal/glfw.Init(...)
	/home/semi/go/src/github.com/hajimehoshi/ebiten/internal/glfw/glfw_notwindows.go:291
github.com/hajimehoshi/ebiten/internal/uidriver/glfw.initialize(0xc0001005a0, 0xc000100570)
	/home/semi/go/src/github.com/hajimehoshi/ebiten/internal/uidriver/glfw/ui.go:129 +0x26
github.com/hajimehoshi/ebiten/internal/uidriver/glfw.init.1()
	/home/semi/go/src/github.com/hajimehoshi/ebiten/internal/uidriver/glfw/ui.go:119 +0x22
@hajimehoshi hajimehoshi added the bug label Jul 2, 2020
@hajimehoshi
Copy link
Owner

Hi,

Are you using a PS4 controller?

@hajimehoshi
Copy link
Owner

Unfortunately this seems an issue in GLFW, not Ebiten.

@semilin
Copy link
Author

semilin commented Jul 2, 2020

Yeah I am using a PS4 controller. Thanks for the info, I'll make the issue there.

@hajimehoshi
Copy link
Owner

Thanks! It'd be the best if you could reproduce the issue with GLFW without Ebiten, since the GLFW team doesn't know anything about Ebiten.

@semilin
Copy link
Author

semilin commented Jul 2, 2020

Sounds good.

@hajimehoshi
Copy link
Owner

This might be already fixed after d08f57e, but I am not sure.

@semilin
Copy link
Author

semilin commented Jul 5, 2020

At least for me, the error still occurs. In addition, I noticed that my trackpad will be recognized as a controller, which is pretty weird and might be attached to the error.

@hajimehoshi
Copy link
Owner

Acknowledged. I still think this is an issue in GLFW, unfortunately.

@hajimehoshi
Copy link
Owner

To solve this issue completely, I'd need to remove the dependency on GLFW, maybe :-/

@SolarLune
Copy link
Contributor

SolarLune commented Jan 12, 2021

Hmm, I'm running into this problem as well when attempting to run my own project with my controller (8BitDo's SN30 Pro+). Oddly, the mapping (050000005e040000e002000003090000) does seem to exist in the mappings.h file, so it should be found in the controller database...?

@hajimehoshi
Copy link
Owner

What kind of error messages did you see?

@SolarLune
Copy link
Contributor

SolarLune commented Jan 13, 2021

Pretty similar to @semilin's:

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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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(0xc0000f3e58, 0x1, 0x1, 0xc000112360, 0xc0000a81c0)
        /home/solarlune/go/pkg/mod/github.com/go-gl/glfw/v3.3/glfw@v0.0.0-20201108214237-06ea97f0c265/error.go:174 +0x216
github.com/go-gl/glfw/v3.3/glfw.Init(0x797c80, 0xc000114b10)
        /home/solarlune/go/pkg/mod/github.com/go-gl/glfw/v3.3/glfw@v0.0.0-20201108214237-06ea97f0c265/glfw.go:37 +0x54
github.com/hajimehoshi/ebiten/v2/internal/glfw.Init(...)
        /home/solarlune/go/pkg/mod/github.com/hajimehoshi/ebiten/v2@v2.0.3/internal/glfw/glfw_notwindows.go:295
github.com/hajimehoshi/ebiten/v2/internal/uidriver/glfw.initialize(0xc00009c6c0, 0xc00009c690)
        /home/solarlune/go/pkg/mod/github.com/hajimehoshi/ebiten/v2@v2.0.3/internal/uidriver/glfw/ui.go:130 +0x26
github.com/hajimehoshi/ebiten/v2/internal/uidriver/glfw.init.1()
        /home/solarlune/go/pkg/mod/github.com/hajimehoshi/ebiten/v2@v2.0.3/internal/uidriver/glfw/ui.go:120 +0x22
exit status 2

@hajimehoshi
Copy link
Owner

Well, GLFW's gamepad detection is not good in terms of these issues. I'm thinking to start to fork the GLFW's joypad part to mitigate this issue.

@hajimehoshi
Copy link
Owner

glfw/glfw#1763

@hajimehoshi
Copy link
Owner

@semilin @SolarLune @corfe83 Now the Ebiten on master has GLFW 3.3.3. Does the latest Ebiten still cause the issue?

@SolarLune
Copy link
Contributor

Hello, sorry for the late reply! Yes, I'm still seeing a crash when launching a game or during play if a controller GLFW doesn't support is connected, and this is after building with ebiten from master (v2.1.0-alpha, according to go).

Fortunately, for my controller (8BitDo SN30 Pro+) I found that there's another mode of connection that allows me to use it with Ebiten while not causing crashes.

I feel like it might be good for me to investigate a bit more to see if it's really crashing because of the controller not being found, or if something else is the issue. It might be simpler to add any missing controller profiles manually (assuming that is the cause) than invest time into a custom gamepad solution that works on all platforms.

@divVerent
Copy link
Contributor

FYI this error means that your gamepad has fewer buttons than the gamecontrollerdb.txt entry references for this gamepad. WEIRD.

@hajimehoshi
Copy link
Owner

Ironically, though the crash was due to SDL's database, SDL's gamepad detection instead of GLFW's doesn't cause this crash.

@SolarLune is that correct?

@hajimehoshi
Copy link
Owner

If that's true, migrating to SDL (#172) would make more sense.

@hajimehoshi
Copy link
Owner

Oh wow, this was fixed on GLFW side: glfw/glfw#1763

@hajimehoshi
Copy link
Owner

Does anyone try the latest commit? This issue should be already fixed.

CC @TheMightyGit

@TheMightyGit
Copy link
Contributor

Does anyone try the latest commit? This issue should be already fixed.

CC @TheMightyGit

@hajimehoshi

I get a slightly different error now...

GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
GLFW: An uncaught error has occurred: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)
GLFW: Please report this bug in the Go package immediately.
panic: InvalidValue: Invalid button in gamepad mapping 030000004c050000c405000011810000 (PS4 Controller)

goroutine 1 [running]:
github.com/hajimehoshi/ebiten/v2/internal/uidriver/glfw.init.1()
	/home/pi/go/pkg/mod/github.com/hajimehoshi/ebiten/v2@v2.2.0-alpha.9.0.20210714145448-66dbca7fdd9c/internal/uidriver/glfw/ui.go:160 +0x4c

@hajimehoshi
Copy link
Owner

Oops we found the latest commit doesn't fix the issue... Sorry I'll work on it soon

hajimehoshi added a commit that referenced this issue Jul 14, 2021
@hajimehoshi
Copy link
Owner

OK could you try ec5b034cbf50f05517a374888190e1dbf410bbe1, @TheMightyGit?

@SolarLune
Copy link
Contributor

Hello!

I also tested with my same 8BitDo SN30 Pro+ gamepad on Linux (Manjaro) on the latest commit mentioned, and got another crash, unfortunately. However, things are slightly better.

If I connect via bluetooth while my project is running, it crashes with the same error (I think?):

panic: InvalidValue: Invalid button in gamepad mapping 050000005e040000e002000003090000 (Xbox One Wireless Controller)

goroutine 1 [running, locked to thread]:
github.com/go-gl/glfw/v3.3/glfw.acceptError(0x0, 0x0, 0x0, 0x0, 0x8e1d8)
        /home/solarlune/go/pkg/mod/github.com/go-gl/glfw/v3.3/glfw@v0.0.0-20210714155130-550f9471722b/error.go:174 +0x225
github.com/go-gl/glfw/v3.3/glfw.panicError(...)
        /home/solarlune/go/pkg/mod/github.com/go-gl/glfw/v3.3/glfw@v0.0.0-20210714155130-550f9471722b/error.go:185
github.com/go-gl/glfw/v3.3/glfw.PollEvents()
        /home/solarlune/go/pkg/mod/github.com/go-gl/glfw/v3.3/glfw@v0.0.0-20210714155130-550f9471722b/window.go:950 +0x3b
github.com/hajimehoshi/ebiten/v2/internal/glfw.PollEvents(...)
        /home/solarlune/go/pkg/mod/github.com/hajimehoshi/ebiten/v2@v2.2.0-alpha.9.0.20210714160257-ec5b034cbf50/internal/glfw/glfw_notwindows.go:313
github.com/hajimehoshi/ebiten/v2/internal/uidriver/glfw.(*UserInterface).update(0x886680, 0xc00008e1e0, 0xc0000b7e28, 0xc0000b7e28, 0x41440b, 0xc00008e180)
        /home/solarlune/go/pkg/mod/github.com/hajimehoshi/ebiten/v2@v2.2.0-alpha.9.0.20210714160257-ec5b034cbf50/internal/uidriver/glfw/ui.go:964 +0xb6
github.com/hajimehoshi/ebiten/v2/internal/uidriver/glfw.(*UserInterface).loop.func2(0xc00008e180, 0xc0000b7e60)
        /home/solarlune/go/pkg/mod/github.com/hajimehoshi/ebiten/v2@v2.2.0-alpha.9.0.20210714160257-ec5b034cbf50/internal/uidriver/glfw/ui.go:1010 +0x45
github.com/hajimehoshi/ebiten/v2/internal/thread.(*OSThread).Loop(0xc000098f20)
        /home/solarlune/go/pkg/mod/github.com/hajimehoshi/ebiten/v2@v2.2.0-alpha.9.0.20210714160257-ec5b034cbf50/internal/thread/thread.go:51 +0x99
github.com/hajimehoshi/ebiten/v2/internal/uidriver/glfw.(*UserInterface).Run(0x886680, 0x725db0, 0x8bc460, 0xc0000d0840, 0x725490)
        /home/solarlune/go/pkg/mod/github.com/hajimehoshi/ebiten/v2@v2.2.0-alpha.9.0.20210714160257-ec5b034cbf50/internal/uidriver/glfw/run_notsinglethread.go:60 +0x1ab
github.com/hajimehoshi/ebiten/v2.RunGame(0x725610, 0xc000098ee0, 0x0, 0x0)
        /home/solarlune/go/pkg/mod/github.com/hajimehoshi/ebiten/v2@v2.2.0-alpha.9.0.20210714160257-ec5b034cbf50/run.go:172 +0xe6
main.main()
        /home/solarlune/Documents/Projects/Go/SidescrollerShooter/main.go:86 +0x3e
exit status 2

However, if I have my controller connected from the beginning, the game no longer crashes, but still lists the controller as having an invalid button mapping:

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.

@TheMightyGit
Copy link
Contributor

TheMightyGit commented Jul 14, 2021

OK could you try ec5b034cbf50f05517a374888190e1dbf410bbe1, @TheMightyGit?

This now works for me on RPi 4/400 \o/ No crash, and I can detect gamepad buttons now <3

EDIT: I did not test plugging in while running. I'll try now.

EDIT 2: I can confirm SolarLune - works when already connected, but crashes if plugged in while running.

@hajimehoshi
Copy link
Owner

Thank you for reporting! Apparently the same fix is needed not only at glfw.Init but also PollEvents.

@SolarLune
Copy link
Contributor

SolarLune commented Jul 14, 2021

This now works for me on RPi 4/400 \o/ No crash, and I can detect gamepad buttons now <3

Just wanted to add that I can't detect buttons from my gamepad when there's no crash and it's connected via bluetooth, in case that's useful in any way.

EDIT: I've found that this is incorrect - the first gamepad (0) on my system isn't connected (?), while the second (1) is my gamepad, and I can detect buttons from it just fine. Very good news!

@hajimehoshi
Copy link
Owner

hajimehoshi commented Jul 15, 2021

Updated to suppress errors on PollEvents 342bf6ae7e6b48b4c11400ccd700d460d68d6320.

@SolarLune
Copy link
Contributor

SolarLune commented Jul 15, 2021

Fantastic; I'm able to read gamepad inputs now without any crashes, either when the gamepad is connected during play or if it's already plugged in when the game starts. Very nice work, @hajimehoshi, and everybody else involved!!

(As an aside, it's interesting that I get the message that the controller has invalid mappings only if the gamepad is plugged in when the game starts; if the gamepad is connected during play, I don't get the message anymore.)

@hajimehoshi
Copy link
Owner

(As an aside, it's interesting that I get the message that the controller has invalid mappings only if the gamepad is plugged in when the game starts; if the gamepad is connected during play, I don't get the message anymore.)

I think this is a known issue in GLFW. Apparently GLFW uses an old joystick table. Now GLFW owner is investigating the issue.

@hajimehoshi
Copy link
Owner

OK let me close this issue. @SolarLune, @TheMightyGit, thank you for confirming this issue fixed!!

@SolarLune
Copy link
Contributor

I just wanted to say thanks a ton for working on this, again; I know gamepad support has been a pain, and I applaud all of the work you put in to track this down! In my opinion, it's one of those features that gamedev frameworks just need, and I'm glad to see ebiten improve on that front.

@hajimehoshi
Copy link
Owner

hajimehoshi commented Aug 19, 2021

I'll backport the fixes to 2.1.

@hajimehoshi hajimehoshi modified the milestones: v2.2.0, v2.1.5 Aug 19, 2021
hajimehoshi added a commit that referenced this issue Aug 19, 2021
hajimehoshi added a commit that referenced this issue Aug 19, 2021
hajimehoshi added a commit that referenced this issue Aug 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants