hobuinc / untwine

GNU General Public License v3.0
52 stars 22 forks source link

Untwine freezes if given an empty point cloud #128

Closed uclaros closed 11 months ago

uclaros commented 2 years ago

If untwine is given an empty point cloud, it creates an empty .copc.laz file and .copc.laz_tmp folder and then freezes.

I'm aware that indexing an empty point cloud file does not sound like something a sane person would request, however, ending up with empty laz files is not too hard when filtering (especially spatially) existing data with pdal.

wonder-sk commented 1 year ago

For me it also creates an empty .copc.laz and .copc.laz_tmp folder, but it immediately exits with error code 255:

$ untwine -i empty.las -o empty.copc.laz -s
FATAL ERROR: No temporary files to process. I/O or directory list error?!
Untwine Error: No temporary files to process. I/O or directory list error?
$ echo $?
255

(But this is when I call it from command line - you probably run it through untwine's API ? maybe the API is the place where it gets stuck?)

It would be good though if untwine provided a more sensible error message which could be then displayed to users.

uclaros commented 1 year ago

I first encountered this when building the point cloud layer filtering logic in QGIS, as loading an empty las/laz caused an endless task. Manually running

$ untwine -i empty.las -o empty.copc.laz -s

would also freeze on my machine at the time, so I guess the endless loop has been fixed in untwine at some point

uclaros commented 11 months ago

Closing this as I can no longer reproduce