Opened 5 years ago

Last modified 5 years ago

#13025 new Bugs

Segmentation fault in difference(multipoint, multilinestring)

Reported by: Vissarion Fisikopoulos <fisikop@…> Owned by: Barend Gehrels
Milestone: To Be Determined Component: geometry
Version: Boost Development Trunk Severity: Problem
Keywords: Cc:

Description

The following piece of code throws a segmentation fault. Produced on Ubuntu 14.04.3 with gcc 4.8.4

#include <boost/geometry.hpp>
#include <boost/geometry/geometries/point_xy.hpp>

namespace bg = boost::geometry;

int main()
{
    typedef bg::model::d2::point_xy<double> point;

    bg::model::multi_linestring<bg::model::linestring<point> > mls2;
    bg::read_wkt("MULTILINESTRING((0 1, 0 3))", mls2);

    bg::model::multi_point<point> mpt2;
    bg::read_wkt("MULTIPOINT(0 4)", mpt2);

    bg::difference(mpt2, mls2, mpt2);

    return 0;
}

Change History (2)

comment:1 by Vissarion Fisikopoulos <fisikop@…>, 5 years ago

Component: Nonegeometry
Owner: set to Barend Gehrels

comment:2 by awulkiew, 5 years ago

May it be caused by the fact that the output geometry which is modified inside the function is the same object as one of the input geometries?

Note: See TracTickets for help on using tickets.