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: 
malort
Visitor

Reboot while setting uninitialized value in roAssociativeArr

Roku firmware bug?
model: Roku 3 (fw: 6.1 b5604)

Example of expected results

BrightScript Debugger> aa = {}
BrightScript Debugger> ?type(value)
<uninitialized>
BrightScript Debugger> key = "string"
BrightScript Debugger> ?type(key)
String
BrightScript Debugger> aa[key] = value
Use of uninitialized variable. (runtime error &he9) in $LIVECOMPILE(171)
BrightScript Debugger> key$ = "string"
BrightScript Debugger> ?type(key)
String
BrightScript Debugger> aa[key] = value
Use of uninitialized variable. (runtime error &he9) in $LIVECOMPILE(174)


Crash/Reboot

BrightScript Debugger> key = String(1, "a")
BrightScript Debugger> ?type(key)
String
BrightScript Debugger> aa[key] = value
Connection closed by foreign host.


I understand this code would crash a channel and one should validate the variable before hand, but obviously we all make mistakes. A crash is perfect because it allows us to debug and fix the issue. With a reboot, it's close to impossible to find the issue.
0 Kudos
1 REPLY 1
RokuKC
Roku Employee
Roku Employee

Re: Reboot while setting uninitialized value in roAssociativ

Thank you for the bug report, we'll look into it.
0 Kudos