ludo icon indicating copy to clipboard operation
ludo copied to clipboard

Crash when trying to launch Ludo with wired Dualshock 4

Open lostfictions opened this issue 2 years ago • 2 comments

I reported this a month ago in https://github.com/libretro/ludo/issues/373#issuecomment-940851859, but don't have the ability to reopen the issue (maybe why it got ignored?).

I'm getting a similar error to the one mentioned by the original reporter of that issue. I experienced it with v0.16.7, but it persists for me today with v0.16.10. I'm on Ubuntu 20.04 with a wired Dualshock 4. With the controller disconnected, or using another controller (a generic Xbox 360-compatible controller, for example), Ludo runs fine. With the DS4 connected, it crashes instantly on launch with no visible error message.

If I run it from a terminal, I get:

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.

The above is printed 30 or 40 times, then:

panic: InvalidValue: Invalid button in gamepad mapping 030000004c050000cc09000011810000 (PS4 Controller)

goroutine 1 [running, locked to thread]:
github.com/go-gl/glfw/v3.3/glfw.acceptError(0x0, 0x0, 0x0, 0x0, 0x2190590)
	/home/runner/go/pkg/mod/github.com/go-gl/glfw/v3.3/[email protected]/error.go:174 +0x225
github.com/go-gl/glfw/v3.3/glfw.panicError(...)
	/home/runner/go/pkg/mod/github.com/go-gl/glfw/v3.3/[email protected]/error.go:185
github.com/go-gl/glfw/v3.3/glfw.SetJoystickCallback(0xa28a60, 0x49794)
	/home/runner/go/pkg/mod/github.com/go-gl/glfw/v3.3/[email protected]/input.go:569 +0x65
github.com/libretro/ludo/input.Init(0xc00017e090)
	/home/runner/work/ludo/ludo/input/input.go:73 +0x6d
main.main()
	/home/runner/work/ludo/ludo/main.go:128 +0x4e6

Again, if I disconnect the DS4, Ludo launches fine. I can then connect the DS4 after launch and it'll be detected correctly and work for the menus. But as soon as I try to launch a game it crashes with this:

goroutine 1 [running, locked to thread]:
github.com/go-gl/glfw/v3.3/glfw.acceptError(0x0, 0x0, 0x0, 0xc0023f5ae8, 0x2ab44d0)
	/home/runner/go/pkg/mod/github.com/go-gl/glfw/v3.3/[email protected]/error.go:174 +0x225
github.com/go-gl/glfw/v3.3/glfw.panicError(...)
	/home/runner/go/pkg/mod/github.com/go-gl/glfw/v3.3/[email protected]/error.go:185
github.com/go-gl/glfw/v3.3/glfw.SetJoystickCallback(0xa28a60, 0x49794)
	/home/runner/go/pkg/mod/github.com/go-gl/glfw/v3.3/[email protected]/input.go:569 +0x65
github.com/libretro/ludo/input.Init(0xc006952000)
	/home/runner/work/ludo/ludo/input/input.go:73 +0x6d
github.com/libretro/ludo/core.LoadGame(0xc003a41f20, 0x37, 0x0, 0x0)
	/home/runner/work/ludo/ludo/core/core.go:175 +0x225
github.com/libretro/ludo/menu.loadPlaylistEntry(0xc000128480, 0xc006317104, 0x2e, 0xc003a41f20, 0x37, 0xc003a41f57, 0x18, 0x2e8034ab)
	/home/runner/work/ludo/ludo/menu/scene_playlist.go:107 +0x1ac
github.com/libretro/ludo/menu.buildPlaylist.func1()
	/home/runner/work/ludo/ludo/menu/scene_playlist.go:35 +0x75
github.com/libretro/ludo/menu.genericInput(0xc000128480, 0x3ca0dae7)
	/home/runner/work/ludo/ludo/menu/input.go:92 +0x728
github.com/libretro/ludo/menu.(*scenePlaylist).update(0xc000128480, 0x43ca0dae7)
	/home/runner/work/ludo/ludo/menu/scene_playlist.go:187 +0x39
github.com/libretro/ludo/menu.(*Menu).Update(...)
	/home/runner/work/ludo/ludo/menu/input.go:24
main.runLoop(0xc006952000, 0xc002584480)
	/home/runner/work/ludo/ludo/main.go:61 +0x40f
main.main()
	/home/runner/work/ludo/ludo/main.go:149 +0x525

lostfictions avatar Nov 17 '21 06:11 lostfictions

OK, looking into it

kivutar avatar Dec 14 '21 09:12 kivutar

This looks fixed now, at least for me on Manjaro with 2 different Dualshock 4

kivutar avatar Mar 03 '24 11:03 kivutar

@lostfictions can you sitll reproduce it?

igorcafe avatar Mar 13 '24 20:03 igorcafe

I can give it a shot when I have the chance -- I'm no longer on the same distro/version anyway. I think this is safe to close, thanks for checking!

lostfictions avatar Mar 14 '24 02:03 lostfictions