Opened 14 months ago

Last modified 13 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;

Attachments (0)

Change History (2)

comment:1 Changed 14 months ago by Vissarion Fisikopoulos <fisikop@…>

Component: Nonegeometry
Owner: set to Barend Gehrels

comment:2 Changed 13 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?

Modify Ticket

Change Properties
Set your email in Preferences
as new The owner will remain Barend Gehrels.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.