EDIT: Further fiddling and I've gotten things working, but now I have new questions.
I'm building a grid of pixels, as below. However, if I increase either xsize or ysize to 128, my UI vanishes immediately upon loading in (as if I'd hit Alt-Z to hide the interface, but there seems to be no way to recover). I can alternately avoid this and increase the limits up to 256x256 by commenting out line 16 so that I'm not setting any textures. (Higher limits cause the game to stall for a very long time just loading in.)