Fix ASCReader Crash on "Start of Measurement" Line by RitheeshBaradwaj · Pull Request #1811 · hardbyte/python-can

Skip to content

Navigation Menu

Sign in

Appearance settings

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Conversation

@RitheeshBaradwaj

Copy link

Contributor

@RitheeshBaradwaj RitheeshBaradwaj commented

Jul 8, 2024

edited

Loading

Summary

This PR addresses an issue where the ASCReader crashes when encountering the line 0.000000 CANFD Start of measurement in ASC log files. This line is a combination of two different conventions and should not contain the "CANFD" flag.

Changes

  • Added logic in the __iter__ method of ASCReader to skip lines matching the regex pattern for "Start of measurement".
  • This ensures that such special indicator lines are handled separately and do not cause parsing errors.

Fixes #1786.

@RitheeshBaradwaj

Copy link

Contributor Author

@hardbyte I am unable to merge the PR. Could you please merge it?

hardbyte reacted with thumbs up emoji

@hardbyte hardbyte merged commit d34b2d6 into hardbyte:main

Jul 26, 2024

@RitheeshBaradwaj RitheeshBaradwaj deleted the bugfix/asc-reader-invalid-line-crash branch

July 26, 2024 22:24

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@hardbyte hardbyte hardbyte approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Crash in ASCReader

2 participants

@RitheeshBaradwaj @hardbyte