Closed coezbek closed 1 year ago
What is the expected outcome of having a system tray item with no icon set?
Lantern/systray just showed an empty/transparent icon. In any case it would be better to not crash or describe that the SetTemplateIcon must be called first.
Can you please provide the full back trace. I cannot tell why it is failing from just the last entry
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x0 pc=0xd50348]
goroutine 8 [running]:
fyne.io/systray.(*winTray).setTooltip(0x10f1380, {0xed5b8f, 0xc000106050})
/home/coezbek/go/pkg/mod/fyne.io/systray@v1.10.0/systray_windows.go:260 +0xc8
fyne.io/systray.SetTooltip({0xed5b8f, 0x1})
/home/coezbek/go/pkg/mod/fyne.io/systray@v1.10.0/systray_windows.go:961 +0x2b
main.onReady()
/home/coezbek/2022/sentinel/sentinel.go:114 +0x25
fyne.io/systray.Register.func2()
/home/coezbek/go/pkg/mod/fyne.io/systray@v1.10.0/systray.go:98 +0x32
created by fyne.io/systray.Register
/home/coezbek/go/pkg/mod/fyne.io/systray@v1.10.0/systray.go:96 +0xc8
exit status 2
Hope this helps!
I cannot replicate on other OS will have to get Windows booted
Turns out it was fixed upstream. I cherry picked the commits that have happened since we forked and this issue seems to be resolved.
I am getting the following crash when cross-compiling from Linux to Windows and not setting the Template Icon:
My code (note the commented out
SetTemplateIcon
). Everything properly works when I set the TemplateIcon.