r-lidar / rlas

R package to read and write las and laz files used to store LiDAR data
https://cran.r-project.org/package=rlas
GNU General Public License v3.0
34 stars 14 forks source link

lidR::readLAS for most las files even lesser 50KB is crashing R #59

Open nidhi23ug opened 1 year ago

nidhi23ug commented 1 year ago

Newest version of lidR:: readLas is crashing R, even for the las files that are smaller than 50Kb (files aren't corrupt). I can read them in CloudCompare, python but not in lidR? The error message I got was An irrecoverable exception occurred. R is aborting now *** caught segfault *** address (nil), cause 'memory not mapped'`

I can send one such file for your testing.

Jean-Romain commented 1 year ago

I indeed need the file. Have you ever been able to read the file in R?

nidhi23ug commented 1 year ago

Thanks for your quick response. The attached is one of the las file that is crashing R .

Jean-Romain commented 1 year ago

rlas::read.las("~/Téléchargements/08nd0862.dams__clipped_polygon_2.las")

Confirmed

Jean-Romain commented 1 year ago

Seems to be related to extrabytes

# works
rlas::read.las("~/Téléchargements/08nd0862.dams__clipped_polygon_2.las", select = "")
rlas::read.las("~/Téléchargements/08nd0862.dams__clipped_polygon_2.las", select = "* -0")

# crashes
rlas::read.las("~/Téléchargements/08nd0862.dams__clipped_polygon_2.las", select = "1")
nidhi23ug commented 1 year ago

great this works. Thank you

Jean-Romain commented 6 months ago

I don't know where I put your file. Did you send it to me by email? What is your name so I can find your email.

dimfalk commented 2 weeks ago

nidhi23ug commented on Jan 21, 2023 via email

Yup, the mail should have the file 08nd0862.dams__clipped_polygon_2.las attached.

Jean-Romain commented 2 weeks ago

That makes sense... I found it!