getlantern / systray

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

Menu turn black after a few days #244

Open walterhwan opened 1 year ago

walterhwan commented 1 year ago

Not sure if this is a known issue. The menu will consistently turn black after leaving it alone for a day or two. When I mouse over the black area it can show what's the normal menu item. I can still click on the menu items but it goes to black soon after.

Edit: The problem only appears on Windows 10/11

Screenshot 2022-11-12 073338

walterhwan commented 1 year ago

I was able to track down the error to the SetIcon function. The error shows Unable to convert icon to bitmap: The operation completed successfully

I have a function where it will SetIcon of a menuItem every 5 seconds. And depend on a variable it will set to different icon. It all works fine changing icon initially. But if you let it sit for several hours it will show the above error. How is this possible??