Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
cpjamloki
Visitor

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 5
Komag
Roku Guru

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
Visitor

Re: roBimap invalid

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

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
Roku Guru

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
Visitor

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
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.