Boost C++ Libraries: Ticket #10660: svg_mapper crash https://svn.boost.org/trac10/ticket/10660 <p> When I slightly modify the example from the <a href="http://www.boost.org/doc/libs/1_56_0/libs/geometry/doc/html/geometry/reference/io/svg/svg_mapper.html">documentation</a>, the code crashes with an obscure (for me) exception deep in the callstack. </p> <p> Running this code: </p> <pre class="wiki">std::ostringstream svg; // Specify the basic type typedef boost::geometry::model::d2::point_xy&lt;int&gt; point_type; // Declare some geometries and set their values point_type a; boost::geometry::assign_values(a, -100, -100); // Declare a stream and an SVG mapper boost::geometry::svg_mapper&lt;point_type&gt; mapper(svg, 1000, 1000); // Add geometries such that all these geometries fit on the map mapper.add(a); // Draw the geometries on the SVG map, using a specific SVG style mapper.map(a, "fill-opacity:0.5;fill:rgb(153,204,0);stroke:rgb(153,204,0);stroke-width:2", 5); // Destructor of map will be called - adding &lt;/svg&gt; // Destructor of stream will be called, closing the file </pre><p> ... throws this exception: </p> <pre class="wiki">Microsoft C++ exception: boost::numeric::negative_overflow at memory location 0x00000000001E9D60. </pre><p> ... at this call-stack: </p> <pre class="wiki">tcaddin.dll!_CxxThrowException(void * pExceptionObject, const _s__ThrowInfo * pThrowInfo) Line 154 C++ tcaddin.dll!boost::numeric::def_overflow_handler::operator()(boost::numeric::range_check_result r) Line 164 C++ tcaddin.dll!boost::numeric::convdetail::generic_range_checker&lt;boost::numeric::conversion_traits&lt;int,double&gt;,boost::numeric::convdetail::LE_PrevLoT&lt;boost::numeric::conversion_traits&lt;int,double&gt; &gt;,boost::numeric::convdetail::GE_SuccHiT&lt;boost::numeric::conversion_traits&lt;int,double&gt; &gt;,boost::numeric::def_overflow_handler&gt;::validate_range(double s) Line 294 C++ tcaddin.dll!boost::numeric::convdetail::rounding_converter&lt;boost::numeric::conversion_traits&lt;int,double&gt;,boost::numeric::convdetail::generic_range_checker&lt;boost::numeric::conversion_traits&lt;int,double&gt;,boost::numeric::convdetail::LE_PrevLoT&lt;boost::numeric::conversion_traits&lt;int,double&gt; &gt;,boost::numeric::convdetail::GE_SuccHiT&lt;boost::numeric::conversion_traits&lt;int,double&gt; &gt;,boost::numeric::def_overflow_handler&gt;,boost::numeric::raw_converter&lt;boost::numeric::conversion_traits&lt;int,double&gt; &gt;,boost::numeric::Trunc&lt;double&gt; &gt;::convert(double s) Line 494 C++ tcaddin.dll!boost::numeric_cast&lt;int,double&gt;(double arg) Line 54 C++ tcaddin.dll!boost::geometry::strategy::transform::ublas_transformer&lt;double,2,2&gt;::apply&lt;boost::geometry::model::d2::point_xy&lt;int,boost::geometry::cs::cartesian&gt;,boost::geometry::model::point&lt;int,2,boost::geometry::cs::cartesian&gt; &gt;(const boost::geometry::model::d2::point_xy&lt;int,boost::geometry::cs::cartesian&gt; &amp; p1, boost::geometry::model::point&lt;int,2,boost::geometry::cs::cartesian&gt; &amp; p2) Line 115 C++ tcaddin.dll!boost::geometry::detail::transform::transform_point::apply&lt;boost::geometry::model::d2::point_xy&lt;int,boost::geometry::cs::cartesian&gt;,boost::geometry::model::point&lt;int,2,boost::geometry::cs::cartesian&gt;,boost::geometry::strategy::transform::map_transformer&lt;double,2,2,1,1&gt; &gt;(const boost::geometry::model::d2::point_xy&lt;int,boost::geometry::cs::cartesian&gt; &amp; p1, boost::geometry::model::point&lt;int,2,boost::geometry::cs::cartesian&gt; &amp; p2, const boost::geometry::strategy::transform::map_transformer&lt;double,2,2,1,1&gt; &amp; strategy) Line 58 C++ tcaddin.dll!boost::geometry::resolve_strategy::transform::apply&lt;boost::geometry::model::d2::point_xy&lt;int,boost::geometry::cs::cartesian&gt;,boost::geometry::model::point&lt;int,2,boost::geometry::cs::cartesian&gt;,boost::geometry::strategy::transform::map_transformer&lt;double,2,2,1,1&gt; &gt;(const boost::geometry::model::d2::point_xy&lt;int,boost::geometry::cs::cartesian&gt; &amp; geometry1, boost::geometry::model::point&lt;int,2,boost::geometry::cs::cartesian&gt; &amp; geometry2, const boost::geometry::strategy::transform::map_transformer&lt;double,2,2,1,1&gt; &amp; strategy) Line 358 C++ tcaddin.dll!boost::geometry::resolve_variant::transform&lt;boost::geometry::model::d2::point_xy&lt;int,boost::geometry::cs::cartesian&gt;,boost::geometry::model::point&lt;int,2,boost::geometry::cs::cartesian&gt; &gt;::apply&lt;boost::geometry::strategy::transform::map_transformer&lt;double,2,2,1,1&gt; &gt;(const boost::geometry::model::d2::point_xy&lt;int,boost::geometry::cs::cartesian&gt; &amp; geometry1, boost::geometry::model::point&lt;int,2,boost::geometry::cs::cartesian&gt; &amp; geometry2, const boost::geometry::strategy::transform::map_transformer&lt;double,2,2,1,1&gt; &amp; strategy) Line 391 C++ tcaddin.dll!boost::geometry::transform&lt;boost::geometry::model::d2::point_xy&lt;int,boost::geometry::cs::cartesian&gt;,boost::geometry::model::point&lt;int,2,boost::geometry::cs::cartesian&gt;,boost::geometry::strategy::transform::map_transformer&lt;double,2,2,1,1&gt; &gt;(const boost::geometry::model::d2::point_xy&lt;int,boost::geometry::cs::cartesian&gt; &amp; geometry1, boost::geometry::model::point&lt;int,2,boost::geometry::cs::cartesian&gt; &amp; geometry2, const boost::geometry::strategy::transform::map_transformer&lt;double,2,2,1,1&gt; &amp; strategy) Line 454 C++ tcaddin.dll!boost::geometry::dispatch::svg_map&lt;boost::geometry::point_tag,boost::geometry::model::d2::point_xy&lt;int,boost::geometry::cs::cartesian&gt; &gt;::apply&lt;boost::geometry::strategy::transform::map_transformer&lt;double,2,2,1,1&gt; &gt;(std::basic_ostream&lt;char,std::char_traits&lt;char&gt; &gt; &amp; stream, const std::basic_string&lt;char,std::char_traits&lt;char&gt;,std::allocator&lt;char&gt; &gt; &amp; style, int size, const boost::geometry::model::d2::point_xy&lt;int,boost::geometry::cs::cartesian&gt; &amp; point, const boost::geometry::strategy::transform::map_transformer&lt;double,2,2,1,1&gt; &amp; strategy) Line 87 C++ tcaddin.dll!boost::geometry::svg_map&lt;boost::geometry::model::d2::point_xy&lt;int,boost::geometry::cs::cartesian&gt;,boost::geometry::strategy::transform::map_transformer&lt;double,2,2,1,1&gt; &gt;(std::basic_ostream&lt;char,std::char_traits&lt;char&gt; &gt; &amp; stream, const std::basic_string&lt;char,std::char_traits&lt;char&gt;,std::allocator&lt;char&gt; &gt; &amp; style, int size, const boost::geometry::model::d2::point_xy&lt;int,boost::geometry::cs::cartesian&gt; &amp; geometry, const boost::geometry::strategy::transform::map_transformer&lt;double,2,2,1,1&gt; &amp; strategy) Line 213 C++ tcaddin.dll!boost::geometry::svg_mapper&lt;boost::geometry::model::d2::point_xy&lt;int,boost::geometry::cs::cartesian&gt;,1&gt;::map&lt;boost::geometry::model::d2::point_xy&lt;int,boost::geometry::cs::cartesian&gt; &gt;(const boost::geometry::model::d2::point_xy&lt;int,boost::geometry::cs::cartesian&gt; &amp; geometry, const std::basic_string&lt;char,std::char_traits&lt;char&gt;,std::allocator&lt;char&gt; &gt; &amp; style, int size) Line 334 C++ [...] </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/10660 Trac 1.4.3