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

Prevent exception in PCDReader for misformed PCD files #4566

Merged
merged 3 commits into from
Feb 2, 2021

Conversation

mvieth
Copy link
Member

@mvieth mvieth commented Jan 5, 2021

No description provided.

@mvieth mvieth added needs: code review Specify why not closed/merged yet module: io changelog: fix Meta-information for changelog generation labels Jan 5, 2021
@larshg
Copy link
Contributor

larshg commented Jan 5, 2021

Is it manually edited files, since its incomplete? Or a failure at writing a file somehow?

Maybe print the index number if one wants to find it (not sure if header is a fixed line count as well) ?

@mvieth
Copy link
Member Author

mvieth commented Jan 6, 2021

Is it manually edited files, since its incomplete? Or a failure at writing a file somehow?

The files that are written with the "official" PCDWriter should always be correct. Yes, manual editing could create such a problem, or any kind of corruption.

Maybe print the index number if one wants to find it (not sure if header is a fixed line count as well) ?

I don't see an easy way to print the actual line number of the PCD file, but instead the point index is printed now. That at least gives a hint where the problem is.

io/src/pcd_io.cpp Outdated Show resolved Hide resolved
io/src/pcd_io.cpp Outdated Show resolved Hide resolved
io/src/pcd_io.cpp Outdated Show resolved Hide resolved
@kunaltyagi kunaltyagi merged commit b980822 into PointCloudLibrary:master Feb 2, 2021
@mvieth mvieth deleted the pcd_io_line_check branch February 8, 2021 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog: fix Meta-information for changelog generation module: io needs: code review Specify why not closed/merged yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants