mapnik/mapnik — Issue #1100: Hang with render when scale_factor = 0.0
Author: pnorman
Created: 2012-02-24 00:09:05+00:00
State: open

When mapnik.render(m,im,0.) is called from python it hangs.

Python 2.7.2
Mapnik version 200000 (built from source)
ubuntu-server 11.10

Multiple image sizes

```python
im = mapnik.Image(imgx,imgy)
mapnik.render(m, im)
im.save(map_uri,'png')
```
works but

```python
im = mapnik.Image(imgx,imgy)
mapnik.render(m, im,0.0)
im.save(map_uri,'png')
```
hangs

Backtrace follows

```gdb

#0 0x00007ffb5ad5eaab in agg::conv_adaptor_vcgen, mapnik::vertex_vector> >, agg::vcgen_dash, agg::null_markers>::vertex(double*, double*) () from /usr/local/lib/libmapnik2.so.2.0
#1 0x00007ffb5ad5ebf6 in agg::conv_adaptor_vcgen, mapnik::vertex_vector> >, agg::null_markers>, agg::vcgen_stroke, agg::null_markers>::vertex(double*, double*) ()
from /usr/local/lib/libmapnik2.so.2.0
#2 0x00007ffb5ad6610b in mapnik::agg_renderer::process(mapnik::line_symbolizer const&, mapnik::feature, mapnik::vertex_vector>, boost::shared_ptr > const&, mapnik::proj_transform const&) ()
from /usr/local/lib/libmapnik2.so.2.0
#3 0x00007ffb5ac239eb in mapnik::feature_style_processor >::apply_to_layer(mapnik::layer const&, mapnik::agg_renderer&, mapnik::projection const&, double, std::set, std::allocator >&) () from /usr/local/lib/libmapnik2.so.2.0
#4 0x00007ffb5ac24094 in mapnik::feature_style_processor >::apply() ()
from /usr/local/lib/libmapnik2.so.2.0
#5 0x00007ffb5b2ca4fe in render(mapnik::Map const&, mapnik::image_32&, double, unsigned int, unsigned int) ()
from /usr/lib/python2.7/dist-packages/mapnik2/_mapnik2.so
#6 0x00007ffb5b2d685f in boost::python::detail::caller_arity<3u>::impl >::operator()(_object*, _object*) ()
from /usr/lib/python2.7/dist-packages/mapnik2/_mapnik2.so
#7 0x00007ffb5a7e5b0f in boost::python::objects::function::call(_object*, _object*) const () from /usr/lib/libboost_python-py27.so.1.46.1
#8 0x00007ffb5a7e5d68 in ?? () from /usr/lib/libboost_python-py27.so.1.46.1
#9 0x00007ffb5a7ef0e3 in boost::python::detail::exception_handler::operator()(boost::function0 const&) const ()
from /usr/lib/libboost_python-py27.so.1.46.1
#10 0x00007ffb5b2d4703 in boost::detail::function::function_obj_invoker2, boost::_bi::list3, boost::arg<2>, boost::_bi::value > >, bool, boost::python::detail::exception_handler const&, boost::function0 const&>::invoke(boost::detail::function::function_buffer&, boost::python::detail::exception_handler const&, boost::function0 const&) ()
from /usr/lib/python2.7/dist-packages/mapnik2/_mapnik2.so
#11 0x00007ffb5a7ef0c6 in boost::python::detail::exception_handler::operator()(boost::function0 const&) const ()
from /usr/lib/libboost_python-py27.so.1.46.1
#12 0x00007ffb5b2d46b3 in boost::detail::function::function_obj_invoker2, boost::_bi::list3, boost::arg<2>, boost::_bi::value > >, bool, boost::python::detail::exception_handler const&, boost::function0 const&>::invoke(boost::detail::function::function_buffer&, boost::python::detail::exception_handler const&, boost::function0 const&) ()
from /usr/lib/python2.7/dist-packages/mapnik2/_mapnik2.so
#13 0x00007ffb5a7eeea9 in boost::python::handle_exception_impl(boost::function0) () from /usr/lib/libboost_python-py27.so.1.46.1
#14 0x00007ffb5a7e4064 in ?? () from /usr/lib/libboost_python-py27.so.1.46.1
#15 0x000000000041ad2a in PyObject_Call ()
#16 0x00000000004b6b9e in PyEval_EvalFrameEx ()
#17 0x00000000004bcd2d in PyEval_EvalCodeEx ()
---Type to continue, or q to quit---
#18 0x00000000004bd802 in PyEval_EvalCode ()
#19 0x00000000004dcc22 in ?? ()
#20 0x00000000004de665 in PyRun_InteractiveOneFlags ()
#21 0x00000000004de818 in PyRun_InteractiveLoopFlags ()
#22 0x00000000004deabf in PyRun_AnyFileExFlags ()
#23 0x00000000004ee5ad in Py_Main ()
#24 0x00007ffb5bff930d in __libc_start_main () from /lib/x86_64-linux-gnu/libc.so.6
#25 0x000000000041cb69 in _start ()
```