johnmarsden
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2018
03:06 PM
Hilarious Roku bug of the day: .delete(xyz)
I found that using
wasn't working 100% as expected. If I tried to access objects in there later, the list didn't shift.. or something. Not sure what exactly happens behind the scenes, but it wasn't working correctly.
I would delete index #1 at some point.. then add another.. then try to access listObject[1], which would always crash; consistently.
Then I tried debugging it by doing:
and it would print the object out as expected... but also, it didn't break anymore.
This is 100% consistent. I tested multiple times, multiple scenarios, with and without the print log. I did it with the debugger on and off.
When the print command was commented out... it crashed.
When the print command was uncommented... it worked.
Every. Single. Time.
listObject.delete(index)
wasn't working 100% as expected. If I tried to access objects in there later, the list didn't shift.. or something. Not sure what exactly happens behind the scenes, but it wasn't working correctly.
I would delete index #1 at some point.. then add another.. then try to access listObject[1], which would always crash; consistently.
Then I tried debugging it by doing:
listObject.delete(index)
print listObject
and it would print the object out as expected... but also, it didn't break anymore.
This is 100% consistent. I tested multiple times, multiple scenarios, with and without the print log. I did it with the debugger on and off.
When the print command was commented out... it crashed.
When the print command was uncommented... it worked.
Every. Single. Time.
5 REPLIES 5
johnmarsden
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2018
03:21 PM
Re: Hilarious Roku bug of the day: .delete(xyz)
Also tried a variety of these mixtures:
Shaking my head in disbelief.
listObject.delete(index);
' listObject = listObject FAIL
' print listObject.peek() FAIL
' print listObject.count() FAIL
' print listObject[0] WORKS
' print listObject WORKS
' print listObject.resetIndex() WORKS
Shaking my head in disbelief.
joetesta
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2018
05:20 PM
Re: Hilarious Roku bug of the day: .delete(xyz)
schrodingers cat? it only resolves when you force it to by looking at it first.
aspiring
NB_
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2018
07:16 PM
Re: Hilarious Roku bug of the day: .delete(xyz)
my naive attempt to repro failed. not even sure if that was about roList or else.
MWE, please?
MWE, please?
johnmarsden
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2018
11:52 AM
Re: Hilarious Roku bug of the day: .delete(xyz)
"RokuNB" wrote:
my naive attempt to repro failed. not even sure if that was about roList or else.
MWE, please?
That might be pretty tough to make considering the structure. I could maybe try, but in the meantime, any thoughts on why this might be a thing?


Roku Employee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2018
05:26 PM
Re: Hilarious Roku bug of the day: .delete(xyz)
"johnmarsden" wrote:"RokuNB" wrote:
my naive attempt to repro failed. not even sure if that was about roList or else.
MWE, please?
That might be pretty tough to make considering the structure. I could maybe try, but in the meantime, any thoughts on why this might be a thing?
From the APIs listed it sounds like you are referring to roList. Are you creating the list with CreateObject, or getting it from some other source API?
roList is not really a frequently used construct, in my experience. Generally roArray has better capabilities for most uses.
Are you using roList in conjunction with SceneGraph components or possibly some other unusual scenario?
It's certainly possible that there are bugs, and if so any more detailed information you can provide would be helpful.