<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.apple-converted-space
        {mso-style-name:apple-converted-space;}
span.Shkpostityyli18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 2.0cm 70.85pt 2.0cm;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="FI" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">As a quick workaround edit your DATA:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt">where type in ('trunk','motorway','primary') AND geometry is not null<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt">-Jukka Rahkonen-</span><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">Lähettäjä:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> mapserver-users [mailto:mapserver-users-bounces@lists.osgeo.org]
<b>Puolesta </b>Dave Barter<br>
<b>Lähetetty:</b> 18. elokuuta 2017 16:05<br>
<b>Vastaanottaja:</b> mapserver-users@lists.osgeo.org<br>
<b>Aihe:</b> Re: [mapserver-users] Segfault - LINE layer<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal">On 18 Aug 2017, at 13:44, Lime, Steve D (MNIT) <<a href="mailto:steve.lime@state.mn.us">steve.lime@state.mn.us</a>> wrote:<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif">I'd call it a bug. What version? Can you prepare a small test case?<span class="apple-converted-space"> </span><o:p></o:p></span></p>
</div>
</div>
</blockquote>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">MapServer version 7.0.4 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=THREADS SUPPORTS=GEOS INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I have tracked it down to a specific geometry:-<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">010200000000000000 = ‘LINESTRING EMPTY’<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<div>
<div class="MsoNormal" align="center" style="text-align:center"><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif">
<hr size="3" width="850" style="width:510.1pt" align="center">
</span></div>
<div id="x_divRplyFwdMsg">
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span class="apple-converted-space"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> </span></span><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">mapserver-users
 <<a href="mailto:mapserver-users-bounces@lists.osgeo.org">mapserver-users-bounces@lists.osgeo.org</a>> on behalf of Dave Barter <<a href="mailto:dave@phased.co.uk">dave@phased.co.uk</a>><br>
<b>Sent:</b><span class="apple-converted-space"> </span>Friday, August 18, 2017 5:13:29 AM<br>
<b>To:</b><span class="apple-converted-space"> </span><a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
<b>Subject:</b><span class="apple-converted-space"> </span>[mapserver-users] Segfault - LINE layer</span><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif"><o:p></o:p></span></p>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif"> <o:p></o:p></span></p>
</div>
</div>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Helvetica",sans-serif">This call:-<br>
<br>
/usr/lib/cgi-bin/mapserv.ngx -nh "QUERY_STRING=map=/usr/src/app/mapfiles/api/wms_osm_google_world_bw.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&SERVICE=WMS&STYLES=&BBOX=-6114.962263%2c6099063.360931%2c162657.996191%2c6267836.319384&WIDTH=276&HEIGHT=276&FORMAT=image%2fpng&SRS=EPSG%3a3857&LAYERS=roads8&transparent=false<br>
<br>
Is giving me:-<br>
<br>
Segmentation fault (core dumped)<br>
<br>
For the layer definition:-<br>
<br>
LAYER<br>
    GROUP "default"<br>
    STATUS ON<br>
    TYPE LINE<br>
    MINSCALEDENOM 1300032<br>
    MAXSCALEDENOM 2600064<br>
    NAME "roads8"<br>
    DEBUG 5<br>
    CONNECTIONTYPE postgis<br>
    PROCESSING "CLOSE_CONNECTION=DEFER"<br>
    {%public_map_user%}<br>
    PROJECTION<br>
        "init=epsg:900913"<br>
    END<br>
    DATA "geometry from (select osm_id,geometry,name as name,ref,type from mapping_osm.osm_new_roads_gen1 where type in ('trunk','motorway','primary') order by z_order asc) as foo using unique osm_id using srid=900913"<br>
    LABELITEM "name"<br>
    CLASSITEM "type"<br>
    CLASS<br>
        EXPRESSION {primary,primary_link}<br>
        STYLE<br>
            WIDTH 0.5<br>
            COLOR 242 242 242<br>
        END<br>
    END<br>
    CLASS<br>
        EXPRESSION "motorway"<br>
        TEXT ("[ref]")<br>
        STYLE<br>
           WIDTH 1<br>
           OUTLINEWIDTH 0.5<br>
           OUTLINECOLOR 217 217 217<br>
        END<br>
        STYLE<br>
            WIDTH 1<br>
            COLOR 242 242 242<br>
<br>
        END<br>
    END<br>
    CLASS<br>
        EXPRESSION "trunk"<br>
        TEXT ("[ref]")<br>
        STYLE<br>
           WIDTH 1<br>
           OUTLINEWIDTH 0.5<br>
           OUTLINECOLOR 217 217 217<br>
        END<br>
        STYLE<br>
            WIDTH 1<br>
             COLOR 242 242 242<br>
        END<br>
    END<br>
END<br>
<br>
When I look in my debug file I see the following as last set of lines:-<br>
<br>
[Fri Aug 18 11:09:39 2017].945225 msPostGISReadShape: PQgetlength = 7<br>
[Fri Aug 18 11:09:39 2017].945236 msPostGISReadShape: [type] "primary"<br>
[Fri Aug 18 11:09:39 2017].945248 msPostGISReadShape: PQgetlength = 0<br>
[Fri Aug 18 11:09:39 2017].945259 msPostGISReadShape: [name] ""<br>
[Fri Aug 18 11:09:39 2017].945270 msPostGISReadShape: PQgetlength = 0<br>
[Fri Aug 18 11:09:39 2017].945281 msPostGISReadShape: [ref] ""<br>
[Fri Aug 18 11:09:39 2017].945292 msPostGISReadShape: Setting shape->index = 307691570<br>
[Fri Aug 18 11:09:39 2017].945303 msPostGISReadShape: Setting shape->resultindex = 327<br>
[Fri Aug 18 11:09:39 2017].945314 msPostGISReadShape: [index] 307691570<br>
[Fri Aug 18 11:09:39 2017].945346 msPostGISReadShape: [shape] LINESTRING (139231.1053743003285490 6233477.4797634640708566, 139274.7760105324559845 6233447.9814142314717174)<br>
[Fri Aug 18 11:09:39 2017].945369 msPostGISLayerNextShape called.<br>
[Fri Aug 18 11:09:39 2017].945383 msPostGISReadShape called.<br>
[Fri Aug 18 11:09:39 2017].94<br>
<br>
So it seems to segfault during  msPostGISReadShape.<span class="apple-converted-space"> </span><br>
<br>
I’ve checked the query and it is pulling 3110 linestrings from the database.<span class="apple-converted-space"> </span><br>
<br>
But I am not sure why is is segfaulting? Is this a bug?<br>
<br>
Dave Barter<br>
<a href="mailto:dave@phased.co.uk">dave@phased.co.uk</a><br>
@citizenfishy<br>
<a href="http://www.phased.co.uk/">www.phased.co.uk</a><br>
<br>
_______________________________________________<br>
mapserver-users mailing list<br>
<a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/mapserver-users">https://lists.osgeo.org/mailman/listinfo/mapserver-users</a><o:p></o:p></span></p>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>