Fix SeeedStudio recv crash on empty serial read by jafrivacation · Pull Request #2072 · hardbyte/python-can · GitHub
Skip to content

Fix SeeedStudio recv crash on empty serial read#2072

Open
jafrivacation wants to merge 1 commit into
hardbyte:mainfrom
jafrivacation:fix-seeedstudio-empty-read
Open

Fix SeeedStudio recv crash on empty serial read#2072
jafrivacation wants to merge 1 commit into
hardbyte:mainfrom
jafrivacation:fix-seeedstudio-empty-read

Conversation

@jafrivacation

Copy link
Copy Markdown

Summary of Changes

Fix Seeed Studio CAN interface handling of empty reads.

Related Issues / Pull Requests

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Refactoring
  • Other (please describe):

Checklist

  • I have followed the contribution guide.
  • I have added or updated tests as appropriate.
  • I have added or updated documentation as appropriate.
  • I have added a news fragment for towncrier.
  • All checks and tests pass (tox).

Additional Notes

This fixes the crash described in #2024 by guarding against empty reads before trying to parse the returned data. I reproduced the failure path, confirmed that an empty read could be returned, and updated the receive logic so empty data is skipped instead of being treated as a valid frame.

@jafrivacation jafrivacation marked this pull request as ready for review June 29, 2026 16:28
@mergify

mergify Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

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

Successfully merging this pull request may close these issues.

SeeedBus: Crash occsionally.

2 participants