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: 
iBicha
Binge Watcher

Label limit count (goto label)

Is there a label limit count per function?

I'm talking about labels, which are named code sections that you can use goto to to jump into. Not Label

I'm seeing errors that happen especially when there's a high number of labels in a function

 

Compilation Failed.
pkg:/source/playlet-text-render-wasm.out.brsLabel/Line Not Found. 
(compile error &h0e) in pkg:/source/playlet-text-render-wasm.out.brs 'w2b_b0_11927667'Label/Line Not Found. 

 

 

0 Kudos
5 REPLIES 5
RokuBen
Community Moderator
Community Moderator

Re: Label limit count (goto label)

The current BrightScript implementation has a limit of 256 labels per function.

0 Kudos
iBicha
Binge Watcher

Re: Label limit count (goto label)

Thanks for confirming

  • I've had cases where I did not reach the 256 limit (some functions are in the one or two hundreds) and I hit the error message above. Is that possible? (hitting the error before reaching the limit?)
  • Is there a way to increase the limit? (I would really appreciate if that's possible)
0 Kudos
RokuBen
Community Moderator
Community Moderator

Re: Label limit count (goto label)

I'm not sure what might be affecting this limit downward.  The only way to increase the limit would be to come work at Roku. 😀

0 Kudos
iBicha
Binge Watcher

Re: Label limit count (goto label)

I will hope that's not going to be the actual only way, but someone could take this feature request and implement it.

Kinda reminds me of https://twitter.com/swaglord__420/status/1377051721655066629?lang=en

0 Kudos
iBicha
Binge Watcher

Re: Label limit count (goto label)

I tried my best to work around the label count limitation by going a different approach, but I got hit with a stack overflow (at #55) which is such a low number.

Honestly this is sad for a language being used in 2023

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.