Skip to content

KML output issue if label is present #6174

@brunodomenget

Description

@brunodomenget

Hi all,

I found an issue with KML output if the mapfile contains features with labels. It just crashes, and only starts to work if I remove the LABEL entry from the mapfile.

If I use the following command shp2img -m test_points_kml.map -o ttt.kml -i kml -all_debug 5
I get the following answer :
msDrawMap(): Image handling error. Failed to draw layer named 'points'.
GDAL: In GDALDestroy - unloading GDAL shared library.

And the corresponding log :

[Thu Oct 15 15:36:02 2020].174254 msLoadMap(): 0.005s
[Thu Oct 15 15:36:02 2020].174344 msDrawMap(): rendering using outputformat named kml (KML).
[Thu Oct 15 15:36:02 2020].174348 msDrawMap(): WMS/WFS set-up and query, 0.000s
[Thu Oct 15 15:36:02 2020].174369 msINLINELayerOpen: Layer is already open!
[Thu Oct 15 15:36:02 2020].174564 msSaveImage(/home/mapserver/public_html/test/././5f885042_26ab_0.png) total time: 0.000s
[Thu Oct 15 15:36:02 2020].174629 msDrawMap(): Image handling error. Failed to draw layer named 'points'.
[Thu Oct 15 15:36:02 2020].174649 msFreeMap(): freeing map at 0x559913f1af60.
[Thu Oct 15 15:36:02 2020].174698 freeLayer(): freeing layer at 0x559914207ad0.

I asked for help at the mapserver-users mailing list, and the issue was confirmed by @jmckenna .
Mailing list link

Here is an example of mapfile that causes this issue :
https://pastebin.com/LFxZ1L9T

Setup used : Mapserver 7.6.1 / GDal 3.13 / Proj 7.1.1
MapServer version 7.6.1 OUTPUT=PNG OUTPUT=JPEG OUTPUT=KML SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=SVG_SYMBOLS SUPPORTS=RSVG SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=GEOS SUPPORTS=POINT_Z_M SUPPORTS=PBF INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions