Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Search instead for 
Did you mean: 
cpjamloki
Level 7

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?
0 Kudos
5 Replies
Komag
Level 9

Re: roBimap invalid

whatever variable you set to be the robitmap needs to stay in focus or brightscript will dispose of it
0 Kudos
cpjamloki
Level 7

Re: roBimap invalid

Thanx comag for reply. stay in focus? ....can you describe through example.
0 Kudos
NewManLiving
Level 7

Re: roBimap invalid

You could also be running out of memory
You can only create so many at one time depending on their size
My Channels: 2D API Framework Presentation: https://owner.roku.com/add/2M9LCVC
Updated: 11-11-2015 - Completed Keyboard interface
The Joel Channel ( Final Beta )
0 Kudos
Komag
Level 9

Re: roBimap invalid

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.
0 Kudos
Rek
Level 7

Re: roBimap invalid

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.
0 Kudos