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

The app crashes if I attach a usb device, then deny the permissions and detach the usb device #52

Closed
josejuansanchez opened this issue Jun 19, 2016 · 5 comments

Comments

@josejuansanchez
Copy link
Contributor

You can replicate the crash following the next steps:

  1. Attach the usb device
  2. Deny the permissions
  3. Detach the usb device
josejuansanchez added a commit to josejuansanchez/UsbSerial that referenced this issue Jun 19, 2016
@bmdalton
Copy link

Update: if you have the issue of the app crashing after you detach the USB device (when it was functionally working at whatever you need it to do), this does NOT fix that.

@felHR85
Copy link
Owner

felHR85 commented Jun 28, 2016

This fix is still not merged. @bmdalton Did you try it on the pull request branch?

@bmdalton
Copy link

I have. I have a copy of the code running in Android Studio, so I physically made the changes there. In both the original and the updated version, I have the same crash, which I have discovered is the result of modification of one line of code.

In your sample app, you have
screen shot 2016-06-28 at 4 02 45 pm
while I have updated this to be
screen shot 2016-06-28 at 4 03 10 pm

As you can see, I change "mActivity.get().display.append(data);" to "mActivity.get().setData(dataS);" which subsequently causes the crash. When I comment out that line, the app does not crash when I disconnect the USB device however it also doesn't function.

@josejuansanchez
Copy link
Contributor Author

@bmdalton You are right, the proposed PR in #53 only solves the issue described in the title :)

felHR85 added a commit that referenced this issue Jun 30, 2016
@abhishekkumar1902
Copy link

any solutions for this crash issue?

@felHR85 felHR85 closed this as completed Mar 9, 2019
flo80 pushed a commit to flo80/UsbSerial that referenced this issue Jul 12, 2023
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

4 participants