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
My Channels: 2D API Framework Presentation: https://owner.roku.com/add/2M9LCVC
Updated: 11-11-2015 - Completed Keyboard interface
The Joel Channel ( Final Beta )