Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ColumnPointTable killed LloydKMeans #3240

Closed
chambbj opened this issue Sep 14, 2020 · 3 comments
Closed

ColumnPointTable killed LloydKMeans #3240

chambbj opened this issue Sep 14, 2020 · 3 comments

Comments

@chambbj
Copy link
Member

chambbj commented Sep 14, 2020

Pipelines involving filters.lloydkmeans segfault when running PDAL v2.2.

Starting program: /home/chambbj/miniconda3/envs/conda-build/envs/pdalbuild-teaser/bin/pdal translate ../test/data/laz/autzen_trim.laz /dev/null reprojection lloydkmeans -v 5 --filters.reprojection.out_srs="EPSG:32610"
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
(PDAL Debug) Debugging...
(pdal translate readers.las Debug) File contains both WKT and GeoTiff VLRs which is disallowed.
(pdal translate Debug) Executing pipeline in standard mode.

Program received signal SIGSEGV, Segmentation fault.
pdal::ColumnPointTable::addPoint (this=0x7fffffffb1c0)
    at /home/chambbj/pdal/pdal/ColumnPointTable.cpp:68
68	            dimBlocks.push_back(buf);
(gdb) bt
#0  pdal::ColumnPointTable::addPoint (this=0x7fffffffb1c0)
    at /home/chambbj/pdal/pdal/ColumnPointTable.cpp:68
#1  0x00007ffff7dd2dfa in pdal::PointView::tableId (this=this@entry=0x5555556fbb60, 
    idx=<optimized out>) at /home/chambbj/pdal/pdal/PointView.cpp:83
#2  0x00007ffff7aac6b7 in pdal::PointView::setField<double> (this=this@entry=0x5555556fbb60, 
    dim=dim@entry=pdal::Dimension::Id::X, idx=idx@entry=0, val=494475.70773167285)
    at /home/chambbj/pdal/pdal/PointView.hpp:587
#3  0x00007ffff7b1b78b in pdal::LloydKMeansFilter::filter (this=0x555555639a70, view=...)
    at /home/chambbj/pdal/filters/LloydKMeansFilter.cpp:112
#4  0x00007ffff7d87981 in pdal::Filter::run (this=<optimized out>, view=...)
    at /home/chambbj/pdal/pdal/Filter.cpp:58
#5  0x00007ffff7e5ee13 in pdal::StageRunner::run (this=0x5555563983b0)
    at /home/chambbj/pdal/pdal/private/StageRunner.cpp:64
#6  0x00007ffff7df8b9b in pdal::Stage::execute (this=0x555555639ab8, table=..., views=...)
    at /home/chambbj/pdal/pdal/Stage.cpp:271
#7  0x00007ffff7df9750 in pdal::Stage::execute (this=this@entry=0x555555639db8, table=...)
    at /home/chambbj/pdal/pdal/Stage.cpp:216
#8  0x00007ffff7db53a5 in pdal::PipelineManager::execute (this=this@entry=0x555555635f58, 
    mode=<optimized out>) at /home/chambbj/pdal/pdal/PipelineManager.cpp:260
#9  0x00007ffff7d715d2 in pdal::TranslateKernel::execute (this=0x555555635f40)
    at /home/chambbj/pdal/kernels/TranslateKernel.cpp:226
#10 0x00007ffff7d9b415 in pdal::Kernel::innerRun (this=this@entry=0x555555635f40, args=...)
    at /home/chambbj/pdal/pdal/Kernel.cpp:283
#11 0x00007ffff7d9b4c5 in pdal::Kernel::doExecution (this=this@entry=0x555555635f40, args=...)
    at /home/chambbj/pdal/pdal/Kernel.cpp:247
#12 0x00007ffff7d9da50 in pdal::Kernel::run (this=0x555555635f40, cmdArgs=..., log=...)
    at /home/chambbj/pdal/pdal/Kernel.cpp:235
#13 0x0000555555578648 in App::execute (this=0x7fffffffbb70, cmdArgs=..., log=...)
    at /home/chambbj/pdal/apps/pdal.cpp:366
#14 0x000055555555e4b8 in main (argc=<optimized out>, argv=<optimized out>)
    at /home/chambbj/pdal/apps/pdal.cpp:310

The only substantial change to this filter recently was from the RowPointTable (formerly PointTable) to ColumnPointTable. It was my understanding that this should be a drop-in change with no required code modifications. In fact, switching this back to RowPointTable allows the filter to run to completion.

@abellgithub
Copy link
Contributor

abellgithub commented Sep 14, 2020

The table needs to be finalized. This should be done after all dimensions are added. You could get away with not finalizing with RowPointTable, but not with ColumnPointTable.

@chambbj
Copy link
Member Author

chambbj commented Sep 15, 2020

Thanks. Didn't know about this caveat. I've updated the PR.

@abellgithub
Copy link
Contributor

Fixed by 84e5d5a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants