Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WaiterThread will spin and crash device #66

Open
swilson opened this issue Jan 7, 2019 · 0 comments
Open

WaiterThread will spin and crash device #66

swilson opened this issue Jan 7, 2019 · 0 comments

Comments

@swilson
Copy link

swilson commented Jan 7, 2019

If another app forcibly claims the UsbInterface, deviceConnection.bulkTransfer will immediately return -1 causing the MidiInputDevice WaiterThread to spin forever at thread priority 8. This will eventually lock up and crash most devices; the LAST KMSG bugreport logs are full of:

[11053.427626] usb 1-1: usbfs: process 7851 (2].WaiterThread) did not claim interface 3 before use

Fixed here by adding an error counter to the WaiterThread and bailing if it reaches an arbitrary watermark. Not ideal; really the whole stack should shut down if the interface gets claimed by someone else (kind of ridiculous the Android API allows this to occur in the first place).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant