<div dir="ltr">Hi all,<div><br></div><div>My mapserver installation is based on :</div><div><ul><li>Mapserver 7.6.3</li><li>MapCache : 1.12.0</li></ul>I bumped into a configuration (zoom, orientation, ...) where an SVG symbol has one null dimension (height or width).<br>The rendering process crashes with the following error message (<a href="https://github.com/MapServer/MapServer/blob/rel-7-6-3/mapcairo.c">mapcairo.c</a>) :<br>mapserv.fcgi: /builds/i4d/datacenter/mapserver/MapServer/mapcairo.c:1074:<br>msRenderRasterizedSVGSymbol: Assertion `svg_cache->pixmap_buffer->height && svg_cache->pixmap_buffer->width' failed.<br><br>The code snippet  shows :<br>//already rendered at the right size and scale? return<br>if(svg_cache->scale != style->scale || svg_cache->rotation != style->rotation) {<br>...<br>}<br>assert(svg_cache->pixmap_buffer->height && svg_cache->pixmap_buffer->width);<br><br>Instead of crashing the rendering process, wouldn't it be more appropriate to test buffer dimensions beforehands.</div><div>Something like :<br>if ( (svg_cache->pixmap_buffer->height == 0 || (svg_cache->pixmap_buffer->width == 0) )<br>   return MS_FAILURE;<br><br>//already rendered at the right size and scale? return<br>if(svg_cache->scale != style->scale || svg_cache->rotation != style->rotation) {<br>...<br>}<br></div><div><br></div><div>Philippe</div></div>
<font style="font-size: 9px;">The information in this e-mail is confidential. The contents may not be disclosed or used by anyone other than the addressee. Access to this e-mail by anyone else is unauthorised.<br>If you are not the intended recipient, please notify Airbus immediately and delete this e-mail.<br>Airbus cannot accept any responsibility for the accuracy or completeness of this e-mail as it has been sent over public networks. If you have any concerns over the content of this message or its Accuracy or Integrity, please contact Airbus immediately.<br>All outgoing e-mails from Airbus are checked using regularly updated virus scanning software but you should take whatever measures you deem to be appropriate to ensure that this message and any attachments are virus free.</font>