-
Notifications
You must be signed in to change notification settings - Fork 473
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
Windows SetTooltip invalid memory address #158
Comments
FWIW, I'm also experiencing this issue. I'm observing if I run the compiled exe 6-7 times, ~30% will fail with the above mentioned error. v0.9.0 doesn't appear to be affected. 1.0.0, 1.0.1, 1.0.2 and 1.0.3 exhibit this issue. Tested with:
Edit - This appears to fix the issue - just need to ensure |
Can't comment on v1.0.4 specifically, but have been giving 4c7e35b4e5114211b7c7c3b57484c56de802767a a good workout for the last couple of days. Fixed all the issues for me (only tested on Windows). |
I'm still experiencing the same error on 1.0.4 (using the same code in my initial issue): PS C:\Users\Simon\go\src\github.com\psidex\trayTest> go run .\main.go
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x0 pc=0x6608ae]
goroutine 6 [running]:
github.com/getlantern/systray.(*winTray).setTooltip(0x923260, 0x6f5060, 0x18, 0x0, 0x0)
C:/Users/Simon/go/pkg/mod/github.com/getlantern/systray@v1.0.4/systray_windows.go:238 +0xce
github.com/getlantern/systray.SetTooltip(0x6f5060, 0x18)
C:/Users/Simon/go/pkg/mod/github.com/getlantern/systray@v1.0.4/systray_windows.go:899 +0x4c
main.OnReady()
C:/Users/Simon/go/src/github.com/psidex/trayTest/main.go:8 +0x3d
github.com/getlantern/systray.Register.func2(0xc000014180, 0x7075d0)
C:/Users/Simon/go/pkg/mod/github.com/getlantern/systray@v1.0.4/systray.go:91 +0x45
created by github.com/getlantern/systray.Register
C:/Users/Simon/go/pkg/mod/github.com/getlantern/systray@v1.0.4/systray.go:89 +0xe3
exit status 2 But I can confirm that setting the icon before setting the tooltip does work. |
I am also getting an All of these issues seem to be linked to something that It all works if the first thing I do is call |
Sorry, why comment's was deleted? Only for curiosity.. |
This way it's working: func main() {
systray.Run(onReady, onExit)
}
func onReady() {
systray.SetTitle("Sup")
systray.SetIcon(ico)
systray.SetTooltip("Sup")
}
func onExit() {
} But this way fall to panic: func main() {
systray.Run(onReady, onExit)
}
func onReady() {
systray.SetTitle("Sup")
systray.SetTooltip("Sup")
systray.SetIcon(ico)
}
func onExit() {
} |
here is the contents of
main.go
:The text was updated successfully, but these errors were encountered: