# 5.4 bug? 50% chance of single-buffered roScreen showing up

**URL:** <https://forum.developer.roku.com/t/5-4-bug-50-chance-of-single-buffered-roscreen-showing-up/3233>\
**Category:** Archived\
**Tags:** roku-developer-program\
**Created:** [April 17, 2014, 7:06pm UTC](https://forum.developer.roku.com/t/5-4-bug-50-chance-of-single-buffered-roscreen-showing-up/3233 "2014-04-17T19:06:43Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![EnTerr](https://avatars.discourse-cdn.com/v4/letter/e/ba9def/32.png) [@EnTerr](https://forum.developer.roku.com/u/EnTerr)\
**Post date:** [April 17, 2014, 7:06pm UTC](https://forum.developer.roku.com/t/5-4-bug-50-chance-of-single-buffered-roscreen-showing-up/3233/1 "2014-04-17T19:06:43Z")

</div>

Seems I discovered a bug in the new 5.4 firmware yesterday. The behavior is that a single-buffered roScreen has 50/50 chance of showing on screen - and when it does not show, program does not exit abruptly; everything works smooth - except roScreen is not visible, instead the “Loading…” poster stays there. I think this is 5.4-related because it happens on HDMI Stick and also on 3100 player with 5.4 - but not on Roku3 with 5.3. When i noticed it, I tested by launching the code 10 times one after another, ECP or remote - and in half the cases roScreen shows up, in the rest it does not; there was no particular pattern (e.g. not “every other time”).

Here is the code [viewtopic.php?f=34&t=64834#p437652](http://forums.roku.com/viewtopic.php?f=34&t=64834#p437652) - followed by discussion with TheEndless, who - much obliged! - vetted it on his device, noted it does not happen with double-buffered roScreen and came with the theory that it depends on when (i.e. in which buffer) the loading screen got interrupted by the creation of roScreen. Great thinking! Seems to me a very likely explanation.

Severity: if this is indeed 5.4-related behavior, it may mean channels built on single-buffered roScreen will have 50% chance of meatballs - i mean seemingly not working. Repeating the start once or twice more will work.

---

<div class="post-metadata">

**Author:** ![TheEndless](https://avatars.discourse-cdn.com/v4/letter/t/ec9cab/32.png) [@TheEndless](https://forum.developer.roku.com/u/TheEndless)\
**Post date:** [April 17, 2014, 7:57pm UTC](https://forum.developer.roku.com/t/5-4-bug-50-chance-of-single-buffered-roscreen-showing-up/3233/2 "2014-04-17T19:57:17Z")

</div>

> “EnTerr” wrote:  
> and when it does not show, program does not exit;  
> Did you define a message port for the screen? The code you posted in the other thread didn’t. I’m not sure what you mean by “program does not exit,” but that part could be related to your Wait() waiting indefinitely on a non-existent port.

---

<div class="post-metadata">

**Author:** ![EnTerr](https://avatars.discourse-cdn.com/v4/letter/e/ba9def/32.png) [@EnTerr](https://forum.developer.roku.com/u/EnTerr)\
**Post date:** [April 17, 2014, 9:08pm UTC](https://forum.developer.roku.com/t/5-4-bug-50-chance-of-single-buffered-roscreen-showing-up/3233/3 "2014-04-17T21:08:16Z")

</div>

> “TheEndless” wrote:  
> Did you define a message port for the screen? The code you posted in the other thread didn’t. I’m not sure what you mean by “program does not exit,” but that part could be related to your Wait() waiting indefinitely on a non-existent port.  
> It means “program behaves as expected” - i’ll add “abruptly” above. roScreen comes with existent port, it would be interesting to discuss why (and what happens if program does not drain the queue - does it overflow and/or crash eventually) - but that’s another story.

---

<div class="post-metadata">

**Author:** ![TheEndless](https://avatars.discourse-cdn.com/v4/letter/t/ec9cab/32.png) [@TheEndless](https://forum.developer.roku.com/u/TheEndless)\
**Post date:** [April 17, 2014, 11:54pm UTC](https://forum.developer.roku.com/t/5-4-bug-50-chance-of-single-buffered-roscreen-showing-up/3233/4 "2014-04-17T23:54:26Z")

</div>

> “EnTerr” wrote:  
> It means “program behaves as expected” - i’ll add “abruptly” above.  
> Gotcha.. I was reading it as though you were saying you couldn’t get it to exit on keypress, because the Wait hung indefinitely.

> “EnTerr” wrote:  
> roScreen comes with existent port, it would be interesting to discuss why (and what happens if program does not drain the queue - does it overflow and/or crash eventually) - but that’s another story.  
> Really? That is interesting. Did you discover that by accident? Good question about draining the queue.. that would be a memory leak, but I suppose it’d be pretty rare to have a screen that you didn’t listen to.

---

<div class="post-metadata">

**Author:** ![EnTerr](https://avatars.discourse-cdn.com/v4/letter/e/ba9def/32.png) [@EnTerr](https://forum.developer.roku.com/u/EnTerr)\
**Post date:** [April 18, 2014, 2:30am UTC](https://forum.developer.roku.com/t/5-4-bug-50-chance-of-single-buffered-roscreen-showing-up/3233/5 "2014-04-18T02:30:03Z")

</div>

> “TheEndless” wrote:
> 
> > “EnTerr” wrote:  
> > roScreen comes with existent port, it would be interesting to discuss why (and what happens if program does not drain the queue - does it overflow and/or crash eventually) - but that’s another story.  
> > Really? That is interesting. Did you discover that by accident? Good question about draining the queue.. that would be a memory leak, but I suppose it’d be pretty rare to have a screen that you didn’t listen to.  
> > Yes. Being a newb, i wondered: if nobody is listening, does roScreen still send messages? (compare, “[If a tree falls in the forest…](https://en.wikipedia.org/wiki/If_a_tree_falls_in_a_forest)”) - so i checked getMessagePort(). Little did i know that all (other) ro-components come with port = invalid. Go figure. It’s probably peculiarity of the implementor, after all roScreen is oddball in that it has no Show()/Close() and does not stack with the other components.

---

<div class="post-metadata">

**Author:** ![RokuJoel](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@RokuJoel](https://forum.developer.roku.com/u/RokuJoel)\
**Post date:** [April 18, 2014, 4:31pm UTC](https://forum.developer.roku.com/t/5-4-bug-50-chance-of-single-buffered-roscreen-showing-up/3233/6 "2014-04-18T16:31:20Z")

</div>

Verified this on 3100x on 5.4 b3339 - is that the build version you are on EnTerr?

- Joel

---

<div class="post-metadata">

**Author:** ![EnTerr](https://avatars.discourse-cdn.com/v4/letter/e/ba9def/32.png) [@EnTerr](https://forum.developer.roku.com/u/EnTerr)\
**Post date:** [April 18, 2014, 6:17pm UTC](https://forum.developer.roku.com/t/5-4-bug-50-chance-of-single-buffered-roscreen-showing-up/3233/7 "2014-04-18T18:17:17Z")

</div>

> “RokuJoel” wrote:  
> Verified this on 3100x on 5.4 b3339 - is that the build version you are on, EnTerr?  
> 5.4.3358  
> But also on 5.4.2525 on Stick #3500, hence i believe behavior is endemic to 5.4.\*

---

<div class="post-metadata">

**Author:** ![coolbits](https://avatars.discourse-cdn.com/v4/letter/c/7feea3/32.png) [@coolbits](https://forum.developer.roku.com/u/coolbits)\
**Post date:** [June 30, 2014, 3:04pm UTC](https://forum.developer.roku.com/t/5-4-bug-50-chance-of-single-buffered-roscreen-showing-up/3233/8 "2014-06-30T15:04:25Z")

</div>

Hi,  
Can anybody please provide a fix for this problem?

Thanks in advance,  
Chandana
