roFontRegistry.getDefaultFont() returns invalid, sometimes
In our text label utility, we have the following:
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.
Re: roFontRegistry.getDefaultFont() returns invalid, sometimes
We store the returned font in the global AA, after that block of code is executed once. I think that is a red herring and shouldn't have mentioned it.
The channel does not use SG other than for the player.
The block of code is a copy-paste from the file; the only thing I changed was the indentation. I believe there is either a bug with roFontRegistry, or we are doing something to cause a problem with it, though I can't be sure of what it would be.