ebiten: Immediate crash when running gamepad example locally

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

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 38 (27 by maintainers)

Commits related to this issue

Most upvoted comments

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.

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

OK could you try ec5b034cbf50f05517a374888190e1dbf410bbe1, @TheMightyGit?

Thanks!

There are some options to fix this issue so far:

  1. Migrate to SDL (#172): This is not an obvious task of course. Now I’m stuck with porting for Linux. The existing port like https://github.com/veandco/go-sdl2 uses precompiled libraries (*.a), but I don’t think this is the way to go for portability.
  2. Modify GLFW in go-gl/glfw: This would require forking the repository. There are various ways to suppress this error. For example, if we eliminated all the mappings, the error didn’t happen. The problem is that the gamepad name would no longer be obtained.
  3. Create our own gamepad library (#1489): This is challenging, but I hope this would not be so difficult. I’d be happy as we could have more things under control 😃 The easiest way is fork a part of GLFW or SDL.

@hajimehoshi Yes, I believe you are correct. I haven’t seen this issue arise with the go-sdl2 port of SDL, which might indicate that the issue wouldn’t arise on desktop, as an example, if SDL2 was used as a backend for Ebiten.

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.