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

AndrOBD crashes when establishing USB connection to ELM327 adapter #285

Open
20210213 opened this issue Dec 14, 2024 · 2 comments
Open

AndrOBD crashes when establishing USB connection to ELM327 adapter #285

20210213 opened this issue Dec 14, 2024 · 2 comments
Labels

Comments

@20210213
Copy link

Describe the bug

When establishing the USB connection in the usual way, recent versions of AndrOBD crash as follows:

Steps to reproduce the behavior:

  1. plug USB cable from the adapter into the cellphone
  2. confirm to open AndrOBD
  3. The proposed USB connection is displayed. Click on it to confirm.
  4. Android displays that AndrOBD has crashed.

Expected behavior

Instead of crashing according to item 4, AndrOBD should open and communicate with the ELM327 adapter.

AndrOBD Debug log files

Please attach AndrOBD debug log files.
AndrOBD.log.1.txt

Important details on your environment:

  • Android OS version: 9
  • AndrOBD version: 2.6.13
  • OBD adapter type: noname ELM327 USB adapter

Additional context

Note: When no USB connection is established, e. g. with no cable connected to the cell phone, AndrOBD 2.6.13 will start.

The last version which worked OK with the same adapter was 2.6.7.

We encountered an identically looking issue already in February 2021; it was fixed after a bug report.

@fr3ts0n
Copy link
Owner

fr3ts0n commented Dec 15, 2024

Thank you for your report,
I can reproduce the problem on connecting to my USB adapter.
(Pls remind me to include this as a smoke test for releases)

I can see following error message in the android logcat output when the USB device class is instantiated:
java.lang.NullPointerException: Attempt to invoke virtual method 'int android.hardware.usb.UsbEndpoint.getMaxPacketSize()' on a null object reference

I'll contact @mik3y who is the developer of the USB device library used by AndrOBD.
Reverting the library to the version 3.3, which was used with V2.6.7 (your reported last known good version) would fix the problem.
However, there are several extensions and fixes listed in the changelog of the library.

@fr3ts0n fr3ts0n added the bug label Dec 15, 2024
@fr3ts0n
Copy link
Owner

fr3ts0n commented Dec 15, 2024

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

No branches or pull requests

2 participants