fyne-io / fyne

Cross platform GUI toolkit in Go inspired by Material Design
https://fyne.io/
Other
24.02k stars 1.34k forks source link

Fyne Demo not runnable on macOS Ventura VM (OpenGL related) #4925

Open tempanon opened 1 month ago

tempanon commented 1 month ago

Checklist

Describe the bug

The fyne demo is not runnable on macOS Ventura VM (OpenGL related).

How to reproduce

$ go run fyne.io/fyne/v2/cmd/fyne_demo@latest

Screenshots

No response

Example code

go run fyne.io/fyne/v2/cmd/fyne_demo@latest
# fyne.io/fyne/v2/cmd/fyne_demo
ld: warning: ignoring duplicate libraries: '-lobjc'
go-gl/glfw: internal error: an invalid error was not accepted by the caller: FormatUnavailable: NSGL: Failed to find a suitable pixel format
go-gl/glfw: Please report this in the Go package issue tracker.
panic: FormatUnavailable: NSGL: Failed to find a suitable pixel format

goroutine 1 [running, locked to thread]:
github.com/go-gl/glfw/v3.3/glfw.acceptError({0xc00031fbe0, 0x2, 0x600001814830?})
    /Users/user/go/pkg/mod/github.com/go-gl/glfw/v3.3/glfw@v0.0.0-20240306074159-ea2d69986ecb/error.go:181 +0x228
github.com/go-gl/glfw/v3.3/glfw.CreateWindow(0xa, 0xa, {0x10376660a?, 0xe?}, 0x0, 0x0)
    /Users/user/go/pkg/mod/github.com/go-gl/glfw/v3.3/glfw@v0.0.0-20240306074159-ea2d69986ecb/window.go:349 +0x165
fyne.io/fyne/v2/internal/driver/glfw.(*window).create.func1()
    /Users/user/go/pkg/mod/fyne.io/fyne/v2@v2.4.5/internal/driver/glfw/window_desktop.go:733 +0x11f
fyne.io/fyne/v2/internal/driver/glfw.runOnMain(0xc00019f9a0)
    /Users/user/go/pkg/mod/fyne.io/fyne/v2@v2.4.5/internal/driver/glfw/loop.go:53 +0x10e
fyne.io/fyne/v2/internal/driver/glfw.(*window).create(0xc000454000)
    /Users/user/go/pkg/mod/fyne.io/fyne/v2@v2.4.5/internal/driver/glfw/window_desktop.go:705 +0x56
fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).SetSystemTrayMenu.func1()
    /Users/user/go/pkg/mod/fyne.io/fyne/v2@v2.4.5/internal/driver/glfw/driver_desktop.go:68 +0xe8
sync.(*Once).doSlow(0x1039b73c0?, 0x1044b9601?)
    /usr/local/go/src/sync/once.go:74 +0xc2
sync.(*Once).Do(...)
    /usr/local/go/src/sync/once.go:65
fyne.io/fyne/v2/internal/driver/glfw.(*gLDriver).SetSystemTrayMenu(0xc0001ff700, 0xc00010e1e0)
    /Users/user/go/pkg/mod/fyne.io/fyne/v2@v2.4.5/internal/driver/glfw/driver_desktop.go:39 +0x58
fyne.io/fyne/v2/app.(*fyneApp).SetSystemTrayMenu(0x10375cc82?, 0xc00010e1e0?)
    /Users/user/go/pkg/mod/fyne.io/fyne/v2@v2.4.5/app/app_desktop_darwin.go:32 +0x3c
main.makeTray({0x1039e0e58?, 0xc0001ff780})
    /Users/user/go/pkg/mod/fyne.io/fyne/v2@v2.4.5/cmd/fyne_demo/main.go:187 +0x1a8
main.main()
    /Users/user/go/pkg/mod/fyne.io/fyne/v2@v2.4.5/cmd/fyne_demo/main.go:27 +0x67
exit status 2

Fyne version

d8e9fe0

Go compiler version

1.22.2

Operating system and version

macOS Ventura 13.6.5

Additional Information

virtualized (KVM)

Is this the correct repo to report this bug or should it be in the fyne-systray repo?

andydotxyz commented 1 month ago

Did you turn on "3d acceleration" in the virtual machine?

Is this the correct repo to report this bug or should it be in the fyne-systray repo?

This is fine, unless your reports are specifically about the system tray project not using the main Fyne APIs.

tempanon commented 1 month ago

yes 3d virt was turned on. In virt-manager model Virtio with 3d acceleration was set in Video Virtio and under Display Splice Listen Type was set to None and OpenGL checked.

andydotxyz commented 1 month ago

In virt-manager model Virtio with 3d acceleration was set in Video Virtio and under Display Splice Listen Type was set to None and OpenGL checked.

Can you please provide step by step instructions on how this could be set up so we can replicate the error you have reported?