Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Bug: ASCII PLY parsing fails on files with \r line endings due to binary mode

Aperta
#45 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
cpp

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

Lingua principale
C++
Stelle
406
Fork
74
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di nmwsharp/happly

Tutte le issue di nmwsharp/happly

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.