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

Crash on linux with wayland and external monitor #3094

Open
1 of 11 tasks
gucio321 opened this issue Sep 12, 2024 · 7 comments
Open
1 of 11 tasks

Crash on linux with wayland and external monitor #3094

gucio321 opened this issue Sep 12, 2024 · 7 comments

Comments

@gucio321
Copy link

Ebitengine Version

6eb0271

Operating System

  • Windows
  • macOS
  • Linux
  • FreeBSD
  • OpenBSD
  • Android
  • iOS
  • Nintendo Switch
  • PlayStation 5
  • Xbox
  • Web Browsers

Go Version (go version)

go version go1.23.1 linux/amd64

What steps will reproduce the problem?

  • run any example
  • turn off monitor
  • turn monitor back on

What is the expected result?

everything should be as it was before turning monitor off

What happens instead?

X Error of failed request:  BadRRCrtc (invalid Crtc parameter)
  Major opcode of failed request:  140 (RANDR)
  Minor opcode of failed request:  20 (RRGetCrtcInfo)
  Crtc id in failed request: 0x56e
  Serial number of failed request:  1855
  Current serial number in output stream:  1855
exit status 1

Anything else you feel useful to add?

I use gnome-shell on Wayland, this is why I suppose that ebiten uses xwaylandbridge. Why does it need xorg?

@gucio321

This comment was marked as outdated.

@gucio321

This comment was marked as outdated.

@gucio321

This comment was marked as outdated.

@hajimehoshi
Copy link
Owner

Ebitengine dropped Wayland support from GLFW.

@hajimehoshi hajimehoshi added this to the v2.9.0 milestone Sep 12, 2024
@gucio321
Copy link
Author

Ebitengine dropped Wayland support from GLFW.

So what deos it use for linux-wayland now? maybe I can share some more info?

@hajimehoshi
Copy link
Owner

IIUC an X emulation layer works.

@gucio321
Copy link
Author

interessting, on examples/fullscreen it panics with

[fullscreen (0) ]$ go run .
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x48 pc=0x6d0c86]

goroutine 1 [running, locked to thread]:
github.com/hajimehoshi/ebiten/v2/internal/ui.(*Monitor).DeviceScaleFactor(...)
	/home/me/git/ebiten/internal/ui/monitor_glfw.go:45
github.com/hajimehoshi/ebiten/v2/internal/ui.(*UserInterface).registerWindowFramebufferSizeCallback.func1(0xc00017a608?, 0x280, 0x205)
	/home/me/git/ebiten/internal/ui/ui_glfw.go:968 +0x86
github.com/hajimehoshi/ebiten/v2/internal/glfw.goFramebufferSizeCB(0xc0000061c0?, 0x280, 0x205)
	/home/me/git/ebiten/internal/glfw/window_unix.go:147 +0x45
github.com/hajimehoshi/ebiten/v2/internal/glfw._Cfunc_glfwPollEvents()
	_cgo_gotypes.go:1004 +0x3f
github.com/hajimehoshi/ebiten/v2/internal/glfw.PollEvents()
	/home/me/git/ebiten/internal/glfw/window_unix.go:952 +0xf
github.com/hajimehoshi/ebiten/v2/internal/ui.(*UserInterface).update(0xc00017a608)
	/home/me/git/ebiten/internal/ui/ui_glfw.go:1377 +0x127
github.com/hajimehoshi/ebiten/v2/internal/ui.(*UserInterface).updateGame.func1()
	/home/me/git/ebiten/internal/ui/ui_glfw.go:1471 +0x45
github.com/hajimehoshi/ebiten/v2/internal/thread.(*OSThread).Loop.func1({0xc0001cc300?, 0x80?}, 0x20?)
	/home/me/git/ebiten/internal/thread/thread.go:67 +0x4f
github.com/hajimehoshi/ebiten/v2/internal/thread.(*OSThread).Loop(0xc00021ab00, {0x9632f8, 0xc0009cac30})
	/home/me/git/ebiten/internal/thread/thread.go:68 +0x79
github.com/hajimehoshi/ebiten/v2/internal/ui.(*UserInterface).runMultiThread(0xc00017a608, {0x9654e0, 0xc0000d2380}, 0xc000384dc0)
	/home/me/git/ebiten/internal/ui/run.go:75 +0x322
github.com/hajimehoshi/ebiten/v2/internal/ui.(*UserInterface).Run(0x961518?, {0x9654e0?, 0xc0000d2380?}, 0x3?)
	/home/me/git/ebiten/internal/ui/run.go:33 +0x30
github.com/hajimehoshi/ebiten/v2.RunGameWithOptions({0x961518, 0xc0009b71f8}, 0x0)
	/home/me/git/ebiten/run.go:345 +0x208
github.com/hajimehoshi/ebiten/v2.RunGame(...)
	/home/me/git/ebiten/run.go:236
main.main()
	/home/me/git/ebiten/examples/fullscreen/main.go:117 +0x56
exit status 2

so it uses glfw on wayland.

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

2 participants