[pdal] Simple filter aborts.

Andrew Bell andrew.bell.ia at gmail.com
Wed Dec 2 05:13:58 PST 2020


No idea without seeing more of your code. You're corrupting memory
somewhere.

On Wed, Dec 2, 2020 at 7:52 AM Peder Axensten <Peder.Axensten at slu.se> wrote:

> I’m trying to implement a filter. The principle is fairly simple (see
> below). First I access all points in “view_" to set up local variables and
> then I copy points that fulfil certain criteria to “points". Could it be
> easier? 😀
>
> Both variants runs well on OS X, but not in Ubuntu 20.10 under Docker.
> I use pdal 2.1.0 on both platforms.
>
> Both variant aborts with:
> malloc(): mismatching next->prev_size (unsorted)
> But at different places.
>
>
> Is there a better (correct) principle of doing this?
> Am I constructing “points” in the correct way?
> What pdal filter do you recommend I take a good look at to better
> understand the principles?
> Why do the variants abort at different locations?
>
> Any hints are welcome!
>
>
> =========
>
> // Variant 1.
> PointViewPtr Remove_overlap::run( PointViewPtr view_ ) {
>
> for( PointId idx = 0; idx < view_->size(); ++idx ) {
> // Set up stuff, read-accessing all points in view_
> }
>
> PointViewPtr points{ view_->makeNew() }; // Aborts here.
> for( PointId idx = 0; idx < view_->size(); ++idx ) {
> if( is_ok( view_, idx ) )
> points->appendPoint( *view_, idx );
> }
>
> return points;
> }
>
>
> // Variant 2.
> PointViewPtr Remove_overlap::run( PointViewPtr view_ ) {
> PointViewPtr points{ view_->makeNew() };
>
> for( PointId idx = 0; idx < view_->size(); ++idx ) {
> // Set up stuff, read-accessing all points in view_
> }
>
> for( PointId idx = 0; idx < view_->size(); ++idx ) {
> if( is_ok( view_, idx ) )
> points->appendPoint( *view_, idx ); // Aborts here after a few hundred
> iterations (out of a few millions)
> }
>
> return points;
> }
>
> Best regards,
>
> Peder Axensten
> Research engineer
>
> Remote Sensing
> Department of Forest Resource Management
> Swedish University of Agricultural Sciences
> SE-901 83 Umeå
> Visiting address: Skogsmarksgränd
> Phone: +46 90 786 85 00
> peder.axensten at slu.se, www.slu.se/srh
>
> The Department of Forest Resource Management is environmentally certified
> in accordance with ISO 14001.
>
> ---
> När du skickar e-post till SLU så innebär detta att SLU behandlar dina
> personuppgifter. För att läsa mer om hur detta går till, klicka här <
> https://www.slu.se/om-slu/kontakta-slu/personuppgifter/>
> E-mailing SLU will result in SLU processing your personal data. For more
> information on how this is done, click here <
> https://www.slu.se/en/about-slu/contact-slu/personal-data/>
> _______________________________________________
> pdal mailing list
> pdal at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/pdal
>


-- 
Andrew Bell
andrew.bell.ia at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/pdal/attachments/20201202/389bea5d/attachment.html>


More information about the pdal mailing list