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

Segfault with filters.poisson executed twice #128

Open
floriandeboissieu opened this issue Oct 10, 2022 · 4 comments
Open

Segfault with filters.poisson executed twice #128

floriandeboissieu opened this issue Oct 10, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@floriandeboissieu
Copy link

floriandeboissieu commented Oct 10, 2022

With pdal=2.4.1 and python-pdal=3.1.2 (same happens with pdal=2.4.3 & python-pdal=3.2.0),
when executing twice the same command I get a segfault.

import pdal
data = "https://github.com/PDAL/PDAL/blob/master/test/data/las/1.2-with-color.las?raw=true"
stages = [pdal.Reader.las(filename=data), pdal.Filter.poisson()]
pdal.Pipeline(stages).execute()

stages = [pdal.Reader.las(filename=data), pdal.Filter.poisson()]
pdal.Pipeline(stages).execute()

It was tested with Filter.delaunay and there is not such a behavior.

@hobu
Copy link
Member

hobu commented Oct 11, 2022

Confirmed, but I'm not sure what to do about it. The noding code in the khazdan poisson software appears to be the issue. The tree building code in there must have something with a global state that's not being cleaned up.

    frame #174651: 0x00000001021bcb2c libpdalcpp.14.3.0.dylib`double Octree<double>::_getSamplesPerNode<2, PointSupportKey<2> >(Octree<double>::DensityEstimator const&, OctNode<TreeNodeData> const*, Point3D<double>, PointSupportKey<2>&) const + 84
    frame #174652: 0x00000001021bbef0 libpdalcpp.14.3.0.dylib`double Octree<double>::_splatPointData<true, 2, 2, Point3D<double> >(Octree<double>::DensityEstimator const&, Point3D<double>, Point3D<double>, SparseNodeData<Point3D<double> >&, PointSupportKey<2>&, PointSupportKey<2>&, int, int, int) + 384
    frame #174653: 0x00000001021bbc48 libpdalcpp.14.3.0.dylib`SparseNodeData<Point3D<double> > Octree<double>::setNormalField<2, 2>(std::__1::vector<Octree<double>::PointSample, std::__1::allocator<Octree<double>::PointSample> > const&, Octree<double>::DensityEstimator const&, double&, bool) + 464
    frame #174654: 0x00000001021b8b78 libpdalcpp.14.3.0.dylib`PoissonRecon<double>::calcNormalData() + 56

@hobu hobu added the bug Something isn't working label Oct 11, 2022
@abellgithub
Copy link
Collaborator

A full stack trace would be helpful.

@hobu
Copy link
Member

hobu commented Oct 28, 2022

import pdal
data = "https://github.com/PDAL/PDAL/blob/master/test/data/las/1.2-with-color.las?raw=true"
stages = [pdal.Reader.las(filename=data), pdal.Filter.poisson()]
pdal.Pipeline(stages).execute()

stages = [pdal.Reader.las(filename=data), pdal.Filter.poisson()]
pdal.Pipeline(stages).execute()
    frame #1: 0x0000000102e90cf4 libpdalcpp.14.3.0.dylib`PoissonRecon<double>::trim() + 56
    frame #2: 0x0000000102e8de0c libpdalcpp.14.3.0.dylib`PoissonRecon<double>::execute() + 360
    frame #3: 0x0000000102e8d6bc libpdalcpp.14.3.0.dylib`pdal::PoissonFilter::run(std::__1::shared_ptr<pdal::PointView>) + 632
    frame #4: 0x00000001030ca788 libpdalcpp.14.3.0.dylib`pdal::StageRunner::run() + 84
    frame #5: 0x0000000103052da0 libpdalcpp.14.3.0.dylib`pdal::Stage::execute(pdal::BasePointTable&, std::__1::set<std::__1::shared_ptr<pdal::PointView>, pdal::PointViewLess, std::__1::allocator<std::__1::shared_ptr<pdal::PointView> > >&) + 1424
    frame #6: 0x0000000103051f74 libpdalcpp.14.3.0.dylib`pdal::Stage::execute(pdal::BasePointTable&) + 1080
    frame #7: 0x000000010302e28c libpdalcpp.14.3.0.dylib`pdal::PipelineManager::execute(pdal::ExecMode) + 188
    frame #8: 0x000000010302e43c libpdalcpp.14.3.0.dylib`pdal::PipelineManager::execute() + 16

@abellgithub
Copy link
Collaborator

It looks like the octree needs to be reset. I have to figure out how to do that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants