MarkRoddy
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2010
08:36 PM
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:
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
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
8 REPLIES 8
bbefilms
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2010
09:06 PM
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.
bcl
Channel Surfer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2010
10:28 PM
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.
bbefilms
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2010
09:38 AM
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.

RokuMarkn
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2010
09:58 AM
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
--Mark

RokuAnthony
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2010
11:46 AM
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
thanks
MarkRoddy
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2010
11:18 AM
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
-Mark

RokuKevin
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2010
05:11 PM
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
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
MarkRoddy
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2010
07:33 PM
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