tiagodc / TreeLS

R functions for processing individual tree TLS point clouds
GNU General Public License v3.0
82 stars 27 forks source link

nnFilter throws: "Error in if (can_malloc < 0) { : missing value where TRUE/FALSE needed" on Windows #43

Open mavavilj opened 3 years ago

mavavilj commented 3 years ago

nnFilter throws:

Error in if (can_malloc < 0) { : missing value where TRUE/FALSE needed on Windows.

It seems that it fails in the memory check sizeCheck(), where on line 5 (inside sizeCheck()):

ram = as.double(get_ram())/1e+06

becomes NA, since get_ram() fails by returning:

NA B

cingularities commented 2 years ago

@mavavilj did you get a solution for this? I run into the same issue when running treemap()

mavavilj commented 2 years ago

I don't recall, because it's been a long time since that, but I would expect that you can modify the code to not check for get_ram. This is potentially unsafe in general, but may work as a quick hack, since the error could be some deep issue, since

https://rdrr.io/cran/benchmarkme/man/get_ram.html

A value of NA is return if it isn't possible to determine the amount of RAM.

mavavilj commented 2 years ago

https://github.com/csgillespie/benchmarkme/issues/25