r-lidar / lidR

Airborne LiDAR data manipulation and visualisation for forestry application
https://CRAN.R-project.org/package=lidR
GNU General Public License v3.0
601 stars 131 forks source link

Plot Fatal Error #557

Closed cingularities closed 2 years ago

cingularities commented 2 years ago

When I Plot las points I get a fatal error and Rstudio shuts down. This problem just started a few days ago. Thank you

Jean-Romain commented 2 years ago

This is not very informative and helpful. Which OS? Which version of lidR? Which version of rgl? Did you update some packages few days ago? What happended few days ago? Minimal reproducible example? Does rgl rendering works outside of lidR? Which version of R? Does it crash with every point cloud or only some?

cingularities commented 2 years ago

Hello Jean-Romain, Thank you for the quick response. I did not update any packages before issues started. I had IT update Rstudio version and I updated my packages yesterday but fatal error persists.

I am running on

I was running as a simple plot(points_georeferenced) and this fatal error occurs with any point cloud. I installed rgl today and tried running rgl::plot3d(points_georeferenced@data) and it worked visualizing a simple 3D plot. I ran lidR::plot(points_georeferenced@data) and it did not give me a fatal l error but kept trying to plot and I waited for 15-30 minutes with no success. I stopped the run. Please let me know if you need more details.

Jean-Romain commented 2 years ago

lidR::plot(points_georeferenced@data) is not possible it actually calls plot.data.frame() by inheritance which indeed runs forever (at least irrelevantly long) for a large point cloud. It plots every attribute against every attributes try

data(iris)
plot(iris)

And imagine what it can do with a lidar point cloud. The way to work is plot(points_georeferenced) and you never need to call @data.

cingularities commented 2 years ago

the fatal error occurs on lidR::plot(points_georeferenced) and aborts my session

459 I am also having a similar issue with this case. The exact same error when I run normalize_height. I already tried: filter = "-drop_class 7" with no success

https://drive.google.com/file/d/17nSTTwp8Mv98-O7rFBTc92Z896aJQtpS/view?usp=sharing

You can download the LAS file from here

Jean-Romain commented 2 years ago

https://github.com/r-lidar/lidR/discussions/459 I am also having a similar issue with this case

If you have an issue with normalize_height please open a dedicated issue with a reproducible example.

the fatal error occurs on lidR::plot(points_georeferenced) and aborts my session

I see that you are running lidR 3.2.4. You are not up to date with lidR so I guess you are not up-to-date with other packages as well. Before to report a bug please ensure that all your packages are up-to-date. The problem may disappear by itself. But I'm very unsure it will in this case.

cingularities commented 2 years ago

Sorry for the delay. I finally had lidR updated (4.0.0) and I am still running into the same fatal error,/aborts session when I plot points.

Jean-Romain commented 2 years ago

Can you plot a point cloud from a small dataset included with the package?

Jean-Romain commented 2 years ago

Does it help?

https://stackoverflow.com/questions/72055992/rgl-crashes-r-4-2-0-in-rstudio https://github.com/rstudio/rstudio/issues/11043