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: 
peterjtracey
Level 7

Mysterious error in roSpringboardScreen

I set up a content associative array and pass it to the springboardscreen object doing:
screen.SetContent(show)
on this line I get an error (warning? doesn't pull up the debugger...) "BRIGHTSCRIPT: ERROR: roSpringboardScreen.SetContent: Failed to box a bsTVAL.: pkg:/source/appChannel.brs(166)"

The screen comes up with no image, title, etc. I googled the error message but get no results of any use. Doesn't seem like anyone else is getting this error so I have no idea what's going on with my code. 

Can anybody help me?
0 Kudos
5 Replies
squirreltown
Level 9

Re: Mysterious error in roSpringboardScreen

Posting the actual code might help.
Kinetics Screensavers
0 Kudos
Roku Employee
Roku Employee

Re: Mysterious error in roSpringboardScreen

"peterjtracey" wrote:
I set up a content associative array and pass it to the springboardscreen object doing:
screen.SetContent(show)
on this line I get an error (warning? doesn't pull up the debugger...) "BRIGHTSCRIPT: ERROR: roSpringboardScreen.SetContent: Failed to box a bsTVAL.: pkg:/source/appChannel.brs(166)"

I suggest you inspect all of the value types in the 'show' associative array values carefully.
It seems like there is something that is not an expected value type (string, integer, etc.) ... perhaps a component object value got included unintentionally?
0 Kudos
peterjtracey
Level 7

Re: Mysterious error in roSpringboardScreen

...I commented everything but title out and title showed, so I started uncommenting things and the error starts occuring when I uncomment the lines:
												   bitrates  = [0]    
   qualities = ["SD"]
   urls = [streamUrl]
streamformat = "hls"

   show.StreamBitrates = bitrates
   show.StreamUrls = urls
   show.StreamQualities = qualities
   show.StreamFormat = streamformat
0 Kudos
EnTerr
Level 8

Re: Mysterious error in roSpringboardScreen

Ha, this is odd. Why would it fail boxing any of these values?! 
Try "print formatJSON(show)" just before doing setContent() while with the problematic values. Anything fun?
0 Kudos
peterjtracey
Level 7

Re: Mysterious error in roSpringboardScreen

Thanks everyone I figured it out. I had an error in my code that caused an uninitialized variable to get put in the array.
0 Kudos