Open AlbinoGeek opened 3 years ago
This can also happen (but a lot less often) on xrandr
mode change:
fyne
Applicationxrandr --output DP-4 --mode 1920x1080 --rate 60
xrandr --output DP-4 --mode 2560x1440 --rate 144
I do reasonably extensive testing with xrandr during the development of FyneDesk and have not seen any Fyne apps crash. Is it possible that XWayland is killing the X server? (or doing something else strange?) Can you replicate in plain Xorg (you could run Xephyr to save logging out etc)?
Second replication, this has to do with system standby/resume specifically, Xephyr didn't do it.
However, I can confirm [via PID and process time] that the X server was not killed/restarted.
###!!! [Child][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x0]
runtime stack:
runtime.throw(0xd88295, 0x2a)
/usr/lib/golang/src/runtime/panic.go:1116 +0x72
runtime.sigpanic()
/usr/lib/golang/src/runtime/signal_unix.go:726 +0x4ac
goroutine 1 [syscall, locked to thread]:
runtime.cgocall(0xb98610, 0xc000203990, 0xc000203b28)
/usr/lib/golang/src/runtime/cgocall.go:133 +0x5b fp=0xc000203960 sp=0xc000203928 pc=0x42983b
github.com/go-gl/glfw/v3.3/glfw._Cfunc_glfwPollEvents()
_cgo_gotypes.go:1574 +0x45 fp=0xc000203990 sp=0xc000203960 pc=0xa5bd65
github.com/go-gl/glfw/v3.3/glfw.PollEvents()
/home/damon/go/pkg/mod/github.com/go-gl/glfw/v3.3/glfw@v0.0.0-20201108214237-06ea97f0c265/window.go:949 +0x25 fp=0xc0002039c8 sp=0xc000203990 pc=0xa64e25
fyne.io/fyne/internal/driver/glfw.(*gLDriver).tryPollEvents(0xc000180fa0)
/home/damon/go/pkg/mod/fyne.io/fyne@v1.4.1/internal/driver/glfw/loop.go:222 +0x45 fp=0xc0002039e8 sp=0xc0002039c8 pc=0xa6ed45
fyne.io/fyne/internal/driver/glfw.(*gLDriver).runGL(0xc000180fa0)
/home/damon/go/pkg/mod/fyne.io/fyne@v1.4.1/internal/driver/glfw/loop.go:102 +0x1fb fp=0xc000203b60 sp=0xc0002039e8 pc=0xa6e69b
fyne.io/fyne/internal/driver/glfw.(*gLDriver).Run(0xc000180fa0)
/home/damon/go/pkg/mod/fyne.io/fyne@v1.4.1/internal/driver/glfw/driver.go:71 +0x3a fp=0xc000203b80 sp=0xc000203b60 pc=0xa6ce9a
fyne.io/fyne/app.(*fyneApp).Run(0xc0002e2850)
/home/damon/go/pkg/mod/fyne.io/fyne@v1.4.1/app/app.go:66 +0x95 fp=0xc000203ba8 sp=0xc000203b80 pc=0xaab075
github.com/AlbinoGeek/sc2-rsu/cmd/gui.(*GraphicalInterface).Run(...)
/home/damon/go/src/sc2-rsu/cmd/gui/GraphicalInterface.go:47
github.com/AlbinoGeek/sc2-rsu/cmd.glob..func3(0x12e7ec0, 0x1643878, 0x0, 0x0, 0x0, 0x0)
/home/damon/go/src/sc2-rsu/cmd/root.go:47 +0x763 fp=0xc000203cb0 sp=0xc000203ba8 pc=0xb7da03
github.com/spf13/cobra.(*Command).execute(0x12e7ec0, 0xc0001921b0, 0x0, 0x0, 0x12e7ec0, 0xc0001921b0)
/home/damon/go/pkg/mod/github.com/spf13/cobra@v1.1.1/command.go:850 +0x47c fp=0xc000203d88 sp=0xc000203cb0 pc=0x5f557c
github.com/spf13/cobra.(*Command).ExecuteC(0x12e7ec0, 0xc00029fed0, 0x1, 0x1)
/home/damon/go/pkg/mod/github.com/spf13/cobra@v1.1.1/command.go:958 +0x375 fp=0xc000203e60 sp=0xc000203d88 pc=0x5f60f5
github.com/spf13/cobra.(*Command).Execute(...)
/home/damon/go/pkg/mod/github.com/spf13/cobra@v1.1.1/command.go:895
github.com/AlbinoGeek/sc2-rsu/cmd.Execute(0xffffffff, 0xc000182058)
/home/damon/go/src/sc2-rsu/cmd/Execute.go:41 +0x6e5 fp=0xc000203f68 sp=0xc000203e60 pc=0xb6f345
main.main()
/home/damon/go/src/sc2-rsu/main.go:19 +0x70 fp=0xc000203f88 sp=0xc000203f68 pc=0xb82470
runtime.main()
/usr/lib/golang/src/runtime/proc.go:204 +0x209 fp=0xc000203fe0 sp=0xc000203f88 pc=0x45e609
runtime.goexit()
/usr/lib/golang/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc000203fe8 sp=0xc000203fe0 pc=0x491481
goroutine 19 [sleep, 2 minutes]:
time.Sleep(0x22ecb25c00)
/usr/lib/golang/src/runtime/time.go:188 +0xbf
fyne.io/fyne/internal/painter.svgCacheJanitor.func1()
/home/damon/go/pkg/mod/fyne.io/fyne@v1.4.1/internal/painter/svg_cache.go:51 +0x109
sync.(*Once).doSlow(0x1643928, 0xc0001aabf0)
/usr/lib/golang/src/sync/once.go:66 +0xec
sync.(*Once).Do(0x1643928, 0xc0001aabf0)
/usr/lib/golang/src/sync/once.go:57 +0x45
created by fyne.io/fyne/internal/painter.svgCacheJanitor
/home/damon/go/pkg/mod/fyne.io/fyne@v1.4.1/internal/painter/svg_cache.go:49 +0x9b
goroutine 21 [chan receive, 140 minutes]:
fyne.io/fyne/app.newAppWithDriver.func1(0xc000182420, 0xc0002e2850)
/home/damon/go/pkg/mod/fyne.io/fyne@v1.4.1/app/app.go:126 +0x3d
created by fyne.io/fyne/app.newAppWithDriver
/home/damon/go/pkg/mod/fyne.io/fyne@v1.4.1/app/app.go:124 +0x1e8
goroutine 23 [chan receive, 140 minutes]:
fyne.io/fyne/app.watchFile.func1(0xc000180ff0, 0xc0001acba0, 0x26, 0xc000233700, 0xc000233710)
/home/damon/go/pkg/mod/fyne.io/fyne@v1.4.1/app/settings_desktop.go:42 +0x5a
created by fyne.io/fyne/app.watchFile
/home/damon/go/pkg/mod/fyne.io/fyne@v1.4.1/app/settings_desktop.go:41 +0xec
goroutine 25 [select, locked to thread]:
fyne.io/fyne/internal/driver/glfw.(*gLDriver).startDrawThread.func1(0xc000180fa0, 0xc000182600, 0xc000181040)
/home/damon/go/pkg/mod/fyne.io/fyne@v1.4.1/internal/driver/glfw/loop.go:186 +0x1ac
created by fyne.io/fyne/internal/driver/glfw.(*gLDriver).startDrawThread
/home/damon/go/pkg/mod/fyne.io/fyne@v1.4.1/internal/driver/glfw/loop.go:182 +0xbd
goroutine 26 [chan receive, 66 minutes]:
fyne.io/fyne/internal/driver/glfw.(*window).runEventQueue(0xc000199ba0)
/home/damon/go/pkg/mod/fyne.io/fyne@v1.4.1/internal/driver/glfw/window.go:1151 +0xb0
created by fyne.io/fyne/internal/driver/glfw.(*gLDriver).createWindow.func1
/home/damon/go/pkg/mod/fyne.io/fyne@v1.4.1/internal/driver/glfw/window.go:1176 +0x10d
goroutine 27 [chan receive, 140 minutes]:
fyne.io/fyne/internal/driver/glfw.(*glCanvas).setupThemeListener.func1(0xc0001826c0, 0xc0001bc600)
/home/damon/go/pkg/mod/fyne.io/fyne@v1.4.1/internal/driver/glfw/canvas.go:458 +0x47
created by fyne.io/fyne/internal/driver/glfw.(*glCanvas).setupThemeListener
/home/damon/go/pkg/mod/fyne.io/fyne@v1.4.1/internal/driver/glfw/canvas.go:456 +0xa6
goroutine 10 [chan receive, 140 minutes]:
fyne.io/fyne/internal/painter.SvgCacheMonitorTheme.func1(0xc0010da840)
/home/damon/go/pkg/mod/fyne.io/fyne@v1.4.1/internal/painter/svg_cache.go:103 +0x34
created by fyne.io/fyne/internal/painter.SvgCacheMonitorTheme
/home/damon/go/pkg/mod/fyne.io/fyne@v1.4.1/internal/painter/svg_cache.go:101 +0x9c
I can now confirm this bug is reproducible on a base x11 session:
$ echo $XDG_SESSION_TYPE
x11
Still only appears to happen on system standby/resume.
Perhaps the underlying graphics driver is reset?
Another reproduction on x11 session:
My Monitor 1's (DP-4) resolution is 2560x1440 My Monitor 2 (HDMI-1) unplugged
1) Change Monitor 1's resolution with xrandr
(e.g: to 1920x1080)
1) Plug in Monitor 2
1) Open "Display" settings in Gnome, which triggers resolution reset
1) Fyne app crashes with the following trace:
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x80 addr=0x0 pc=0x7fb26492aa33]
runtime stack:
runtime.throw(0xd8bc15, 0x2a)
/usr/lib/golang/src/runtime/panic.go:1116 +0x72
runtime.sigpanic()
/usr/lib/golang/src/runtime/signal_unix.go:726 +0x4ac
goroutine 1 [syscall, locked to thread]:
runtime.cgocall(0xb9b0d0, 0xc00019d990, 0xc00019db28)
/usr/lib/golang/src/runtime/cgocall.go:133 +0x5b fp=0xc00019d960 sp=0xc00019d928 pc=0x42983b
github.com/go-gl/glfw/v3.3/glfw._Cfunc_glfwPollEvents()
_cgo_gotypes.go:1574 +0x45 fp=0xc00019d990 sp=0xc00019d960 pc=0xa64ec5
github.com/go-gl/glfw/v3.3/glfw.PollEvents()
/home/damon/go/pkg/mod/github.com/go-gl/glfw/v3.3/glfw@v0.0.0-20201108214237-06ea97f0c265/window.go:949 +0x25 fp=0xc00019d9c8 sp=0xc00019d990 pc=0xa6df85
fyne.io/fyne/internal/driver/glfw.(*gLDriver).tryPollEvents(0xc0000a8fa0)
/home/damon/go/pkg/mod/fyne.io/fyne@v1.4.1/internal/driver/glfw/loop.go:222 +0x45 fp=0xc00019d9e8 sp=0xc00019d9c8 pc=0xa77ea5
fyne.io/fyne/internal/driver/glfw.(*gLDriver).runGL(0xc0000a8fa0)
/home/damon/go/pkg/mod/fyne.io/fyne@v1.4.1/internal/driver/glfw/loop.go:102 +0x1fb fp=0xc00019db60 sp=0xc00019d9e8 pc=0xa777fb
fyne.io/fyne/internal/driver/glfw.(*gLDriver).Run(0xc0000a8fa0)
/home/damon/go/pkg/mod/fyne.io/fyne@v1.4.1/internal/driver/glfw/driver.go:71 +0x3a fp=0xc00019db80 sp=0xc00019db60 pc=0xa75ffa
fyne.io/fyne/app.(*fyneApp).Run(0xc000286380)
/home/damon/go/pkg/mod/fyne.io/fyne@v1.4.1/app/app.go:66 +0x95 fp=0xc00019dba8 sp=0xc00019db80 pc=0xab41d5
github.com/AlbinoGeek/sc2-rsu/cmd/gui.(*GraphicalInterface).Run(...)
/home/damon/go/src/sc2-rsu/cmd/gui/GraphicalInterface.go:46
github.com/AlbinoGeek/sc2-rsu/cmd.glob..func3(0x12edec0, 0x16498b8, 0x0, 0x0, 0x0, 0x0)
/home/damon/go/src/sc2-rsu/cmd/root.go:47 +0x765 fp=0xc00019dcb0 sp=0xc00019dba8 pc=0xb7edc5
github.com/spf13/cobra.(*Command).execute(0x12edec0, 0xc0000b41b0, 0x0, 0x0, 0x12edec0, 0xc0000b41b0)
/home/damon/go/pkg/mod/github.com/spf13/cobra@v1.1.1/command.go:850 +0x47c fp=0xc00019dd88 sp=0xc00019dcb0 pc=0x5f557c
github.com/spf13/cobra.(*Command).ExecuteC(0x12edec0, 0xc00021fed0, 0x1, 0x1)
/home/damon/go/pkg/mod/github.com/spf13/cobra@v1.1.1/command.go:958 +0x375 fp=0xc00019de60 sp=0xc00019dd88 pc=0x5f60f5
github.com/spf13/cobra.(*Command).Execute(...)
/home/damon/go/pkg/mod/github.com/spf13/cobra@v1.1.1/command.go:895
github.com/AlbinoGeek/sc2-rsu/cmd.Execute(0xffffffff, 0xc0000aa058)
/home/damon/go/src/sc2-rsu/cmd/Execute.go:41 +0x6e5 fp=0xc00019df68 sp=0xc00019de60 pc=0xb70125
main.main()
/home/damon/go/src/sc2-rsu/main.go:19 +0x70 fp=0xc00019df88 sp=0xc00019df68 pc=0xb84f30
runtime.main()
/usr/lib/golang/src/runtime/proc.go:204 +0x209 fp=0xc00019dfe0 sp=0xc00019df88 pc=0x45e609
runtime.goexit()
/usr/lib/golang/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc00019dfe8 sp=0xc00019dfe0 pc=0x491481
goroutine 19 [sleep, 2 minutes]:
time.Sleep(0x22ecb25c00)
/usr/lib/golang/src/runtime/time.go:188 +0xbf
fyne.io/fyne/internal/painter.svgCacheJanitor.func1()
/home/damon/go/pkg/mod/fyne.io/fyne@v1.4.1/internal/painter/svg_cache.go:51 +0x109
sync.(*Once).doSlow(0x1649968, 0xc0000ccbf0)
/usr/lib/golang/src/sync/once.go:66 +0xec
sync.(*Once).Do(0x1649968, 0xc0000ccbf0)
/usr/lib/golang/src/sync/once.go:57 +0x45
created by fyne.io/fyne/internal/painter.svgCacheJanitor
/home/damon/go/pkg/mod/fyne.io/fyne@v1.4.1/internal/painter/svg_cache.go:49 +0x9b
goroutine 21 [chan receive, 10 minutes]:
fyne.io/fyne/app.newAppWithDriver.func1(0xc0000aa420, 0xc000286380)
/home/damon/go/pkg/mod/fyne.io/fyne@v1.4.1/app/app.go:126 +0x3d
created by fyne.io/fyne/app.newAppWithDriver
/home/damon/go/pkg/mod/fyne.io/fyne@v1.4.1/app/app.go:124 +0x1e8
goroutine 23 [chan receive, 10 minutes]:
fyne.io/fyne/app.watchFile.func1(0xc0000a8ff0, 0xc0000cebd0, 0x26, 0xc0001d55d0, 0xc0001d55e0)
/home/damon/go/pkg/mod/fyne.io/fyne@v1.4.1/app/settings_desktop.go:42 +0x5a
created by fyne.io/fyne/app.watchFile
/home/damon/go/pkg/mod/fyne.io/fyne@v1.4.1/app/settings_desktop.go:41 +0xec
goroutine 8 [select, locked to thread]:
fyne.io/fyne/internal/driver/glfw.(*gLDriver).startDrawThread.func1(0xc0000a8fa0, 0xc000040300, 0xc0001083c0)
/home/damon/go/pkg/mod/fyne.io/fyne@v1.4.1/internal/driver/glfw/loop.go:186 +0x1ac
created by fyne.io/fyne/internal/driver/glfw.(*gLDriver).startDrawThread
/home/damon/go/pkg/mod/fyne.io/fyne@v1.4.1/internal/driver/glfw/loop.go:182 +0xbd
goroutine 9 [runnable]:
reflect.resolveNameOff(0xc5a760, 0x21d49, 0x1a)
/usr/lib/golang/src/runtime/runtime1.go:477 +0x33
reflect.(*rtype).nameOff(...)
/usr/lib/golang/src/reflect/type.go:684
reflect.(*rtype).String(0xc5a760, 0xc5a760, 0xc0000b75f0)
/usr/lib/golang/src/reflect/type.go:754 +0x36
fmt.(*pp).printArg(0xc0003c81a0, 0xc5a760, 0xc0000b75f0, 0x54)
/usr/lib/golang/src/fmt/print.go:656 +0xc2
fmt.(*pp).doPrintf(0xc0003c81a0, 0xd9160e, 0x37, 0xc0001a3b38, 0x2, 0x2)
/usr/lib/golang/src/fmt/print.go:1126 +0x41b
fmt.Errorf(0xd9160e, 0x37, 0xc0001a3b38, 0x2, 0x2, 0xc0000b6660, 0xc0001e4e58)
/usr/lib/golang/src/fmt/errors.go:20 +0x77
github.com/spf13/cast.ToStringMapE(0xc5a760, 0xc0000b75f0, 0xc0001e4e58, 0x5, 0x0)
/home/damon/go/pkg/mod/github.com/spf13/cast@v1.3.1/caste.go:989 +0x217
github.com/spf13/cast.ToStringMap(...)
/home/damon/go/pkg/mod/github.com/spf13/cast@v1.3.1/cast.go:139
github.com/spf13/viper.(*Viper).isPathShadowedInFlatMap(0xc0000de6c0, 0xc000b80b00, 0x2, 0x2, 0xc5a760, 0xc0000b75f0, 0x0, 0x0)
/home/damon/go/pkg/mod/github.com/spf13/viper@v1.7.1/viper.go:663 +0x73
github.com/spf13/viper.(*Viper).find(0xc0000de6c0, 0xc0001e4e40, 0xe, 0x1, 0x0, 0x0)
/home/damon/go/pkg/mod/github.com/spf13/viper@v1.7.1/viper.go:1095 +0xc86
github.com/spf13/viper.(*Viper).Get(0xc0000de6c0, 0xd6e06a, 0xe, 0xc000192540, 0xc0002701b0)
/home/damon/go/pkg/mod/github.com/spf13/viper@v1.7.1/viper.go:728 +0x85
github.com/spf13/viper.(*Viper).GetInt(0xc0000de6c0, 0xd6e06a, 0xe, 0xc0001d55f0)
/home/damon/go/pkg/mod/github.com/spf13/viper@v1.7.1/viper.go:805 +0x3f
github.com/spf13/viper.GetInt(...)
/home/damon/go/pkg/mod/github.com/spf13/viper@v1.7.1/viper.go:803
github.com/AlbinoGeek/sc2-rsu/cmd/gui.darkerTheme.TextSize(...)
/home/damon/go/src/sc2-rsu/cmd/gui/DarkerTheme.go:102
fyne.io/fyne/theme.TextSize(0xc00004ea00)
/home/damon/go/pkg/mod/fyne.io/fyne@v1.4.1/theme/theme.go:333 +0x3b
fyne.io/fyne/widget.(*buttonRenderer).applyTheme(0xc00004ea00)
/home/damon/go/pkg/mod/fyne.io/fyne@v1.4.1/widget/button.go:311 +0x5c
fyne.io/fyne/widget.(*buttonRenderer).Refresh(0xc00004ea00)
/home/damon/go/pkg/mod/fyne.io/fyne@v1.4.1/widget/button.go:303 +0x136
fyne.io/fyne/widget.(*BaseWidget).Refresh(0xc0001220b0)
/home/damon/go/pkg/mod/fyne.io/fyne@v1.4.1/widget/widget.go:137 +0x5c
fyne.io/fyne/widget.(*Button).MouseOut(0xc0001220b0)
/home/damon/go/pkg/mod/fyne.io/fyne@v1.4.1/widget/button.go:160 +0x32
fyne.io/fyne/internal/driver/glfw.(*window).mouseOut.func1()
/home/damon/go/pkg/mod/fyne.io/fyne@v1.4.1/internal/driver/glfw/window.go:639 +0x4d
fyne.io/fyne/internal/driver/glfw.(*window).runEventQueue(0xc000142000)
/home/damon/go/pkg/mod/fyne.io/fyne@v1.4.1/internal/driver/glfw/window.go:1152 +0x7a
created by fyne.io/fyne/internal/driver/glfw.(*gLDriver).createWindow.func1
/home/damon/go/pkg/mod/fyne.io/fyne@v1.4.1/internal/driver/glfw/window.go:1176 +0x10d
goroutine 10 [chan receive, 10 minutes]:
fyne.io/fyne/internal/driver/glfw.(*glCanvas).setupThemeListener.func1(0xc0000403c0, 0xc000110300)
/home/damon/go/pkg/mod/fyne.io/fyne@v1.4.1/internal/driver/glfw/canvas.go:458 +0x47
created by fyne.io/fyne/internal/driver/glfw.(*glCanvas).setupThemeListener
/home/damon/go/pkg/mod/fyne.io/fyne@v1.4.1/internal/driver/glfw/canvas.go:456 +0xa6
goroutine 30 [chan receive, 10 minutes]:
fyne.io/fyne/internal/painter.SvgCacheMonitorTheme.func1(0xc0000404e0)
/home/damon/go/pkg/mod/fyne.io/fyne@v1.4.1/internal/painter/svg_cache.go:103 +0x34
created by fyne.io/fyne/internal/painter.SvgCacheMonitorTheme
/home/damon/go/pkg/mod/fyne.io/fyne@v1.4.1/internal/painter/svg_cache.go:101 +0x9c
Thanks @AlbinoGeek it looks like the code is crashing inside the C function from window.c
:
GLFWAPI void glfwPollEvents(void)
{
_GLFW_REQUIRE_INIT();
_glfwPlatformPollEvents();
}
Is there anything you can do to debug / step into this code to get us some more information (Go stack does not show C internal details).
I'm seeing something similar on MacOS; crashing after the system sleeps. I'll get a stack trace.
How to solve it? My guess is it's the system tray
This issue was opened before system tray support was introduced, I think. We are not entirely sure why this is happening
Describe the bug:
In the below stack trace, my application is
/home/damon/go/src/sc2-rsu
To Reproduce:
fyne
ApplicationDevice (please complete the following information):