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: 
jbrave
Channel Surfer

console printing causing reboots

seems that certain types of printing to the console can cause the roku machine to instantaniously reboot. usually it seems to involve the / forward slash character, but right now it appears to be the result of printing a pile of xml to the console. I"m posting this while I await reboot...
Screenshades: The first Screensaver for Roku2!
Musiclouds: The best free internet music, on your Roku!
Ouroborialis: Psychedelic Screensaver for Roku!
0 Kudos
7 REPLIES 7
TheEndless
Channel Surfer

Re: console printing causing reboots

I've found that large XML files cancrash the Roku when you try to parse them. Are you sure it's the print, and not the parse that's causing the crash?
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos
jbrave
Channel Surfer

Re: console printing causing reboots

yeah, its the print. commented it out and everything's working. I first encountered this a week or so ago, when creating a url to do the api request, as a test I printed it to the console before doing the 'get' and boom, rebooted. took a while to figure out, once I did, I just left off the http:// when I printed to the console and no more reboots. Today, I encountered the same thing where I had a mid(stringval,7) one char too short leaving the / in the url. fixed that and then it rebooted when it printed the xml to the screen (also a test so I would know that it was working. commented that out and the app (such as it is so far) is working.

- Joel
Screenshades: The first Screensaver for Roku2!
Musiclouds: The best free internet music, on your Roku!
Ouroborialis: Psychedelic Screensaver for Roku!
0 Kudos
renojim
Community Streaming Expert

Re: console printing causing reboots

I routinely print urls with 'http://' and I've never seen this problem.

-JT
Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
0 Kudos
jbrave
Channel Surfer

Re: console printing causing reboots

Hesre are the offending lines of code that caused the original problem:



xfer.setURL(api+resource+user+uresource+ckey+limit+offset)
print api+resource+user+uresource+ckey+limit+offset
reboot happens after the print above


where api= "http://api.company.com"
resource= "/files"
user= "/username"
uresource= "/files"
ckey = "consumerkey=myconsumerkeystring"
limit= "&limit=10"
offset= "&offset=0"


replacing this code with this:


xfer.setURL(api+resource+user+uresource+ckey+limit+offset)
print resource+user+uresource+ckey+limit+offset


fixed the problem
Screenshades: The first Screensaver for Roku2!
Musiclouds: The best free internet music, on your Roku!
Ouroborialis: Psychedelic Screensaver for Roku!
0 Kudos
renojim
Community Streaming Expert

Re: console printing causing reboots

I can't reproduce it. It prints fine for me.

-JT
Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
0 Kudos
jbrave
Channel Surfer

Re: console printing causing reboots

good!

None the less, on all three occasions where I encountered this, commenting out the print statement or altering it in some way eliminated the reboot. in the above example, my consumerkeystring is a long string of numbers and letters (oauth stuff), which is appended to every api request I make, so it is possible it has something to do with that string in combo with the http://

- Joel
Screenshades: The first Screensaver for Roku2!
Musiclouds: The best free internet music, on your Roku!
Ouroborialis: Psychedelic Screensaver for Roku!
0 Kudos
RokuKevin
Visitor

Re: console printing causing reboots

I can't recreate with this code snippet...

We believe our box should never crash and would try to fix any reproducible crash. So if you can narrow down a more reproducible test case, I'll take a look.

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