MapServer
MapServer copied to clipboard
A symbolized line is not rendered properly if GEOS disabled and style with OFFSET -99 used.
Expected behavior and actual behavior.
Multiple times renering of mapfile with style (STYLE SYMBOL cloud WIDTH 4 SIZE 10 COLOR 216 0 0 ANGLE AUTO OFFSET 5 -99 END) produces invalid image.
Expected png:

Actual png:

Steps to reproduce the problem.
Here is the files to reproduce the problem: test.zip
The Dockerfile in test.zip is a slightly modified Dockerfile from this repository. I have enabled -DWITH_PYTHON=ON and -DWITH_RSVG=ON, and disabled -DWITH_GEOS=OFF
- extract test.zip
- build docker image: docker build --build-arg GDAL_VERSION=release/2.4 --build-arg MAPSERVER_VERSION=branch-7-6 -t mapserver mapserver
- start the container in separate console: docker -it mapserver
- get the running container id: docker ps
- docker cp ./test.py (container-id):/home/msuser/test.py
- docker cp ./test.map (container-id):/home/msuser/test.map
- docker cp ./cloud.svg (container-id):/home/msuser/cloud.svg
- at the console running the container: cd /home/msuser && python test.py
- the /home/msuser folder will contain invalid test.png file
I looks like the msOffsetCurve function in maputil.c is broken and gcc compiler makes address assignment instead of copy assignment at lines old_pt=p->line[i].point[0]; and const pointObj pt = p->line[i].point[j];
Operating system
Ubuntu 16.04 64 bit Ubuntu 20.04 64 bit
MapServer version and installation method
mapserver branch-7-6, the branch 'main' is affected too Dockerfile from this git
@andrei-varnavskiy I have not verified this, but pull requests are warmly welcomed here :)