Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

The code you posted lacks of initialization of some fields and variables, maybe due to copy and paste from a bigger project from which this code was taken. Try to post  cleaner and easy to run code next time.
The issue could be the rectangle you're creating in the sketch: you cannot make a rectangle given two points on the same line (20, 10), (90, 10)