The following roVideoPlayer code runs "forever" when ran in side-loaded developer mode, but crashes when packaged and ran as a private channel.
Sub RunUserInterface()
port=CreateObject("roMessagePort")
canvas=CreateObject("roImageCanvas")
player=CreateObject("roVideoPlayer")
player.SetMessagePort(port)
player.SetLoop(true)
player.SetContentList([{
Stream: { url: "http://wilddtech.com/public/video.mp4" }
StreamFormat: "mp4"
}])
canvas.SetMessagePort(port)
canvas.SetLayer(0, { Color: "#00000000" })
canvas.Show()
player.Play()
eventLoop(port)
End Sub
Sub EventLoop(port)
while true
msg = wait(0, port)
end while
End Sub
The video is only a 2 second video, but my attempt is to simulate a signage application that loops a video constantly 24 hours a day. I wanted to see if the number of looping repetitions causes problems without having to wait for it to run for days or weeks to see the result. So the 2 second video represents a longer running video that might run looping constantly for several days.
This code runs for a very long time in developer mode (I stop it after about 12 hours), but crashes after 2 hours and 10 minutes when packaged and ran as a private channel. It doesn't cause a reboot, it just stops and exits to the Roku home screen.
Does anyone know why this would happen? And more importantly, is there a way to prevent it from happening?
I have tested this on the following configurations with the same results:
Roku 2 XS Version 7.2.0 Build 4100-02
Roku 4 Version 7.2.0 Build 4100-17