dev builds
themes manual
device status forums
mailing lists
IRC bugs
dev guide

Rockbox mail archive

Subject: Warning to PLUGIN authors
From: BlueChip (
Date: 2004-06-06

Hi tech-heads,

I've just found a gorgeous bug.

I found it during tests on the new audio plugin, but it could explain the
random crashes in Othelo as well. Of course, if any other plugin author
has nicked or implemented the same code it will effect you too.

The problem is, in simple terms, that rb->button_get(false)
does not issue a yield(), but rb->button_get(true) does.

This MAY be an oversight in the core code; If it was deliberate I openly
contest the decision. But anyway, the solution is simple:
Issue your own yield().

I use code which does (by example) animation while waiting for a key:
for (key=0; !key; key=rb->button_get(false))
This must be changed for:
for (key=0; !key; key=rb->button_get(false), rb->yield())

Happy hacking,



Page was last modified "Jan 10 2012" The Rockbox Crew