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

Issue Causing DVP to Crash

I've come across a "bug" that is causing my DVP to crash repeatably (I hesitate to use the term bug as I was doing something more or less incorrect with a brightscript object).

The issue seems to occur when iterating over an array that does not have all it's values specified. I have a specific code segment below which will reproduce the issue (every time I've run it at least). After executing the code, the box will freeze for a few seconds before rebooting. I do not see any output on the debug console except for my telnet client telling me that the connection was closed by the remote host.

Iterating over an array which has 'empty' positions is probably not something I should be doing (and not what I had meant to do), but going through a reboot also doesn't seem like a good reaction.

My DVP is running v2.4 - build 357

Here is the code to reproduce:
Sub Main()
array = CreateObject("roArray", 3, false)
array[1] = 1
array[2] = 2
for each i in array
print i
end for
End Sub


Also, I wasn't sure what the desired channel for reporting bugs is. If there is a bug tracker some where I should report this to, please let me know.

-Mark
0 Kudos
8 REPLIES 8
bbefilms
Visitor

Re: Issue Causing DVP to Crash

"MarkRoddy" wrote:
Here is the code to reproduce:
Sub Main()
array = CreateObject("roArray", 3, false)
array[1] = 1
array[2] = 2
for each i in array
print i
end for
End Sub




You're trying to print an uninitialized array element as the first element of the loop (array[0]); my experience is that this will cause the box to crash - I don't think that's a bug per se.
0 Kudos
bcl
Channel Surfer

Re: Issue Causing DVP to Crash

I disagree. It should print something like 'None' or 'NaN' but not bring down the whole thing. Since we are parsing XML from remote feeds it is quite possible that we could end up with uninitialized variables at some point.
0 Kudos
bbefilms
Visitor

Re: Issue Causing DVP to Crash

"bcl" wrote:
Since we are parsing XML from remote feeds it is quite possible that we could end up with uninitialized variables at some point.


Your code should be checking for that.
0 Kudos
RokuMarkn
Visitor

Re: Issue Causing DVP to Crash

Nothing that a brightscript app does should cause the box to crash. A bug in the app may of course cause the app to crash, but if the box crashes it's a bug in the firmware.

--Mark
0 Kudos
RokuAnthony
Visitor

Re: Issue Causing DVP to Crash

uninitialized array elements should return type/value "invalid". If they don't, its a bug. I'll have someone put this in our internal bug system.

thanks
0 Kudos
MarkRoddy
Visitor

Re: Issue Causing DVP to Crash

Has a fixed for this been pushed out yet? I've hit the same behavior (unit crashing and rebooting) in a similar but not exactly equivalent situation, and I wasn't sure if I had hit the same bug or not.

-Mark
0 Kudos
RokuKevin
Visitor

Re: Issue Causing DVP to Crash

Mark,

There is no public bug tracker, so this forum is the best place to post bugs.

I've confirmed that this script still causes our firmware to crash and have opened a bug on it. I do not have a date on when a fix would be rolled out, so try to avoid uninitialized array elements in your code....

--Kevin
0 Kudos
MarkRoddy
Visitor

Re: Issue Causing DVP to Crash

"RokuKevin" wrote:
Mark,

There is no public bug tracker, so this forum is the best place to post bugs.

I've confirmed that this script still causes our firmware to crash and have opened a bug on it. I do not have a date on when a fix would be rolled out, so try to avoid uninitialized array elements in your code....

--Kevin


Kevin,
Are there any other known issues which would cause the unit to reset itself? I ask as I've found what I think is a separate issue, but I'm having trouble isolating it as it is not consistently causing my unit to crash.

-Mark
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.