This fails silently (just returns Invalid) if size is not an Integer (even if it has no fractional part):
CreateObject("roBitmap", { width: size, height: size })
I discovered this by trying to create a bitmap 1/4 the size of a previous power-of-2-sized bitmap by simply dividing each dimension by 2. Unfortunately that means the result was a floating point type, rather than the integer type I started with -- and the type change gave roBitmap's constructor indigestion.
All of which would have been no problem at all, and an easy fix. Except that CreateObject() failed silently (just returning Invalid, the same as when there is no more video memory available), and it took an extended debugging session to find the bug, because I had no idea what had gone wrong.
Can CreateObject("roBitmap", ...) please throw an exception, or at least print a warning to console, when its arguments are the wrong type?