Opened 19 months ago

Last modified 18 months 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:


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 Changed 19 months ago by Vissarion Fisikopoulos <fisikop@…>

Component: Nonegeometry
Owner: set to Barend Gehrels

comment:2 Changed 18 months ago by awulkiew

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.