Rockbox mail archiveSubject: Warning to PLUGIN authors
Warning to PLUGIN authors
From: BlueChip <cs_bluechip_at_webtribe.net>
Date: Sun, 06 Jun 2004 02:37:59 +0100
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())
Received on 2004-06-06