Closed prestonTao closed 1 month ago
After running for a few minutes, it will reproduce
The SetIcon method was accidentally set to nil, which has been resolved. sTray.SetIcon(nil)
Hi there! Thanks for this feedback. Whilst v3 is in alpha, we have a strict feedback procedure outlined here: https://v3alpha.wails.io/getting-started/feedback This is to reduce noise whilst the branch is unstable and keep all the information in one place. We'd love to have you as part of the v3 feedback loop so please consider opening a new post there. Just a copy and paste would be fine. Closing this for now. Thanks again 🙏
Description
panic: panic called with nil argument
goroutine 1 [running, locked to thread]: github.com/wailsapp/wails/v3/pkg/application.(windowsSystemTray).setIcon(0xc00047c3c0, {0x27d5ac0?, 0x0?, 0xc00066eeb8?}) C:/Users/Preston/go/pkg/mod/github.com/wailsapp/wails/v3@v3.0.0-alpha.7/pkg/application/systemtray_windows.go:276 +0x65 github.com/wailsapp/wails/v3/pkg/application.(SystemTray).SetIcon.func1() C:/Users/Preston/go/pkg/mod/github.com/wailsapp/wails/v3@v3.0.0-alpha.7/pkg/application/systemtray.go:136 +0x32 github.com/wailsapp/wails/v3/pkg/application.InvokeSync.func1() C:/Users/Preston/go/pkg/mod/github.com/wailsapp/wails/v3@v3.0.0-alpha.7/pkg/application/mainthread.go:28 +0x42 github.com/wailsapp/wails/v3/pkg/application.(windowsApp).invokeCallback(0xc0002de1c0, 0xc00000007f?, 0x8?) C:/Users/Preston/go/pkg/mod/github.com/wailsapp/wails/v3@v3.0.0-alpha.7/pkg/application/mainthread_windows.go:125 +0x2ce github.com/wailsapp/wails/v3/pkg/application.(windowsApp).wndProc(0x0?, 0xc00066f0e8?, 0x66f088?, 0x0?, 0xc00066f320?) C:/Users/Preston/go/pkg/mod/github.com/wailsapp/wails/v3@v3.0.0-alpha.7/pkg/application/application_windows.go:227 +0x352 syscall.SyscallN(0x7ffd037d7ba0, {0xc0006257f8?, 0x1, 0x388753?}) C:/Users/Preston/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.22.5.windows-amd64/src/runtime/syscall_windows.go:544 +0x11d syscall.(Proc).Call(0x304945?, {0xc0006257f8, 0x1, 0x1}) C:/Users/Preston/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.22.5.windows-amd64/src/syscall/dll_windows.go:166 +0x39 syscall.(LazyProc).Call(0xc000400c00, {0xc0006257f8, 0x1, 0x1}) C:/Users/Preston/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.22.5.windows-amd64/src/syscall/dll_windows.go:286 +0x45 github.com/wailsapp/wails/v3/pkg/w32.DispatchMessage(0x14c868673d0?) C:/Users/Preston/go/pkg/mod/github.com/wailsapp/wails/v3@v3.0.0-alpha.7/pkg/w32/user32.go:441 +0x45 github.com/wailsapp/wails/v3/pkg/application.(windowsApp).runMainLoop(0xc0002de1c0) C:/Users/Preston/go/pkg/mod/github.com/wailsapp/wails/v3@v3.0.0-alpha.7/pkg/application/mainthread_windows.go:64 +0xa5 github.com/wailsapp/wails/v3/pkg/application.(windowsApp).run(0xc0002de1c0) C:/Users/Preston/go/pkg/mod/github.com/wailsapp/wails/v3@v3.0.0-alpha.7/pkg/application/application_windows.go:185 +0xe5 github.com/wailsapp/wails/v3/pkg/application.(*App).Run(0xc000417188) C:/Users/Preston/go/pkg/mod/github.com/wailsapp/wails/v3@v3.0.0-alpha.7/pkg/application/application.go:618 +0x3fe main.main() D:/workspaces/go/web3_gui/gui/main.go:91 +0x2f2 [0921/144654.448:ERROR:window_impl.cc(121)] Failed to unregister class Chrome_WidgetWin_0. Error = 1412
To Reproduce
for { time.Sleep(time.Second / 3) sTray.SetIcon(systemTrayLightPngData) time.Sleep(time.Second / 3) sTray.SetIcon(systemTrayPngData) }
Expected behaviour
I won't panic
Screenshots
No response
Attempted Fixes
No response
System Details
Additional context
No response