mapnik-org/mapnik — Issue #105: Crashing with TextSymbolizer and line placement.
Author: artemp
Created: 2011-10-11 07:35:37+00:00
State: open
Labels: Core_Library

I can regularly crash mapnik if I try to label a point geometric with a TextSymbolizer using line placement (which is very easy to do with an ElseFilter). It actually dies with a boost exception.

However, I can't get the actually boost exception message, I just get:

std::bad_alloc "St9bad_alloc"

which google tells me many people get without a easy solution to get the correct error message, so I am not quite sure where the problem actually is.

I suppose a simple change would be to src/agg_renderer.cpp at line 707 to:

if (sym.get_label_placement() == POINT_PLACEMENT | | geom.num_points() == 1)

(not the extra space between the | | which TRAC appears to require) which seems to have fixed the problem in my testing.