Squirrel.Windows icon indicating copy to clipboard operation
Squirrel.Windows copied to clipboard

PromoteTrayItem throws System.AccessViolationException

Open mesta1 opened this issue 4 years ago • 1 comments

Squirrel version(s) latest nuget + windows 10 2004

Description As soon as I call PromoteTrayItem I get

Exception thrown: 'System.AccessViolationException' in ---.exe
An unhandled exception of type 'System.AccessViolationException' occurred in ---.exe
Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

Steps to recreate

  1. Use this code in an app that uses NotifyIcon, it should just work
var trayChanger = new Squirrel.TrayStateChanger();
trayChanger.PromoteTrayItem(Assembly.GetEntryAssembly().Location);

Expected behavior works

Actual behavior throws exception

mesta1 avatar Sep 11 '20 17:09 mesta1

Yep, relevant doesn't work as expected.

maxpavlov avatar May 06 '22 11:05 maxpavlov