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

2 ROKU2 BOXES-DIFFERENT RESULTS

I have run into a problem. I have developed a private channel that requires a instr() function to locate a string position that is the start point of extraction for a url. I can run the channel on a Roku2 Model 3050X and the position located in the file works perfect. The Instr() locates the position, a mid() is used to cut the string perfectly. I then load the same channel to another Roku2 Model 3050X. When executed, the channel does not play. I review the debug terminal during play and see that the Instr() position is off by 4 places. On the working roku the string position is 225. On the roku that doesn't work the string position is 221. The file being search is created during run time. I also have another 2 Roku2 and 1 Roku3 which places the script as originally designed. How and why would the one Roku be off by the 4 places?
0 Kudos
11 Replies
dcrandall
Level 7

Re: 2 ROKU2 BOXES-DIFFERENT RESULTS

They're all on the same firmware, right?
0 Kudos
btpoole
Level 7

Re: 2 ROKU2 BOXES-DIFFERENT RESULTS

Yes same software version and build.
0 Kudos
RokuMarkn
Level 7

Re: 2 ROKU2 BOXES-DIFFERENT RESULTS

I would bet a large amount of money that you're just mistaken about what's happening. I'm sure you're using different strings on the two units with different behavior. Try printing all the strings involved, and if you still don't see the problem, post your code and the debug information.

--Mark
0 Kudos
btpoole
Level 7

Re: 2 ROKU2 BOXES-DIFFERENT RESULTS

Nope same string. I can run the script on the roku the script was designed on and it picks the correct location. I run the exact same script on another and where the instr occurs is 4 places short. I can change the instr start location by 4, run the script and it works. I have checked this several times. The length of the file and location of a particular phrase always occurs at the same location.
0 Kudos
TheEndless
Level 7

Re: 2 ROKU2 BOXES-DIFFERENT RESULTS

"btpoole" wrote:
Nope same string. I can run the script on the roku the script was designed on and it picks the correct location. I run the exact same script on another and where the instr occurs is 4 places short. I can change the instr start location by 4, run the script and it works. I have checked this several times. The length of the file and location of a particular phrase always occurs at the same location.

Are you reading the file from the same location on both boxes? Is it packaged with the channel, or are you reading it from a web server? If it's packaged with the channel, are you side-loading the exact same zip or are you building it new for each box?
What you're describing doesn't make sense for two virtually identical boxes, and it's not something I've ever seen in nearly five years of developing on this platform (with the exception of how unicode strings are handled in 3.x vs. 5.x firmware), so there's definitely something amiss.
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
squirreltown
Level 9

Re: 2 ROKU2 BOXES-DIFFERENT RESULTS

I certainly won't figure something out that Endless and Mark haven't but just thought I'd mention registry settings. It's the one thing I can think of that will make two "identical" boxes act differently.
Kinetics Screensavers
0 Kudos
TheEndless
Level 7

Re: 2 ROKU2 BOXES-DIFFERENT RESULTS

"squirreltown" wrote:
I certainly won't figure something out that Endless and Mark haven't but just thought I'd mention registry settings. It's the one thing I can think of that will make two "identical" boxes act differently.

Very good point, squirreltown. To elaborate, if your channel is relying on data stored in the registry, then you'd need to ensure that data is identical (and present) on both boxes. It doesn't sound likely that that's the case here, but it's definitely worth noting.
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
EnTerr
Level 8

Re: 2 ROKU2 BOXES-DIFFERENT RESULTS

"squirreltown" wrote:
I certainly won't figure something out that Endless and Mark haven't but just thought I'd mention registry settings. It's the one thing I can think of that will make two "identical" boxes act differently.

Oh hello squirreltown, welcome back!

Interesting idea about registry. In addition i would suspect network settings: are both players on the same LAN segment, have about the same IPs, DNS, names... anything that can be different between the two. Hard to be specific since we don't know what exactly he is doing but to quote the classics, "when you have eliminated the impossible, whatever remains - however improbable - must be the truth"

@btpoole - there IS a difference between the two players that causes this, try to find it. If they have the same hardware and firmware, it's not that. But maybe you uploaded different version of the bundle; "touch" (modify) the zip to bump the timestamp and re-upload on both places, test again. Or you are parsing xml that changes from player to player. Find the difference. And let us know Smiley Happy
0 Kudos
btpoole
Level 7

Re: 2 ROKU2 BOXES-DIFFERENT RESULTS

I'll give an up date to the situation. Doing some more looking into problem. The bundle is the same for each. The file being cut is a text file that is obtained thru GetToFile command, saved as a temp then read. I am looking into something else that could have a bearing on the results.
0 Kudos