Boost logo

Geometry :

Subject: Re: [geometry] access violation in update_discarded(...)
From: Menelaos Karavelas (menelaos.karavelas_at_[hidden])
Date: 2014-10-27 15:02:49


Hi again.
I defined my test polygon as closed. Here is the correct program and output.

- m.

On 27/10/2014 08:51 μμ, Menelaos Karavelas wrote:
> Hi Volker.
>
> On 27/10/2014 07:39 μμ, Volker Schöch wrote:
>>
>> Hi,
>>
>> Unfortunately I have not hear from you in this regard. It seems that
>> I still cannot reliably reproduce the issue, but when it occurs, it
>> occurs in the following scenario. Apparently, something is broken in
>> your memory management:
>>
>> { // RT#8837
>>
>> _intPolygonpolygonA;
>>
>> boost::geometry::read_wkt("MULTIPOLYGON(((488 2035,527
>> 2035,527 2093,488 2093)))", polygonA); // does not throw
>>
>> _intRectrectB;
>>
>> boost::geometry::read_wkt("BOX(417 2064,597 2064)", rectB); //
>> does not throw
>>
>> _intPolygonpolygonC;
>>
>> boost::geometry::difference(polygonA, rectB, polygonC); //
>> ACCESS VIOLATION
>>
>> }
>>
>> Maybe you could make an effort and step through this simple example
>> once to see if everything works as expected?
>>
>> I understand that the box and/or the polygon may not conform to all
>> requirements (not spike-free etc.) but in any case, IMO the geometry
>> library should not crash with a memory fault.
>>
>> As always, my *points are based on int* and my polygons are
>> *counter-clockwise* and *not closed*.
>>
>
> Please see the attached program and its output, which works for me.
> Do you think you can reproduce the problem in a standalone program?
>
> All the best,
>
> - m.
>
>> Regards
>>
>> Volker
>>
>> --
>> Volker Schöch | vschoech_at_[hidden] <mailto:vschoech_at_[hidden]>
>> Senior Software Engineer
>>
>>
>> *We are looking for C++ Developers:* http://www.think-cell.com/career
>>
>> *From:*Geometry [mailto:geometry-bounces_at_[hidden]] *On Behalf
>> Of *Volker Schöch
>> *Sent:* Freitag, 17. Oktober 2014 16:20
>> *To:* Boost.Geometry library mailing list (geometry_at_[hidden])
>> *Subject:* [geometry] access violation in update_discarded(...)
>>
>> Hi,
>>
>> we have seen an access violation deep inside boost geometry. We are
>> still working on a simple reproduction, which may take while. In the
>> meantime, maybe you have some idea what went wrong, or some
>> suggestion how to avoid this situation?
>>
>> Here is where it happened:
>>
>> template<typenameTurns, typenameOperations>
>>
>> inlinevoidupdate_discarded(Turns& turn_points, Operations& operations)
>>
>> {
>>
>> // Vice-versa, set discarded to true for discarded operations;
>>
>> // AND set discarded points to true
>>
>> for(typenameboost::range_iterator<Operations>::typeit =
>> boost::begin(operations);
>>
>> it != boost::end(operations);
>>
>> ++it)
>>
>> {
>>
>> if(turn_points[it->index].discarded)
>> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< access violation
>>
>> {
>>
>> it->discarded = true;
>>
>> }
>>
>> elseif(it->discarded)
>>
>> {
>>
>> turn_points[it->index].discarded = true;
>>
>> }
>>
>> }
>>
>> }
>>
>> Please find the callstack attached.
>>
>> Regards
>>
>> Volker
>>
>> --
>> Volker Schöch | vschoech_at_[hidden] <mailto:vschoech_at_[hidden]>
>> Senior Software Engineer
>>
>>
>> *We are looking for C++ Developers:*http://www.think-cell.com/career
>>
>> ------------------------------------------------------------------------
>>
>> think-cell Software GmbH
>>
>>
>>
>> http://www.think-cell.com <http://www.think-cell.com/>
>>
>> Chausseestr. 8/E
>>
>>
>>
>> phone / fax
>>
>>
>>
>> +49 30 666473-10 / -19
>>
>> 10115 Berlin, Germany
>>
>>
>>
>> US phone / fax
>>
>>
>>
>> +1 800 891 8091 / +1 212 504 3039
>>
>> Amtsgericht Berlin-Charlottenburg, HRB 85229 | European Union VAT Id
>> DE813474306
>>
>> Directors: Dr. Markus Hannebauer, Dr. Arno Schödl
>>
>>
>>
>> _______________________________________________
>> Geometry mailing list
>> Geometry_at_[hidden]
>> http://lists.boost.org/mailman/listinfo.cgi/geometry
>






Geometry list run by mateusz at loskot.net