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: 
RokuChris
Roku Employee
Roku Employee

Re: my channel stopped working

"wcfray" wrote:
I can enter categories 1-4, but none after that.


Because the feed requests for the others are 404ing? http://willowcreekfellowship.org/roku/x ... er2014.xml
0 Kudos
EnTerr
Roku Guru

Re: my channel stopped working

In addition to what RokuChris said (the main reason), see this:
"wcfray" wrote:
------ Running ------
...
ParseCategoryNode: categoryLeaf
BRIGHTSCRIPT: ERROR: Runtime: FOR EACH value is Invalid

Contrary to what it says in all-caps, that is not an ERROR per se - it does not stop the program. It is just a Warning message which runtime prints but it flags an issue nevertheless. Many devs will ignore it since, well - channel seems to continue working, hobbled as it may be. A case can be made that it should be a proper fatal error, to stop the channel at the right place but i also see the RokuCo need to maintain backwards compatibility (quirks and bugs included). They have actually done a big, big effort keeping the apparent boxing and "String" vs "roString" behaviors from BrightScript 2 into BrightScript 3.

What the diagnostic message means is: you have somewhere in your code a "FOR EACH someVar IN someEnumerable" loop, where the value of someEnumerable is not really enumerable (array or list or dictionary). In your case it is instead Invalid, which very, very commonly is the result of trying to "dot-access" a non-existing element (either a node of roXml or a member of a dictionary).
0 Kudos
wcfray
Visitor

Re: my channel stopped working

Finally. I want to thank everyone for their contribution. It was all so professional. Ultimately I can only conclude that *_I_* did something in 1 xml file that started an unfortunate chain of events. The result of that one missing quote kinda sorta paniced me. I started making 'fixes'. When I thought I was onto 'the' fix, I just tore through my xml files, almost without abandon. But I did not test each step as I made the changes. My bad. Nothing was working. As I shared bits of what I was doing on the forum I gained much needed insight into what I needed to do. That led to a more careful plodding through my xml files. The first real fix allowed me to side load the channel, which allowed for testing, so that part was crucial. I started from the beginning with basic xml files. I mostly ended up rewriting most of my xml files, testing as I went along. It was a slog, but worth the lessons learned. One of which is to keep a good set of backup files. Again, my thanks to the forum members for their patience with my floundering about.

Of my two remaining issues, one was well addressed by EnTerr in the last message, especially his reference to another post about the Brightscipt fatal vs nonfatal error messages. I am a purist wannabe so I understand the desire for the fatal error, but I don't get paid, so in my practical world I am extremely thankful for those being nonfatal. I still want to fix them so I agree wholeheartedly that a pointer to where those errors are occurring would be wonderful.

The last issue is a "Note: GC - Found 112 orphaned objects (objects in a circular ref loop)." I also want to take care of the dizzy orphans. I don't like to just always ask for help unless I have done due diligence in looking for an answer myself, but, boy am I tired, so if anyone has any pity for me....
0 Kudos
TheEndless
Channel Surfer

Re: my channel stopped working

"wcfray" wrote:
The last issue is a "Note: GC - Found 112 orphaned objects (objects in a circular ref loop)." I also want to take care of the dizzy orphans.

If you're seeing this when exiting the channel with the Home button, you're probably OK. Because Home kills the app without giving you an opportunity to clean up, orphans are usually expected. If you're seeing this when you exit with the Back button, then it could be a little harder to find them.
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
wcfray
Visitor

Re: my channel stopped working

I am seeing the Note message in the debug screen when I enter the channel.
0 Kudos
TheEndless
Channel Surfer

Re: my channel stopped working

"wcfray" wrote:
I am seeing the Note message in the debug screen when I enter the channel.

That note is when you exit the channel. If you're seeing it at the beginning, then it's most likely the previous instance of your app being killed when you sideload the new version.
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
Roku Guru

Re: my channel stopped working

"wcfray" wrote:
The last issue is a "Note: GC - Found 112 orphaned objects (objects in a circular ref loop)." I also want to take care of the dizzy orphans. I don't like to just always ask for help unless I have done due diligence in looking for an answer myself, but, boy am I tired, so if anyone has any pity for me....

Don't worry about it!
When you start seeing 100x more orphans, come back and we can ponder over it. That message just means that during routine cleanup the "janitor" (garbage collector) has found some memory that should have been free but it wasn't. It takes care of it; in particular memory gets flushed every time channel start/exits (that's when GC mumbles to itself "Found 112 orphaned objects"), so no worries. Very easy to reproduce (intentionally):
BrightScript Debugger> gc
total number of current bscs: 41
number of root bscs: 12
number of orphaned bscs: 0
BrightScript Debugger> loop = { }
BrightScript Debugger> loop.loop = loop
BrightScript Debugger> loop = invalid
BrightScript Debugger> gc
total number of current bscs: 42
number of root bscs: 12
number of orphaned bscs: 1 '<<< Woot! we orphaned one, the ex-content of `loop`

The "FOR EACH value is Invalid" diagnostic is much more important to your case, since no way it intended it that way (which i can tell since you don't know where it comes from 🙂 ). If you can live with it, orphans are much less of a concern.
0 Kudos
wcfray
Visitor

Re: my channel stopped working

Don't worry about it! When you start seeing 100x more orphans, come back and we can ponder over it.

Got it. <stopped>worrying</stopped> P.S. NOW I know what the GC stands for, and it is apparently not General Compiler?

(which i can tell since you don't know where it comes from 🙂 )

True, but a previously referenced post (from an ostensibly more knowledgeable forum member) also complained that the error message does not tell you where the error was found. I could probably be accurately described as script kiddie, as I am using modified scripts from Roku. I admit that slogging through the sdkdocs can be overwhelming to me. I do try though, and will continue to do so. Since I have not written my own scripts, then is it not reasonable to presume that those errors might be coming from those ever so slightly modified, but canned scripts?

Note: No disrespect of any kind is meant in anything I have to say. If you took my meaning in the worst possible way, then you took my meaning all wrong. No undercurrent either. I have been impressed with the tone of this forum and I hope to be able to continue to participate and learn. I try to use emoticons sparingly because even they can be misconstrued.
0 Kudos
EnTerr
Roku Guru

Re: my channel stopped working

"wcfray" wrote:
Got it. <stopped>worrying</stopped> P.S. NOW I know what the GC stands for, and it is apparently not General Compiler?

Right. It ain't MajGen. Failure either 🙂
It's just the "lowly" janitor that cleans the office and you may hear them grumbling that we throw too much trash on the floor instead of the trash cans. Make no mistake, GC's role is important and makes our lives easier - instead of say "C/C++ Corp" offices where everybody at all times should use the recycling bin (or else after a few days they'd run out of office space and halt). It also makes sense to review the code if GC has to spend too much time cleaning said "orphans". But a few droppings... meh.

(which i can tell since you don't know where it comes from 🙂 )
True, but a previously referenced post (from an ostensibly more knowledgeable forum member) also complained that the error message does not tell you where the error was found. I could probably be accurately described as script kiddie, as I am using modified scripts from Roku. I admit that slogging through the sdkdocs can be overwhelming to me. I do try though, and will continue to do so. Since I have not written my own scripts, then is it not reasonable to presume that those errors might be coming from those ever so slightly modified, but canned scripts?

No worries, that was not critique of you but just an observation. Was pointing out it was not something you planned/intended, like "i won't check for invalid here because i know FOR EACH will skip on invalid" - or you would have known where you made such decision. You likely inherited the not-checking-for-invalid-after-using-some-roXML-API from some example script, sure.

Now regarding why Warning messages like this cannot show the source line#, see RokuKC's "but not as easy as you might think." I can extrapolate (speculate) on that, probably the VM handles a proper Error with a C++ `throw` that un-winds the stack and when `catch`-ed upstream, the source script context (incl. line#) is available - but when down-in-the-trenches printing a "not-fatal error" (aka Warning) like this and continuing execution, line# is not known.

Note: No disrespect of any kind is meant in anything I have to say. If you took my meaning in the worst possible way, then you took my meaning all wrong. No undercurrent either. I have been impressed with the tone of this forum and I hope to be able to continue to participate and learn. I try to use emoticons sparingly because even they can be misconstrued.

Mmm? I am confused here. I had no issue with anything you have said, the point i was trying to make was that if i were to worry about something, orphan instances would me buch further down my list than "FOR EACH var IN invalid" cases. And on top of the list will be "the channel working", of course 😄

Indeed, we have a helpful micro-community here. It is the sole source of help outside of the incomplete in parts SDK documentation.
Off-the-cuff, i would like to pay tribute to the following people whose posts over the years have helped me:
  • RokuMarkn

  • TheEndless

  • RokuJoel

  • greubel

  • RokuChris

  • RokuKC

  • squirreltown

  • destruk

  • renojim

  • belltown

  • gonzotek

Thank you!
0 Kudos
wcfray
Visitor

Re: my channel stopped working

Mmm? I am confused here. I had no issue with anything you have said

Thank you. In person I know can come across as offputting when I ask certain questions in the way I ask them. I pick my words very carefully, but I know I don't always execute the emotion part very well, hence my comment: no undercurrent. I guess I was second guessing myself online since I know I can come across that way in person sometimes. I just want to stay in everyone's good graces. <defensive mode>off</defensive mode> 😉
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.