Code: Select all
fontRegistry = createObject("roFontRegistry")
font = fontRegistry.getDefaultFont()
assert(font <> invalid, "roFontRegistry.getDefaultFont() should return a font")
This assertion fails from time to time in production (according to the crash reporter found in the Roku Developer backend), but we have never witnessed it in our own testing.
One small item to note is this code is only encountered once, since the returned font is stored in the globalAA for future reference. Is there something that causes `getDefaultFont()` to return invalid under certain circumstances? We have a tight grip on bitmap memory usage and are confident that there is plenty available before this block of code is executed.