Bug: ASCII PLY parsing fails on files with \r line endings due to binary mode
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- cpp
- Domain
- computer-graphics
Research direction
Start at PLYData(filename) and trace the ASCII parser used when the binary flag is false. Reproduce the failure with an ASCII PLY containing standalone \r blank lines, then verify that equivalent files using \n, \r\n, and \r parse successfully without treating blank lines as data.
Written by the indexing model from the issue text.
Description
When loading an ASCII PLY file via PLYData(filename), the parser fails to properly handle empty lines containing standalone \r (Carriage Return) characters. This occurs because the file is opened in binary mode (preserving raw \r), but the ASCII parser does not explicitly skip them. As a result, lines with \r are treated as valid content, leading to crashes.
Expected behavior:
The parser should safely ignore empty lines regardless of line ending type (\n, \r\n, or \r).
Reproduction:
- Create an ASCII PLY file with empty lines between header and data.
- Load it with happly::PLYData plyIn("file.ply", false);
- Parsing will fail when reading element data.
fily.ply:
ply
format ascii 1.0
element vertex 1
property float x
property float y
property float z
end_header
0.0 0.0 0.0
- Dominant language
- C++
- Stars
- 406
- Forks
- 74
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from nmwsharp/happly
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 3/5 1-2 days Newbie friendliness 56/100
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
duckdb/duckdb-wasm#2258 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
objectionary/eo-graphs#75 ·
-
Coarray integration tests carry no LABELS, so run_tests.py silently skips them under every backend Opencoarray
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
FISCO-BCOS/FISCO-BCOS#5642 ·