[mapserver-dev] A couple of problems I've found.

Jeff McKenna jmckenna at gatewaygeomatics.com
Sat Oct 18 08:35:14 PDT 2014

Some advice, as you seem to be new to the Open Source community:

- be positive (saying negative things about the community is a fast way 
to not get any responses, as I see you saying negative things on IRC, 
users, dev, etc.)
- give yourself a name (how can people in the community help you when 
they don't know who you are)
- instead of pointing out problems, create a small test case, and share 
that with the community, and ask them nicely for someone to try

Which reminds me, do we need a short Code of Conduct for MapServer?  I 
notice the QGIS project recently released one, which very nicely 
explains how to interact with the QGIS community.

Have a nice weekend,


On 2014-10-18 11:33 AM, yeryry wrote:
> Reposting this here as mapserver-users seems pretty dead...
> I think I've discovered two causes of crashes...
> First, one with the KML driver...
> msDrawQueryLayer creates and draws a temporary layer here:
> https://github.com/mapserver/mapserver/blob/bdd421c7e69e2ff16841c12c08ba688b62a9f9a6/mapdraw.c#L1209
> The KML renderer sets a reference to the temporary layer here:
> https://github.com/mapserver/mapserver/blob/bdd421c7e69e2ff16841c12c08ba688b62a9f9a6/mapkmlrenderer.cpp#L371
> <https://github.com/mapserver/mapserver/blob/3e8aa5a4d92c9bad105306ebe5117ed29d2b0e7c/mapkmlrenderer.cpp#L371>
> msDrawQueryLayer later calls msDrawShape here:
> https://github.com/mapserver/mapserver/blob/bdd421c7e69e2ff16841c12c08ba688b62a9f9a6/mapdraw.c#L1299
> <https://github.com/mapserver/mapserver/blob/3e8aa5a4d92c9bad105306ebe5117ed29d2b0e7c/mapdraw.c#L1295>
> which eventually results in a call to KmlRenderer::renderGlyphs
> https://github.com/mapserver/mapserver/blob/bdd421c7e69e2ff16841c12c08ba688b62a9f9a6/mapkmlrenderer.cpp#L693
> <https://github.com/mapserver/mapserver/blob/3e8aa5a4d92c9bad105306ebe5117ed29d2b0e7c/mapkmlrenderer.cpp#L693>
> which gets to KmlRenderer::createPlacemarkNode and reuses the reference
> that was set:
> https://github.com/mapserver/mapserver/blob/bdd421c7e69e2ff16841c12c08ba688b62a9f9a6/mapkmlrenderer.cpp#L585
> <https://github.com/mapserver/mapserver/blob/3e8aa5a4d92c9bad105306ebe5117ed29d2b0e7c/mapkmlrenderer.cpp#L585>
> even though that temporary layer was freed earlier, leading to the crash.
> And one with WMS:
> It crashes around here:
> https://github.com/mapserver/mapserver/blob/bdd421c7e69e2ff16841c12c08ba688b62a9f9a6/mapdraw.c#L106
> <https://github.com/mapserver/mapserver/blob/3e8aa5a4d92c9bad105306ebe5117ed29d2b0e7c/mapdraw.c#L106>
> Probably due to trying to set NULL->map... That error message should
> probably be moved before that line.
> In my case though, I was trying to serve KML over WMS, so "not having an
> image" shouldn't really be an error condition? And that
> non-square-pixels thing also shouldn't be relevant for vector layers;
> currently the dimensions of the requested WMS "image" have a big effect
> on KML output coordinates, which strikes me as broken, so perhaps that
> whole function should be avoided for vector output.

More information about the mapserver-dev mailing list