fyne-io / systray

a cross platfrom Go library to place an icon and menu in the notification area
Apache License 2.0
227 stars 42 forks source link

Crash on my Linux setup #2

Closed rkakrik closed 2 years ago

rkakrik commented 2 years ago

Traceback:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x90 pc=0x8c5b8d]

goroutine 15 [running]:
github.com/godbus/dbus/v5.(*Conn).getSerial(...)
    /home/krik/go/pkg/mod/github.com/godbus/dbus/v5@v5.1.0/conn.go:369
github.com/godbus/dbus/v5.(*Conn).sendMessageAndIfClosed(0x0, 0xc000520810, 0xc000520870?)
    /home/krik/go/pkg/mod/github.com/godbus/dbus/v5@v5.1.0/conn.go:490 +0x2d
github.com/godbus/dbus/v5.(*Conn).Emit(0xc0005207e0?, {0xad5c4d, 0x13}, {0xc00040e3c0, 0x24}, {0xc0000781e0?, 0x2, 0x2})
    /home/krik/go/pkg/mod/github.com/godbus/dbus/v5@v5.1.0/export.go:245 +0x4d0
fyne.io/systray/internal/generated/menu.Emit(0xc00031a140?, {0xbeb0f0, 0xc0005207e0})
    /home/krik/go/pkg/mod/fyne.io/systray@v1.9.0/internal/generated/menu/dbus_menu.go:88 +0x111
fyne.io/systray.refresh(...)
    /home/krik/go/pkg/mod/fyne.io/systray@v1.9.0/systray_menu_linux.go:203
fyne.io/systray.addOrUpdateMenuItem(0xc00031a140)
    /home/krik/go/pkg/mod/fyne.io/systray@v1.9.0/systray_menu_linux.go:131 +0x35b
fyne.io/systray.(*MenuItem).update(0xc00031a140)
    /home/krik/go/pkg/mod/fyne.io/systray@v1.9.0/systray.go:224 +0x7e
fyne.io/systray.(*MenuItem).Disable(...)
    /home/krik/go/pkg/mod/fyne.io/systray@v1.9.0/systray.go:189
main.onReady()
    /home/krik/wrk/traceiq/esf/esf.go:109 +0x92
fyne.io/systray.Register.func2()
    /home/krik/go/pkg/mod/fyne.io/systray@v1.9.0/systray.go:98 +0x32
created by fyne.io/systray.Register
    /home/krik/go/pkg/mod/fyne.io/systray@v1.9.0/systray.go:96 +0xc5
rkakrik commented 2 years ago

/home/krik/wrk/traceiq/esf/esf.go:109:

systray.AddMenuItem("connected", "Status").Disable()
andydotxyz commented 2 years ago

Can you please provide some information about your Linux system, and desktop setup? It does work on many Linux setups, so something different is happening in your configuration and we will need help understanding what.

rkakrik commented 2 years ago
rkakrik commented 2 years ago

Same build for windows works fine in wine

andydotxyz commented 2 years ago

Same build for windows works fine in wine

Thanks, not much of a surprise as Wine is a whole different codepath. Different driver, different systray API.

andydotxyz commented 2 years ago

It would be good to know if version d5779bf still shows the same problem

andydotxyz commented 2 years ago

Ah, apologies there was a missing nil check, version 9177bf8 fixes it

rkakrik commented 2 years ago

@andydotxyz thanks, now everything works with the master branch in Linux