It is a bug in a window, or at least you've given it a parameter it doesn't like. From the name I think we can assume it's a trim parameter.
'Polygon is degenerated' usually means a zero value in a shape command causing edges to coincide, or a hole overlapping the main polygon.
Just for fun I opened the window and then the macro, and the comments around the shape at that line refer to the apron. In the settings you'll see the apron can be turned off by setting the thickness to zero. If you set the width to zero, you get the error.
Bad error handling on their part IMHO.
Now, finding the window(s)...
Try the binary search method, recently discussed
here.
Good luck,