Eto Window.Icon property raises "handle is invalid" exception in Rhino 6 SR26

After the recent service release for Rhino 6 (SR26), the Icon property of the Eto.Forms.Window class produces the following error:

The line of code referenced in the error message is shown below:
Note that “forms” and “drawing” refer to Eto.Forms and Eto.Drawing, respectively.

Commenting out the “self.Icon = …” line allows the plugin to run without error, but obviously precludes the use of a custom window icon.

My current fix is to just comment out the problem line of code and stick with the default icon, but I thought it would be worth posting here so others are aware of the bug.

Hi @Greg_Bossons,

Can you post the image file you are using as an icon?

– Dale

Hi @dale,

Thanks for the response. Here’s a test icon I’ve been using to troubleshoot. It’s a pretty typical .ico file with 16x16, 32x32, and 64x64 versions, 32 bpp, 8 bit alpha. (1.4 KB)

I tried it again this morning on both SR26 and SR22. SR26 produced the same error message I provided above, while SR22 worked flawlessly.

Something else I tried was to isolate whether it was caused by Eto.Forms.Window.Icon or Eto.Drawing.Icon by initializing the Icon class using Eto.Drawing.Icon() but not assigning it to the Eto.Forms.Window.Icon property (code below).

This produced the same results as before (i.e. “The handle is invalid” exception), so it seems to be an issue with the Eto.Drawing.Icon class and not Eto.Forms.Window.Icon as I had initially stated.

For reference, I am initializing the Icon class using a string containing the filename and have not attempted using any alternative initialization methods (Stream, IconFrame, Icon.IHandler, etc.)

Hi @Greg_Bossons,

Thanks, I’ve logged the issue.

– Dale

RH-58972 is fixed in the latest Service Release Candidate