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: 
TommyTheKid
Visitor

Crash / Data Corruption: roVideoScreen

NOTE: This was originally part of the viewtopic.php?f=34&t=25097 thread, but I moved it separate.

I am on v2.4 - build 357

I have found a reliably reproducible crash and data corruption bug. The code below reliably crashes my Roku. I see the "Enabling HTTP Authentication" message in the debug console, then "connection closed by foreign host" as it dies. After it reboots, my wireless network settings are gone. The WPA2 key is still there, but its not connected to the Wireless Network, like that setting became corrupted. This seems bad. I had copied the videoplayer example, this code is from appVideoScreen.brs. I added the Authentication section based on the workaround in the thread above. I added a few "print" statements between each line, and it seems to crash on the "createObject("roByteArray")" *AFTER* screen.Show(). I have no idea why they have a screen.Show() above the screen.setContent(espisode), but commenting that first screen.Show() out seems to have resolved the problem.

relevant code:

screen = CreateObject("roVideoScreen")
' THIS LINE APPEARS TO BE THE CAUSE
screen.SetMessagePort(port)

screen.Show()

' Authentication
'if (episode.useAuth) then
if (true) ' Force Auth for now.
print "showVideoScreen: Enabling HTTP Authentication"
'BROKEN: screen.SetUserAndPassword(userName, userPassword)
' WORKAROUND from forums (also found it in the component reference)
' THIS LINE CAUSES THE CRASH/REBOOT and DATA CORRUPTION.
ba = createObject("roByteArray")
ba.FromAsciiString((userName + ":" + userPassword))
screen.AddHeader("Authorization", "Basic" + ba.ToBase64String())
endif
' END Authentication

screen.SetContent(episode)
screen.Show()


Tommy
0 Kudos
1 REPLY 1
RokuKevin
Visitor

Re: Crash / Data Corruption: roVideoScreen

TommyTheKid,

Thanks for reporting this. You definitely should not be able to crash the firmware....

We'll work on this bug.

--Kevin
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.