Random position without overlapping

-a- did you try my code and did it work?
-b- yes, up to now there is no limit build in,
so if like the canvas is full it would try new rectangles forever.
could make a limit retry counter or a timeout function.
-c- but you should first try to set

avoidCollide = false;

to check if the rest is ok,
-d- well, diagnostic prints for
x,y,w,h and all onegrass.x,y,w,h
might show where you problem is??

p.s.what environment you work under?
because your code can not be tested as is in processing IDE??
and that makes it very difficult to test.

also my example used rectangles,
you make circles? did you change the collision code to 2 circles?