
squirreltown
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2014
05:41 PM
Re: texmgr requests
So just for grins I took the code posted above and ran it twice consecutively, just got files 1-5 the first pass and 5 -10 the second pass, and that worked, and is considerably faster then what i have now so I'll take the improvement, but sure wouldn't mind finding out what the issue is with running all 10 files at once, happy to entertain any ideas about that.
Kinetics Screensavers

NewManLiving
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2014
06:12 PM
Re: texmgr requests
I would be interested to know if you
Get a valid bitmap back each time.
You increment your counter and save the
Bitmap but do you make sure it is a bitmap
Even with a state code of 3 not all my
Bitmaps were valid but did eventually come
In as valid ones if getbitmap = invalid print invalid
Get a valid bitmap back each time.
You increment your counter and save the
Bitmap but do you make sure it is a bitmap
Even with a state code of 3 not all my
Bitmaps were valid but did eventually come
In as valid ones if getbitmap = invalid print invalid
My Channels: 2D API Framework Presentation: https://owner.roku.com/add/2M9LCVC
Updated: 11-11-2015 - Completed Keyboard interface
The Joel Channel ( Final Beta )
Updated: 11-11-2015 - Completed Keyboard interface
The Joel Channel ( Final Beta )

TheEndless
Channel Surfer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2014
06:59 PM
Re: texmgr requests
"squirreltown" wrote:"TheEndless" wrote:
What's the GetState() of the ones that fail to load?
You know, I'm not checking that. Tell me if I'm wrong but I'm not aware of how that might help me.
If the state comes back as 5 (Cancelled) instead of 4 (Failed), that would be a pointer to something causing the requests to be cancelled (going out of scope, maybe?). A value of 1 (Downloading) or 2 (Downloaded) would indicate that the TextureRequest is getting hung up during the downloading. Without that additional information, it's much harder to diagnose the cause. Likewise, if it comes back as something other than 3, you could try re-issuing the request.
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)
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)

squirreltown
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2014
07:44 PM
Re: texmgr requests
Thanks Endless, thats good info, appreciate it.
Kinetics Screensavers

NewManLiving
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2014
09:09 PM
Re: texmgr requests
Well just got home and the mind is a very, very tired but looking at this
One point I think I noticed is that your total count will never get incremented unless
1 - it is a roTextureRequestEvent
2 - state = 3
3 - request Id = msg ID
So these three items must be true at least total = 9 even for you to exit the loop, otherwise it would be endless
Also I assume that total is set to 0 somewhere. Is this just a portion of the code ?
Also never knew there was an exit for, just an exit while, perhaps there is a loop or continue statement that would be nice
One point I think I noticed is that your total count will never get incremented unless
1 - it is a roTextureRequestEvent
2 - state = 3
3 - request Id = msg ID
So these three items must be true at least total = 9 even for you to exit the loop, otherwise it would be endless
Also I assume that total is set to 0 somewhere. Is this just a portion of the code ?
Also never knew there was an exit for, just an exit while, perhaps there is a loop or continue statement that would be nice
My Channels: 2D API Framework Presentation: https://owner.roku.com/add/2M9LCVC
Updated: 11-11-2015 - Completed Keyboard interface
The Joel Channel ( Final Beta )
Updated: 11-11-2015 - Completed Keyboard interface
The Joel Channel ( Final Beta )

squirreltown
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2014
09:53 PM
Re: texmgr requests
NML -
Yes all three of those things need to be happening to continue, and it works as i would expect it to - I want all of those thing to be true for each image, otherwise no point in continuing. Yes total=0 is set before the loop starts. The thing is if the construction of the loops was bad, it wouldn't work at all - and since i have split the job into two parts it works well and in half the time (about 5 seconds) that URLtransfer or Texmgr one-at-a-time did. The total variable is just the first thing i could think of to exit the loop when done - I'm sure theres a more professional way to do it but it was never the issue. The weird thing is why the 5 image limit on this code. When i request 5 images, i get 5 images - 1,2,3&4 not necessarily in that order and 5. If I request 10, I get 1,2,3,4 and 10. Same code. Like i said above if I don't include the state-checking, all 10 ID's return with the five downloads. Since I got the time cut in half i'm slightly less motivated to figure out exactly whats going on but I'm sure I'll come back to it at some point and look closer at the states as Endless suggested, maybe cut one more second off the time.
BTW the "exit for" is courtesy of destruk who showed me that way to make a search loop a while back.
Yes all three of those things need to be happening to continue, and it works as i would expect it to - I want all of those thing to be true for each image, otherwise no point in continuing. Yes total=0 is set before the loop starts. The thing is if the construction of the loops was bad, it wouldn't work at all - and since i have split the job into two parts it works well and in half the time (about 5 seconds) that URLtransfer or Texmgr one-at-a-time did. The total variable is just the first thing i could think of to exit the loop when done - I'm sure theres a more professional way to do it but it was never the issue. The weird thing is why the 5 image limit on this code. When i request 5 images, i get 5 images - 1,2,3&4 not necessarily in that order and 5. If I request 10, I get 1,2,3,4 and 10. Same code. Like i said above if I don't include the state-checking, all 10 ID's return with the five downloads. Since I got the time cut in half i'm slightly less motivated to figure out exactly whats going on but I'm sure I'll come back to it at some point and look closer at the states as Endless suggested, maybe cut one more second off the time.
BTW the "exit for" is courtesy of destruk who showed me that way to make a search loop a while back.
Kinetics Screensavers

NewManLiving
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2014
10:51 PM
Re: texmgr requests
Good to know about the exit for ; it is not documented
From the code snippet that you supplied (and I have been doing too much coding lately and it does get to you, so I think I am looking at it correctly ) but
But when you say continue, what do you mean ? You CANNOT exit your while loop unless total = 9 . And in order for total to = 9 those three conditions HAVE TO BE MET at least nine times, not 5 or 4. Unless there is some code to exit the while loop that you do not show. So looking at other state codes would not be an issue here because you MUST HAVE a state code of 3 at least 9 times, regardless of other state codes that may come in. And you MUST find your message ID at least 9 times, in order for total = total + 1, Total does not get changed any other way, and if total is not changed to eventually = 9 then you will be waiting until you press the home button to get out of your loop. So again your three conditions are met exactly as you expect them to be or you would never get out of your while loop. So are you getting a valid bitmap the first time around and if you are what happens with it.
From the code snippet that you supplied (and I have been doing too much coding lately and it does get to you, so I think I am looking at it correctly ) but
But when you say continue, what do you mean ? You CANNOT exit your while loop unless total = 9 . And in order for total to = 9 those three conditions HAVE TO BE MET at least nine times, not 5 or 4. Unless there is some code to exit the while loop that you do not show. So looking at other state codes would not be an issue here because you MUST HAVE a state code of 3 at least 9 times, regardless of other state codes that may come in. And you MUST find your message ID at least 9 times, in order for total = total + 1, Total does not get changed any other way, and if total is not changed to eventually = 9 then you will be waiting until you press the home button to get out of your loop. So again your three conditions are met exactly as you expect them to be or you would never get out of your while loop. So are you getting a valid bitmap the first time around and if you are what happens with it.
My Channels: 2D API Framework Presentation: https://owner.roku.com/add/2M9LCVC
Updated: 11-11-2015 - Completed Keyboard interface
The Joel Channel ( Final Beta )
Updated: 11-11-2015 - Completed Keyboard interface
The Joel Channel ( Final Beta )

TheEndless
Channel Surfer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2014
11:36 PM
Re: texmgr requests
"NewManLiving" wrote:
Good to know about the exit for ; it is not documented
http://sdkdocs.roku.com/display/sdkdoc/ ... entSummary
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)
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)

NewManLiving
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2014
04:28 AM
Re: texmgr requests
Interesting how did I miss that all these months. Possibly because the 5.7 summary does
Not mention it. That is where I look first and if I do not understand it then I would
Click on the link to read it. Is there a continue or a loop
Statement that I missed as well. Now that would save you a bunch of if statements
Perhaps I missed something with the code above as well. Seems to me he is
Getting something at least 9 times or he would never get out of his loop.
Can't say if it's a bitmap though
Not mention it. That is where I look first and if I do not understand it then I would
Click on the link to read it. Is there a continue or a loop
Statement that I missed as well. Now that would save you a bunch of if statements
Perhaps I missed something with the code above as well. Seems to me he is
Getting something at least 9 times or he would never get out of his loop.
Can't say if it's a bitmap though
My Channels: 2D API Framework Presentation: https://owner.roku.com/add/2M9LCVC
Updated: 11-11-2015 - Completed Keyboard interface
The Joel Channel ( Final Beta )
Updated: 11-11-2015 - Completed Keyboard interface
The Joel Channel ( Final Beta )

squirreltown
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2014
06:12 AM
Re: texmgr requests
Well I'm not a professional and I don't know how others do it, but error handling is the normally the last thing i write into the code, I'm usually trying to get something to just work - this was the first time I used the texmgr ID's to track and name the images and I never got past the fact that I was requesting 10 images and getting back 5 every time, that was the point of the original post - not that I wasn't exiting the loop or handling errors, both of which are problems i can solve but were further down the road. In the end I solved it by working around it - splitting the job in two, the reason all the requests don't come back when requested at once will have to wait for another day.
Kinetics Screensavers