This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#10097 - Sometimes keys do not work after exiting plugins
Attached to Project:
Rockbox
Opened by Michael Chicoine (mc2739) - Sunday, 05 April 2009, 06:37 GMT+2
Last edited by Bertrik Sikken (bertrik) - Sunday, 10 October 2010, 16:14 GMT+2
Opened by Michael Chicoine (mc2739) - Sunday, 05 April 2009, 06:37 GMT+2
Last edited by Bertrik Sikken (bertrik) - Sunday, 10 October 2010, 16:14 GMT+2
|
Detailssvn = r20619 and prior
fails on device and sim 1. press long select on playlist 2. scroll to open with 3. select search 4. enter search string (if you like - not really needed to see failure) 5. press play to leave virtual keyboard screen The search plugin performs the search, displays a "Done" splash and exits. If you try to use the wheel, there is no response. If you press any button, the first press is ignored. The next button press or wheel movement will work normally. In the sim, after running the search plugin, the first button pressed or the first press of the simulated wheel buttons will not work. After the first press, all buttons work normally. The attached patch adds a 'rb->get_action' before exiting which allows normal button and wheel response after the plugin exits. |
This task depends upon
Closed by Bertrik Sikken (bertrik)
Sunday, 10 October 2010, 16:14 GMT+2
Reason for closing: Fixed
Additional comments about closing: Committed plugin_button_clear.patch as SVN r28232
Sunday, 10 October 2010, 16:14 GMT+2
Reason for closing: Fixed
Additional comments about closing: Committed plugin_button_clear.patch as SVN r28232
int count = queue_count(&button_queue);
splashf(HZ, "%d", count);
Though somehow I suspect the action code or the buffon driver to be at fault since get_action should return from its own wait call if there are in fact any messages.
When a playlist ends naturally (not by pressing stop, etc) and the last input while playing was to change the volume with the scrollwheel in the WPS, the same 'wheel lock' problem occurs.
When automatically returned to the menu or file list, moving the wheel causes the backlight to illuminate, but is otherwise ignored, however many times you move it. The first button press is also ignored, after which everything works normally.
This is on the e200v1 running r21884, and older versions dating back to at least the time this bug was first submitted.
FS#10787)I can't reproduce your bug on my e200, does the bug still exist?
I have also reproduced the problem reported above by Linton Dawe. This tends to rule out that this is strictly a plugin problem.
Bizarrely the bug doesn't occurs in game menu. e200, Fuze
Please test and report any results here.
http://www.rockbox.org/tracker/task/10883 has a patch as well, can someone have a look at/test that one?
I have tested http://www.rockbox.org/tracker/task/10883. Although it does allow the scrollwheel to function, there is still a lost scrollwheel transition and a lost keypress.
What I know is that scrollwheels don't generate BUTTON_REL when they're untouched because they post to the button queue out of the normal control flow (the button tick task handles OR'ing with BUTTON_REL, but the button tick doesn't mess with the wheels).
I haven't noticed that this bug appears on a non-scrollwheel target too, so I connect this somehow.
* start dict plugin, this shows a keyboard input prompt
* exit the plugin by a short press of the POWER button
* first key after this is ignored in the plugin menu
I looked at this problem last night in the sim, checking what goes into the button queue and what is pulled out again. Here's my conclusion about what happens:
* the dict plugin causes both a POWER key *press* and a POWER key *release* event to be submitted to the button queue
* when exiting, the plugin exits on the *press* of the power button. After plugin exit, button_clear_queue() is called in plugin.c, clearing the key *release* event.
* in action.c function get_action_worker, a key context change is detected (line 207) which causes it to ignore all further key events until a key release is seen (I think this includes scrollwheel events!).
* since the key release event was cleared just after the plugin exit, *another* key press/release is needed to continue key event processing.