Segfault - LINE layer

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Segfault - LINE layer

Dave Barter-3
This call:-

/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

Is giving me:-

Segmentation fault (core dumped)

For the layer definition:-

LAYER
    GROUP "default"
    STATUS ON
    TYPE LINE
    MINSCALEDENOM 1300032
    MAXSCALEDENOM 2600064
    NAME "roads8"
    DEBUG 5
    CONNECTIONTYPE postgis
    PROCESSING "CLOSE_CONNECTION=DEFER"
    {%public_map_user%}
    PROJECTION
        "init=epsg:900913"
    END
    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"
    LABELITEM "name"
    CLASSITEM "type"
    CLASS
        EXPRESSION {primary,primary_link}
        STYLE
            WIDTH 0.5
            COLOR 242 242 242
        END
    END
    CLASS
        EXPRESSION "motorway"
        TEXT ("[ref]")
        STYLE
           WIDTH 1
           OUTLINEWIDTH 0.5
           OUTLINECOLOR 217 217 217
        END
        STYLE
            WIDTH 1
            COLOR 242 242 242

        END
    END
    CLASS
        EXPRESSION "trunk"
        TEXT ("[ref]")
        STYLE
           WIDTH 1
           OUTLINEWIDTH 0.5
           OUTLINECOLOR 217 217 217
        END
        STYLE
            WIDTH 1
             COLOR 242 242 242
        END
    END
END

When I look in my debug file I see the following as last set of lines:-

[Fri Aug 18 11:09:39 2017].945225 msPostGISReadShape: PQgetlength = 7
[Fri Aug 18 11:09:39 2017].945236 msPostGISReadShape: [type] "primary"
[Fri Aug 18 11:09:39 2017].945248 msPostGISReadShape: PQgetlength = 0
[Fri Aug 18 11:09:39 2017].945259 msPostGISReadShape: [name] ""
[Fri Aug 18 11:09:39 2017].945270 msPostGISReadShape: PQgetlength = 0
[Fri Aug 18 11:09:39 2017].945281 msPostGISReadShape: [ref] ""
[Fri Aug 18 11:09:39 2017].945292 msPostGISReadShape: Setting shape->index = 307691570
[Fri Aug 18 11:09:39 2017].945303 msPostGISReadShape: Setting shape->resultindex = 327
[Fri Aug 18 11:09:39 2017].945314 msPostGISReadShape: [index] 307691570
[Fri Aug 18 11:09:39 2017].945346 msPostGISReadShape: [shape] LINESTRING (139231.1053743003285490 6233477.4797634640708566, 139274.7760105324559845 6233447.9814142314717174)
[Fri Aug 18 11:09:39 2017].945369 msPostGISLayerNextShape called.
[Fri Aug 18 11:09:39 2017].945383 msPostGISReadShape called.
[Fri Aug 18 11:09:39 2017].94

So it seems to segfault during  msPostGISReadShape.

I’ve checked the query and it is pulling 3110 linestrings from the database.

But I am not sure why is is segfaulting? Is this a bug?

Dave Barter
[hidden email]
@citizenfishy
www.phased.co.uk

_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users
Reply | Threaded
Open this post in threaded view
|

Re: Segfault - LINE layer

Lime, Steve D (MNIT)
I'd call it a bug. What version? Can you prepare a small test case?
From: mapserver-users <[hidden email]> on behalf of Dave Barter <[hidden email]>
Sent: Friday, August 18, 2017 5:13:29 AM
To: [hidden email]
Subject: [mapserver-users] Segfault - LINE layer
 
This call:-

/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

Is giving me:-

Segmentation fault (core dumped)

For the layer definition:-

LAYER
    GROUP "default"
    STATUS ON
    TYPE LINE
    MINSCALEDENOM 1300032
    MAXSCALEDENOM 2600064
    NAME "roads8"
    DEBUG 5
    CONNECTIONTYPE postgis
    PROCESSING "CLOSE_CONNECTION=DEFER"
    {%public_map_user%}
    PROJECTION
        "init=epsg:900913"
    END
    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"
    LABELITEM "name"
    CLASSITEM "type"
    CLASS
        EXPRESSION {primary,primary_link}
        STYLE
            WIDTH 0.5
            COLOR 242 242 242
        END
    END
    CLASS
        EXPRESSION "motorway"
        TEXT ("[ref]")
        STYLE
           WIDTH 1
           OUTLINEWIDTH 0.5
           OUTLINECOLOR 217 217 217
        END
        STYLE
            WIDTH 1
            COLOR 242 242 242

        END
    END
    CLASS
        EXPRESSION "trunk"
        TEXT ("[ref]")
        STYLE
           WIDTH 1
           OUTLINEWIDTH 0.5
           OUTLINECOLOR 217 217 217
        END
        STYLE
            WIDTH 1
             COLOR 242 242 242
        END
    END
END

When I look in my debug file I see the following as last set of lines:-

[Fri Aug 18 11:09:39 2017].945225 msPostGISReadShape: PQgetlength = 7
[Fri Aug 18 11:09:39 2017].945236 msPostGISReadShape: [type] "primary"
[Fri Aug 18 11:09:39 2017].945248 msPostGISReadShape: PQgetlength = 0
[Fri Aug 18 11:09:39 2017].945259 msPostGISReadShape: [name] ""
[Fri Aug 18 11:09:39 2017].945270 msPostGISReadShape: PQgetlength = 0
[Fri Aug 18 11:09:39 2017].945281 msPostGISReadShape: [ref] ""
[Fri Aug 18 11:09:39 2017].945292 msPostGISReadShape: Setting shape->index = 307691570
[Fri Aug 18 11:09:39 2017].945303 msPostGISReadShape: Setting shape->resultindex = 327
[Fri Aug 18 11:09:39 2017].945314 msPostGISReadShape: [index] 307691570
[Fri Aug 18 11:09:39 2017].945346 msPostGISReadShape: [shape] LINESTRING (139231.1053743003285490 6233477.4797634640708566, 139274.7760105324559845 6233447.9814142314717174)
[Fri Aug 18 11:09:39 2017].945369 msPostGISLayerNextShape called.
[Fri Aug 18 11:09:39 2017].945383 msPostGISReadShape called.
[Fri Aug 18 11:09:39 2017].94

So it seems to segfault during  msPostGISReadShape.

I’ve checked the query and it is pulling 3110 linestrings from the database.

But I am not sure why is is segfaulting? Is this a bug?

Dave Barter
[hidden email]
@citizenfishy
www.phased.co.uk

_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users

_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users
Reply | Threaded
Open this post in threaded view
|

Re: Segfault - LINE layer

Dave Barter-3

On 18 Aug 2017, at 13:44, Lime, Steve D (MNIT) <[hidden email]> wrote:

I'd call it a bug. What version? Can you prepare a small test case? 

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

I have tracked it down to a specific geometry:-

010200000000000000 = ‘LINESTRING EMPTY’




From: mapserver-users <[hidden email]> on behalf of Dave Barter <[hidden email]>
Sent: Friday, August 18, 2017 5:13:29 AM
To: [hidden email]
Subject: [mapserver-users] Segfault - LINE layer
 
This call:-

/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

Is giving me:-

Segmentation fault (core dumped)

For the layer definition:-

LAYER
    GROUP "default"
    STATUS ON
    TYPE LINE
    MINSCALEDENOM 1300032
    MAXSCALEDENOM 2600064
    NAME "roads8"
    DEBUG 5
    CONNECTIONTYPE postgis
    PROCESSING "CLOSE_CONNECTION=DEFER"
    {%public_map_user%}
    PROJECTION
        "init=epsg:900913"
    END
    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"
    LABELITEM "name"
    CLASSITEM "type"
    CLASS
        EXPRESSION {primary,primary_link}
        STYLE
            WIDTH 0.5
            COLOR 242 242 242
        END
    END
    CLASS
        EXPRESSION "motorway"
        TEXT ("[ref]")
        STYLE
           WIDTH 1
           OUTLINEWIDTH 0.5
           OUTLINECOLOR 217 217 217
        END
        STYLE
            WIDTH 1
            COLOR 242 242 242

        END
    END
    CLASS
        EXPRESSION "trunk"
        TEXT ("[ref]")
        STYLE
           WIDTH 1
           OUTLINEWIDTH 0.5
           OUTLINECOLOR 217 217 217
        END
        STYLE
            WIDTH 1
             COLOR 242 242 242
        END
    END
END

When I look in my debug file I see the following as last set of lines:-

[Fri Aug 18 11:09:39 2017].945225 msPostGISReadShape: PQgetlength = 7
[Fri Aug 18 11:09:39 2017].945236 msPostGISReadShape: [type] "primary"
[Fri Aug 18 11:09:39 2017].945248 msPostGISReadShape: PQgetlength = 0
[Fri Aug 18 11:09:39 2017].945259 msPostGISReadShape: [name] ""
[Fri Aug 18 11:09:39 2017].945270 msPostGISReadShape: PQgetlength = 0
[Fri Aug 18 11:09:39 2017].945281 msPostGISReadShape: [ref] ""
[Fri Aug 18 11:09:39 2017].945292 msPostGISReadShape: Setting shape->index = 307691570
[Fri Aug 18 11:09:39 2017].945303 msPostGISReadShape: Setting shape->resultindex = 327
[Fri Aug 18 11:09:39 2017].945314 msPostGISReadShape: [index] 307691570
[Fri Aug 18 11:09:39 2017].945346 msPostGISReadShape: [shape] LINESTRING (139231.1053743003285490 6233477.4797634640708566, 139274.7760105324559845 6233447.9814142314717174)
[Fri Aug 18 11:09:39 2017].945369 msPostGISLayerNextShape called.
[Fri Aug 18 11:09:39 2017].945383 msPostGISReadShape called.
[Fri Aug 18 11:09:39 2017].94

So it seems to segfault during  msPostGISReadShape. 

I’ve checked the query and it is pulling 3110 linestrings from the database. 

But I am not sure why is is segfaulting? Is this a bug?

Dave Barter
[hidden email]
@citizenfishy
www.phased.co.uk

_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users


_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users
Reply | Threaded
Open this post in threaded view
|

Re: Segfault - LINE layer

jratike80
In reply to this post by Dave Barter-3

Hi,

 

As a quick workaround edit your DATA:

 

where type in ('trunk','motorway','primary') AND geometry is not null

 

-Jukka Rahkonen-

 

Lähettäjä: mapserver-users [mailto:[hidden email]] Puolesta Dave Barter
Lähetetty: 18. elokuuta 2017 16:05
Vastaanottaja: [hidden email]
Aihe: Re: [mapserver-users] Segfault - LINE layer

 

 

On 18 Aug 2017, at 13:44, Lime, Steve D (MNIT) <[hidden email]> wrote:

 

I'd call it a bug. What version? Can you prepare a small test case? 

 

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

 

I have tracked it down to a specific geometry:-

 

010200000000000000 = ‘LINESTRING EMPTY’

 

 

 


From: mapserver-users <[hidden email]> on behalf of Dave Barter <[hidden email]>
Sent: Friday, August 18, 2017 5:13:29 AM
To: [hidden email]
Subject: [mapserver-users] Segfault - LINE layer

 

This call:-

/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

Is giving me:-

Segmentation fault (core dumped)

For the layer definition:-

LAYER
    GROUP "default"
    STATUS ON
    TYPE LINE
    MINSCALEDENOM 1300032
    MAXSCALEDENOM 2600064
    NAME "roads8"
    DEBUG 5
    CONNECTIONTYPE postgis
    PROCESSING "CLOSE_CONNECTION=DEFER"
    {%public_map_user%}
    PROJECTION
        "init=epsg:900913"
    END
    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"
    LABELITEM "name"
    CLASSITEM "type"
    CLASS
        EXPRESSION {primary,primary_link}
        STYLE
            WIDTH 0.5
            COLOR 242 242 242
        END
    END
    CLASS
        EXPRESSION "motorway"
        TEXT ("[ref]")
        STYLE
           WIDTH 1
           OUTLINEWIDTH 0.5
           OUTLINECOLOR 217 217 217
        END
        STYLE
            WIDTH 1
            COLOR 242 242 242

        END
    END
    CLASS
        EXPRESSION "trunk"
        TEXT ("[ref]")
        STYLE
           WIDTH 1
           OUTLINEWIDTH 0.5
           OUTLINECOLOR 217 217 217
        END
        STYLE
            WIDTH 1
             COLOR 242 242 242
        END
    END
END

When I look in my debug file I see the following as last set of lines:-

[Fri Aug 18 11:09:39 2017].945225 msPostGISReadShape: PQgetlength = 7
[Fri Aug 18 11:09:39 2017].945236 msPostGISReadShape: [type] "primary"
[Fri Aug 18 11:09:39 2017].945248 msPostGISReadShape: PQgetlength = 0
[Fri Aug 18 11:09:39 2017].945259 msPostGISReadShape: [name] ""
[Fri Aug 18 11:09:39 2017].945270 msPostGISReadShape: PQgetlength = 0
[Fri Aug 18 11:09:39 2017].945281 msPostGISReadShape: [ref] ""
[Fri Aug 18 11:09:39 2017].945292 msPostGISReadShape: Setting shape->index = 307691570
[Fri Aug 18 11:09:39 2017].945303 msPostGISReadShape: Setting shape->resultindex = 327
[Fri Aug 18 11:09:39 2017].945314 msPostGISReadShape: [index] 307691570
[Fri Aug 18 11:09:39 2017].945346 msPostGISReadShape: [shape] LINESTRING (139231.1053743003285490 6233477.4797634640708566, 139274.7760105324559845 6233447.9814142314717174)
[Fri Aug 18 11:09:39 2017].945369 msPostGISLayerNextShape called.
[Fri Aug 18 11:09:39 2017].945383 msPostGISReadShape called.
[Fri Aug 18 11:09:39 2017].94

So it seems to segfault during  msPostGISReadShape. 

I’ve checked the query and it is pulling 3110 linestrings from the database. 

But I am not sure why is is segfaulting? Is this a bug?

Dave Barter
[hidden email]
@citizenfishy
www.phased.co.uk

_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users

 


_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users
Reply | Threaded
Open this post in threaded view
|

Re: Segfault - LINE layer

Dave Barter-3

 
As a quick workaround edit your DATA:
 
where type in ('trunk','motorway','primary') AND geometry is not null
 
-Jukka Rahkonen-


That will not work as an empty geometry is not null

The fix is WHERE NOT ST_EMPTY(geometry)


 
Lähettäjä: mapserver-users [[hidden email]] Puolesta Dave Barter
Lähetetty: 18. elokuuta 2017 16:05
Vastaanottaja: [hidden email]
Aihe: Re: [mapserver-users] Segfault - LINE layer
 
 
On 18 Aug 2017, at 13:44, Lime, Steve D (MNIT) <[hidden email]> wrote:
 
I'd call it a bug. What version? Can you prepare a small test case? 
 
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
 
I have tracked it down to a specific geometry:-
 
010200000000000000 = ‘LINESTRING EMPTY’
 
 
 

From: mapserver-users <[hidden email]> on behalf of Dave Barter <[hidden email]>
Sent: Friday, August 18, 2017 5:13:29 AM
To: [hidden email]
Subject: [mapserver-users] Segfault - LINE layer
 
This call:-

/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

Is giving me:-

Segmentation fault (core dumped)

For the layer definition:-

LAYER
    GROUP "default"
    STATUS ON
    TYPE LINE
    MINSCALEDENOM 1300032
    MAXSCALEDENOM 2600064
    NAME "roads8"
    DEBUG 5
    CONNECTIONTYPE postgis
    PROCESSING "CLOSE_CONNECTION=DEFER"
    {%public_map_user%}
    PROJECTION
        "init=epsg:900913"
    END
    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"
    LABELITEM "name"
    CLASSITEM "type"
    CLASS
        EXPRESSION {primary,primary_link}
        STYLE
            WIDTH 0.5
            COLOR 242 242 242
        END
    END
    CLASS
        EXPRESSION "motorway"
        TEXT ("[ref]")
        STYLE
           WIDTH 1
           OUTLINEWIDTH 0.5
           OUTLINECOLOR 217 217 217
        END
        STYLE
            WIDTH 1
            COLOR 242 242 242

        END
    END
    CLASS
        EXPRESSION "trunk"
        TEXT ("[ref]")
        STYLE
           WIDTH 1
           OUTLINEWIDTH 0.5
           OUTLINECOLOR 217 217 217
        END
        STYLE
            WIDTH 1
             COLOR 242 242 242
        END
    END
END

When I look in my debug file I see the following as last set of lines:-

[Fri Aug 18 11:09:39 2017].945225 msPostGISReadShape: PQgetlength = 7
[Fri Aug 18 11:09:39 2017].945236 msPostGISReadShape: [type] "primary"
[Fri Aug 18 11:09:39 2017].945248 msPostGISReadShape: PQgetlength = 0
[Fri Aug 18 11:09:39 2017].945259 msPostGISReadShape: [name] ""
[Fri Aug 18 11:09:39 2017].945270 msPostGISReadShape: PQgetlength = 0
[Fri Aug 18 11:09:39 2017].945281 msPostGISReadShape: [ref] ""
[Fri Aug 18 11:09:39 2017].945292 msPostGISReadShape: Setting shape->index = 307691570
[Fri Aug 18 11:09:39 2017].945303 msPostGISReadShape: Setting shape->resultindex = 327
[Fri Aug 18 11:09:39 2017].945314 msPostGISReadShape: [index] 307691570
[Fri Aug 18 11:09:39 2017].945346 msPostGISReadShape: [shape] LINESTRING (139231.1053743003285490 6233477.4797634640708566, 139274.7760105324559845 6233447.9814142314717174)
[Fri Aug 18 11:09:39 2017].945369 msPostGISLayerNextShape called.
[Fri Aug 18 11:09:39 2017].945383 msPostGISReadShape called.
[Fri Aug 18 11:09:39 2017].94

So it seems to segfault during  msPostGISReadShape. 

I’ve checked the query and it is pulling 3110 linestrings from the database. 

But I am not sure why is is segfaulting? Is this a bug?

Dave Barter
[hidden email]
@citizenfishy
www.phased.co.uk

_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users


_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users
Reply | Threaded
Open this post in threaded view
|

Re: Segfault - LINE layer

Lime, Steve D (MNIT)

Still it the code should gracefully skip empty geometries. Can you create a ticket please?

 

From: mapserver-users [mailto:[hidden email]] On Behalf Of Dave Barter
Sent: Friday, August 18, 2017 9:56 AM
To: [hidden email]
Subject: Re: [mapserver-users] Segfault - LINE layer

 

 

 

As a quick workaround edit your DATA:

 

where type in ('trunk','motorway','primary') AND geometry is not null

 

-Jukka Rahkonen-

 

 

That will not work as an empty geometry is not null

 

The fix is WHERE NOT ST_EMPTY(geometry)

 



 

Lähettäjä: mapserver-users [[hidden email]] Puolesta Dave Barter
Lähetetty: 18. elokuuta 2017 16:05
Vastaanottaja: [hidden email]
Aihe: Re: [mapserver-users] Segfault - LINE layer

 

 

On 18 Aug 2017, at 13:44, Lime, Steve D (MNIT) <[hidden email]> wrote:

 

I'd call it a bug. What version? Can you prepare a small test case? 

 

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

 

I have tracked it down to a specific geometry:-

 

010200000000000000 = ‘LINESTRING EMPTY’

 

 

 


From: mapserver-users <[hidden email]> on behalf of Dave Barter <[hidden email]>
Sent: Friday, August 18, 2017 5:13:29 AM
To: [hidden email]
Subject: [mapserver-users] Segfault - LINE layer

 

This call:-

/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

Is giving me:-

Segmentation fault (core dumped)

For the layer definition:-

LAYER
    GROUP "default"
    STATUS ON
    TYPE LINE
    MINSCALEDENOM 1300032
    MAXSCALEDENOM 2600064
    NAME "roads8"
    DEBUG 5
    CONNECTIONTYPE postgis
    PROCESSING "CLOSE_CONNECTION=DEFER"
    {%public_map_user%}
    PROJECTION
        "init=epsg:900913"
    END
    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"
    LABELITEM "name"
    CLASSITEM "type"
    CLASS
        EXPRESSION {primary,primary_link}
        STYLE
            WIDTH 0.5
            COLOR 242 242 242
        END
    END
    CLASS
        EXPRESSION "motorway"
        TEXT ("[ref]")
        STYLE
           WIDTH 1
           OUTLINEWIDTH 0.5
           OUTLINECOLOR 217 217 217
        END
        STYLE
            WIDTH 1
            COLOR 242 242 242

        END
    END
    CLASS
        EXPRESSION "trunk"
        TEXT ("[ref]")
        STYLE
           WIDTH 1
           OUTLINEWIDTH 0.5
           OUTLINECOLOR 217 217 217
        END
        STYLE
            WIDTH 1
             COLOR 242 242 242
        END
    END
END

When I look in my debug file I see the following as last set of lines:-

[Fri Aug 18 11:09:39 2017].945225 msPostGISReadShape: PQgetlength = 7
[Fri Aug 18 11:09:39 2017].945236 msPostGISReadShape: [type] "primary"
[Fri Aug 18 11:09:39 2017].945248 msPostGISReadShape: PQgetlength = 0
[Fri Aug 18 11:09:39 2017].945259 msPostGISReadShape: [name] ""
[Fri Aug 18 11:09:39 2017].945270 msPostGISReadShape: PQgetlength = 0
[Fri Aug 18 11:09:39 2017].945281 msPostGISReadShape: [ref] ""
[Fri Aug 18 11:09:39 2017].945292 msPostGISReadShape: Setting shape->index = 307691570
[Fri Aug 18 11:09:39 2017].945303 msPostGISReadShape: Setting shape->resultindex = 327
[Fri Aug 18 11:09:39 2017].945314 msPostGISReadShape: [index] 307691570
[Fri Aug 18 11:09:39 2017].945346 msPostGISReadShape: [shape] LINESTRING (139231.1053743003285490 6233477.4797634640708566, 139274.7760105324559845 6233447.9814142314717174)
[Fri Aug 18 11:09:39 2017].945369 msPostGISLayerNextShape called.
[Fri Aug 18 11:09:39 2017].945383 msPostGISReadShape called.
[Fri Aug 18 11:09:39 2017].94

So it seems to segfault during  msPostGISReadShape. 

I’ve checked the query and it is pulling 3110 linestrings from the database. 

But I am not sure why is is segfaulting? Is this a bug?

Dave Barter
[hidden email]
@citizenfishy
www.phased.co.uk

_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users

 


_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users
Reply | Threaded
Open this post in threaded view
|

Re: Segfault - LINE layer

Andrea Peri
Hi, I guess the avoid of empty or null geometries should happened surely in wms service.
Not sure It is good in wfs services.

A.

Il 18 Ago 2017 17:19, "Lime, Steve D (MNIT)" <[hidden email]> ha scritto:

Still it the code should gracefully skip empty geometries. Can you create a ticket please?

 

From: mapserver-users [mailto:[hidden email]] On Behalf Of Dave Barter
Sent: Friday, August 18, 2017 9:56 AM
To: [hidden email]
Subject: Re: [mapserver-users] Segfault - LINE layer

 

 

 

As a quick workaround edit your DATA:

 

where type in ('trunk','motorway','primary') AND geometry is not null

 

-Jukka Rahkonen-

 

 

That will not work as an empty geometry is not null

 

The fix is WHERE NOT ST_EMPTY(geometry)

 



 

Lähettäjä: mapserver-users [[hidden email]] Puolesta Dave Barter
Lähetetty: 18. elokuuta 2017 16:05
Vastaanottaja: [hidden email]
Aihe: Re: [mapserver-users] Segfault - LINE layer

 

 

On 18 Aug 2017, at 13:44, Lime, Steve D (MNIT) <[hidden email]> wrote:

 

I'd call it a bug. What version? Can you prepare a small test case? 

 

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

 

I have tracked it down to a specific geometry:-

 

010200000000000000 = ‘LINESTRING EMPTY’

 

 

 


From: mapserver-users <[hidden email]> on behalf of Dave Barter <[hidden email]>
Sent: Friday, August 18, 2017 5:13:29 AM
To: [hidden email]
Subject: [mapserver-users] Segfault - LINE layer

 

This call:-

/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

Is giving me:-

Segmentation fault (core dumped)

For the layer definition:-

LAYER
    GROUP "default"
    STATUS ON
    TYPE LINE
    MINSCALEDENOM 1300032
    MAXSCALEDENOM 2600064
    NAME "roads8"
    DEBUG 5
    CONNECTIONTYPE postgis
    PROCESSING "CLOSE_CONNECTION=DEFER"
    {%public_map_user%}
    PROJECTION
        "init=epsg:900913"
    END
    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"
    LABELITEM "name"
    CLASSITEM "type"
    CLASS
        EXPRESSION {primary,primary_link}
        STYLE
            WIDTH 0.5
            COLOR 242 242 242
        END
    END
    CLASS
        EXPRESSION "motorway"
        TEXT ("[ref]")
        STYLE
           WIDTH 1
           OUTLINEWIDTH 0.5
           OUTLINECOLOR 217 217 217
        END
        STYLE
            WIDTH 1
            COLOR 242 242 242

        END
    END
    CLASS
        EXPRESSION "trunk"
        TEXT ("[ref]")
        STYLE
           WIDTH 1
           OUTLINEWIDTH 0.5
           OUTLINECOLOR 217 217 217
        END
        STYLE
            WIDTH 1
             COLOR 242 242 242
        END
    END
END

When I look in my debug file I see the following as last set of lines:-

[Fri Aug 18 11:09:39 2017].945225 msPostGISReadShape: PQgetlength = 7
[Fri Aug 18 11:09:39 2017].945236 msPostGISReadShape: [type] "primary"
[Fri Aug 18 11:09:39 2017].945248 msPostGISReadShape: PQgetlength = 0
[Fri Aug 18 11:09:39 2017].945259 msPostGISReadShape: [name] ""
[Fri Aug 18 11:09:39 2017].945270 msPostGISReadShape: PQgetlength = 0
[Fri Aug 18 11:09:39 2017].945281 msPostGISReadShape: [ref] ""
[Fri Aug 18 11:09:39 2017].945292 msPostGISReadShape: Setting shape->index = 307691570
[Fri Aug 18 11:09:39 2017].945303 msPostGISReadShape: Setting shape->resultindex = 327
[Fri Aug 18 11:09:39 2017].945314 msPostGISReadShape: [index] 307691570
[Fri Aug 18 11:09:39 2017].945346 msPostGISReadShape: [shape] LINESTRING (139231.1053743003285490 6233477.4797634640708566, 139274.7760105324559845 6233447.9814142314717174)
[Fri Aug 18 11:09:39 2017].945369 msPostGISLayerNextShape called.
[Fri Aug 18 11:09:39 2017].945383 msPostGISReadShape called.
[Fri Aug 18 11:09:39 2017].94

So it seems to segfault during  msPostGISReadShape. 

I’ve checked the query and it is pulling 3110 linestrings from the database. 

But I am not sure why is is segfaulting? Is this a bug?

Dave Barter
[hidden email]
@citizenfishy
www.phased.co.uk

_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users

 


_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users


_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users
Reply | Threaded
Open this post in threaded view
|

Re: Segfault - LINE layer

Lime, Steve D (MNIT)
agreed, shouldn't segfault in either case
From: Andrea Peri <[hidden email]>
Sent: Friday, August 18, 2017 2:22:15 PM
To: Lime, Steve D (MNIT)
Cc: Dave Barter; [hidden email]
Subject: Re: [mapserver-users] Segfault - LINE layer
 
Hi, I guess the avoid of empty or null geometries should happened surely in wms service.
Not sure It is good in wfs services.

A.

Il 18 Ago 2017 17:19, "Lime, Steve D (MNIT)" <[hidden email]> ha scritto:

Still it the code should gracefully skip empty geometries. Can you create a ticket please?

 

From: mapserver-users [mailto:[hidden email]] On Behalf Of Dave Barter
Sent: Friday, August 18, 2017 9:56 AM
To: [hidden email]
Subject: Re: [mapserver-users] Segfault - LINE layer

 

 

 

As a quick workaround edit your DATA:

 

where type in ('trunk','motorway','primary') AND geometry is not null

 

-Jukka Rahkonen-

 

 

That will not work as an empty geometry is not null

 

The fix is WHERE NOT ST_EMPTY(geometry)

 



 

Lähettäjä: mapserver-users [[hidden email]] Puolesta Dave Barter
Lähetetty: 18. elokuuta 2017 16:05
Vastaanottaja: [hidden email]
Aihe: Re: [mapserver-users] Segfault - LINE layer

 

 

On 18 Aug 2017, at 13:44, Lime, Steve D (MNIT) <[hidden email]> wrote:

 

I'd call it a bug. What version? Can you prepare a small test case? 

 

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

 

I have tracked it down to a specific geometry:-

 

010200000000000000 = ‘LINESTRING EMPTY’

 

 

 


From: mapserver-users <[hidden email]> on behalf of Dave Barter <[hidden email]>
Sent: Friday, August 18, 2017 5:13:29 AM
To: [hidden email]
Subject: [mapserver-users] Segfault - LINE layer

 

This call:-

/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

Is giving me:-

Segmentation fault (core dumped)

For the layer definition:-

LAYER
    GROUP "default"
    STATUS ON
    TYPE LINE
    MINSCALEDENOM 1300032
    MAXSCALEDENOM 2600064
    NAME "roads8"
    DEBUG 5
    CONNECTIONTYPE postgis
    PROCESSING "CLOSE_CONNECTION=DEFER"
    {%public_map_user%}
    PROJECTION
        "init=epsg:900913"
    END
    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"
    LABELITEM "name"
    CLASSITEM "type"
    CLASS
        EXPRESSION {primary,primary_link}
        STYLE
            WIDTH 0.5
            COLOR 242 242 242
        END
    END
    CLASS
        EXPRESSION "motorway"
        TEXT ("[ref]")
        STYLE
           WIDTH 1
           OUTLINEWIDTH 0.5
           OUTLINECOLOR 217 217 217
        END
        STYLE
            WIDTH 1
            COLOR 242 242 242

        END
    END
    CLASS
        EXPRESSION "trunk"
        TEXT ("[ref]")
        STYLE
           WIDTH 1
           OUTLINEWIDTH 0.5
           OUTLINECOLOR 217 217 217
        END
        STYLE
            WIDTH 1
             COLOR 242 242 242
        END
    END
END

When I look in my debug file I see the following as last set of lines:-

[Fri Aug 18 11:09:39 2017].945225 msPostGISReadShape: PQgetlength = 7
[Fri Aug 18 11:09:39 2017].945236 msPostGISReadShape: [type] "primary"
[Fri Aug 18 11:09:39 2017].945248 msPostGISReadShape: PQgetlength = 0
[Fri Aug 18 11:09:39 2017].945259 msPostGISReadShape: [name] ""
[Fri Aug 18 11:09:39 2017].945270 msPostGISReadShape: PQgetlength = 0
[Fri Aug 18 11:09:39 2017].945281 msPostGISReadShape: [ref] ""
[Fri Aug 18 11:09:39 2017].945292 msPostGISReadShape: Setting shape->index = 307691570
[Fri Aug 18 11:09:39 2017].945303 msPostGISReadShape: Setting shape->resultindex = 327
[Fri Aug 18 11:09:39 2017].945314 msPostGISReadShape: [index] 307691570
[Fri Aug 18 11:09:39 2017].945346 msPostGISReadShape: [shape] LINESTRING (139231.1053743003285490 6233477.4797634640708566, 139274.7760105324559845 6233447.9814142314717174)
[Fri Aug 18 11:09:39 2017].945369 msPostGISLayerNextShape called.
[Fri Aug 18 11:09:39 2017].945383 msPostGISReadShape called.
[Fri Aug 18 11:09:39 2017].94

So it seems to segfault during  msPostGISReadShape. 

I’ve checked the query and it is pulling 3110 linestrings from the database. 

But I am not sure why is is segfaulting? Is this a bug?

Dave Barter
[hidden email]
@citizenfishy
www.phased.co.uk

_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users

 


_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users


_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users
Reply | Threaded
Open this post in threaded view
|

Re: Segfault - LINE layer

jratike80

Hi,


Agreed, it shouldn't segfault, but I do not quite understand how these empty geometries ever get selected.  It is PostGIS backend and WMS GetMap request. As far as I know Mapserver in this case adds the "&&" or "bounding boxes intersect" query to the main query by using the layer extent as reference. As far as I know the only way to prevent this is to set metadata item "wfs_use_default_extent_for_getfeature" to false as documented in http://mapserver.org/ogc/wfs_server.html and even then this only affects WFS service.


I made a test with PostGIS by interting two geometries into a table:

POLYGON (( 40 40, 40 120, 120 120, 120 40, 40 40 ))

LINESTRING EMPTY


Query

select * from bbox_test
where "GEOMETRY" && ST_GeomFromText('POLYGON (( 40 40, 40 120, 120 120, 120 40, 40 40 ))');

does not return the empty geometry.


I believe that Dave has something not typical in his environment. As he said, OSM data tend to have empty geometries but for most users rendering OS data still works. What have given problems for me are not empty geometries but invalid ones, typically polygons with only three vertices A-B-A.


Dave, please add DEBUG 5 into your layer. It should then log the exact SQL that Mapserver is generating. Check if the && part is added into the query and if it is run the same query diretly with pgAdmin and see if the empty geometries are really selected.


-Jukka Rahkonen-



Lähettäjä: mapserver-users <[hidden email]> käyttäjän puolestaLime, Steve D (MNIT) <[hidden email]>
Lähetetty: 18. elokuuta 2017 23:45
Vastaanottaja: Andrea Peri
Kopio: Dave Barter; [hidden email]
Aihe: Re: [mapserver-users] Segfault - LINE layer
 
agreed, shouldn't segfault in either case
From: Andrea Peri <[hidden email]>
Sent: Friday, August 18, 2017 2:22:15 PM
To: Lime, Steve D (MNIT)
Cc: Dave Barter; [hidden email]
Subject: Re: [mapserver-users] Segfault - LINE layer
 
Hi, I guess the avoid of empty or null geometries should happened surely in wms service.
Not sure It is good in wfs services.

A.

Il 18 Ago 2017 17:19, "Lime, Steve D (MNIT)" <[hidden email]> ha scritto:

Still it the code should gracefully skip empty geometries. Can you create a ticket please?

 

From: mapserver-users [mailto:[hidden email]] On Behalf Of Dave Barter
Sent: Friday, August 18, 2017 9:56 AM
To: [hidden email]
Subject: Re: [mapserver-users] Segfault - LINE layer

 

 

 

As a quick workaround edit your DATA:

 

where type in ('trunk','motorway','primary') AND geometry is not null

 

-Jukka Rahkonen-

 

 

That will not work as an empty geometry is not null

 

The fix is WHERE NOT ST_EMPTY(geometry)

 



 

Lähettäjä: mapserver-users [[hidden email]] Puolesta Dave Barter
Lähetetty: 18. elokuuta 2017 16:05
Vastaanottaja: [hidden email]
Aihe: Re: [mapserver-users] Segfault - LINE layer

 

 

On 18 Aug 2017, at 13:44, Lime, Steve D (MNIT) <[hidden email]> wrote:

 

I'd call it a bug. What version? Can you prepare a small test case? 

 

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

 

I have tracked it down to a specific geometry:-

 

010200000000000000 = ‘LINESTRING EMPTY’

 

 

 


From: mapserver-users <[hidden email]> on behalf of Dave Barter <[hidden email]>
Sent: Friday, August 18, 2017 5:13:29 AM
To: [hidden email]
Subject: [mapserver-users] Segfault - LINE layer

 

This call:-

/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

Is giving me:-

Segmentation fault (core dumped)

For the layer definition:-

LAYER
    GROUP "default"
    STATUS ON
    TYPE LINE
    MINSCALEDENOM 1300032
    MAXSCALEDENOM 2600064
    NAME "roads8"
    DEBUG 5
    CONNECTIONTYPE postgis
    PROCESSING "CLOSE_CONNECTION=DEFER"
    {%public_map_user%}
    PROJECTION
        "init=epsg:900913"
    END
    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"
    LABELITEM "name"
    CLASSITEM "type"
    CLASS
        EXPRESSION {primary,primary_link}
        STYLE
            WIDTH 0.5
            COLOR 242 242 242
        END
    END
    CLASS
        EXPRESSION "motorway"
        TEXT ("[ref]")
        STYLE
           WIDTH 1
           OUTLINEWIDTH 0.5
           OUTLINECOLOR 217 217 217
        END
        STYLE
            WIDTH 1
            COLOR 242 242 242

        END
    END
    CLASS
        EXPRESSION "trunk"
        TEXT ("[ref]")
        STYLE
           WIDTH 1
           OUTLINEWIDTH 0.5
           OUTLINECOLOR 217 217 217
        END
        STYLE
            WIDTH 1
             COLOR 242 242 242
        END
    END
END

When I look in my debug file I see the following as last set of lines:-

[Fri Aug 18 11:09:39 2017].945225 msPostGISReadShape: PQgetlength = 7
[Fri Aug 18 11:09:39 2017].945236 msPostGISReadShape: [type] "primary"
[Fri Aug 18 11:09:39 2017].945248 msPostGISReadShape: PQgetlength = 0
[Fri Aug 18 11:09:39 2017].945259 msPostGISReadShape: [name] ""
[Fri Aug 18 11:09:39 2017].945270 msPostGISReadShape: PQgetlength = 0
[Fri Aug 18 11:09:39 2017].945281 msPostGISReadShape: [ref] ""
[Fri Aug 18 11:09:39 2017].945292 msPostGISReadShape: Setting shape->index = 307691570
[Fri Aug 18 11:09:39 2017].945303 msPostGISReadShape: Setting shape->resultindex = 327
[Fri Aug 18 11:09:39 2017].945314 msPostGISReadShape: [index] 307691570
[Fri Aug 18 11:09:39 2017].945346 msPostGISReadShape: [shape] LINESTRING (139231.1053743003285490 6233477.4797634640708566, 139274.7760105324559845 6233447.9814142314717174)
[Fri Aug 18 11:09:39 2017].945369 msPostGISLayerNextShape called.
[Fri Aug 18 11:09:39 2017].945383 msPostGISReadShape called.
[Fri Aug 18 11:09:39 2017].94

So it seems to segfault during  msPostGISReadShape. 

I’ve checked the query and it is pulling 3110 linestrings from the database. 

But I am not sure why is is segfaulting? Is this a bug?

Dave Barter
[hidden email]
@citizenfishy
www.phased.co.uk

_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users

 


_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users


_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users