[mapserver-dev] A couple of problems I've found.
yeryry
yeryry at gmail.com
Sat Oct 18 07:33:40 PDT 2014
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-dev/attachments/20141018/c1d0547a/attachment.html>
More information about the mapserver-dev
mailing list