Forum Discussion

cpjamloki's avatar
cpjamloki
Visitor
11 years ago

roBimap invalid

Hi,
I am showing some bitmap in roScreen, which is working good after creating robitmap and draw it on Screen, but once roBitmap is coming Invalid continuously is coming Invalid, whether it is calling after clear screen and exit from loop.why?

5 Replies

  • whatever variable you set to be the robitmap needs to stay in focus or brightscript will dispose of it
  • Thanx comag for reply. stay in focus? ....can you describe through example.
  • You could also be running out of memory
    You can only create so many at one time depending on their size
  • If a function created a bitmap and showed it, but the function then is completed and ends, you can't use that variable again, it gets deleted. But NewManLiving is probably right, you may be running out of memory instead.
  • You could either be running out of memory, or specifying invalid bitmap dimensions (i.e. w=0, h=0). You can check your current memory usage by running your app, and telnetting to the roku on port 8080. Once connected, run the 'r2d2_bitmaps' command to view video memory usage.

    Also, it's worth noting that bitmaps are not de-allocated until the *next* call to SwapBuffers(). This means even if the variable which references the bitmap has gone out of scope, the memory may still be in use.