[mapserver-users] mapserver 6.4.1 crash on raster query

2016-07-13 Thread Stephen Woodbridge

Hi all,

I am getting a crash with memory corruption in mapserver 6.4.1 when 
doing a query. The strange this is that I have two identical mapfiles 
where the only difference is the tif files being referenced by it and 
while they both crash the errors are slightly different as can be seen 
in the gdb backtrace below.


Any thoughts on how to fix this?

-Steve W

# /usr/lib/cgi-bin/mapserv -v
MapServer version 6.4.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=KML 
SUPPORTS=PROJ SUPPORTS=GD 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


The details follow:

LAYER
NAME "query"
STATUS ON
TYPE raster
PROJECTION "init=epsg:4326" END
TOLERANCE 0
TOLERANCEUNITS pixels
DATA "/maps/wms/data/HYCOM/HYCOM-today-currents.tif"
#PROCESSING "NODATA=1"
PROCESSING "NODATA=1.2676506002282e+30"
TEMPLATE "/maps/wms/pixel.list.html"
END


# /usr/lib/cgi-bin/mapserv 
QUERY_STRING='map=/maps/wms/hycom_currents_1.map=query=0=query=-77.534375+34.003125'

Content-Type: text/html

0.0090429913,0.11866909,0.003122841,-0.013737384,-0.0049919467,-0.024963228,1.2676506e+30,1.2676506e+30,1.2676506e+30,1.2676506e+30,1.2676506e+30,1.2676506e+30
*** Error in `/usr/lib/cgi-bin/mapserv': double free or corruption 
(out): 0x006768a0 ***

Aborted (core dumped)


# /usr/lib/cgi-bin/mapserv 
QUERY_STRING='map=/maps/wms/hycom_currents_2.map=query=0=query=-77.534375+34.003125'
*** Error in `/usr/lib/cgi-bin/mapserv': malloc(): memory corruption: 
0x006781e0 ***

Aborted (core dumped)


If I run it in gdb I get the following backtraces:


(gdb) run 
QUERY_STRING='map=/maps/wms/hycom_currents_1.map=query=0=query=-77.534375+34.003125'
Starting program: /usr/lib/cgi-bin/mapserv 
QUERY_STRING='map=/maps/wms/hycom_currents_1.map=query=0=query=-77.534375+34.003125'

[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Content-Type: text/html

0.0090429913,0.11866909,0.003122841,-0.013737384,-0.0049919467,-0.024963228,1.2676506e+30,1.2676506e+30,1.2676506e+30,1.2676506e+30,1.2676506e+30,1.2676506e+30
*** Error in `/usr/lib/cgi-bin/mapserv': double free or corruption 
(out): 0x006768b0 ***


Program received signal SIGABRT, Aborted.
0x77461c37 in __GI_raise (sig=sig@entry=6)
at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56  ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  0x77461c37 in __GI_raise (sig=sig@entry=6)
at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x77465028 in __GI_abort () at abort.c:89
#2  0x7749e2a4 in __libc_message (do_abort=do_abort@entry=1,
fmt=fmt@entry=0x775ac6b0 "*** Error in `%s': %s: 0x%s ***\n")
at ../sysdeps/posix/libc_fatal.c:175
#3  0x774aa55e in malloc_printerr (ptr=,
str=0x775ac7e0 "double free or corruption (out)", action=1)
at malloc.c:4996
#4  _int_free (av=, p=, have_lock=0)
at malloc.c:3840
#5  0x77ae810c in msFreeCharArray ()
   from /usr/lib/x86_64-linux-gnu/libmapserver.so.1
#6  0x77a9a86a in msLayerClose ()
   from /usr/lib/x86_64-linux-gnu/libmapserver.so.1
#7  0x77aef300 in freeLayer ()
   from /usr/lib/x86_64-linux-gnu/libmapserver.so.1
#8  0x77ace33e in msFreeMap ()
   from /usr/lib/x86_64-linux-gnu/libmapserver.so.1
#9  0x77a8576f in msFreeMapServObj ()
   from /usr/lib/x86_64-linux-gnu/libmapserver.so.1
#10 0x0040120e in main ()




(gdb) run 
QUERY_STRING='map=/maps/wms/hycom_currents_2.map=query=0=query=-77.534375+34.003125'
Starting program: /usr/lib/cgi-bin/mapserv 
QUERY_STRING='map=/maps/wms/hycom_currents_2.map=query=0=query=-77.534375+34.003125'

[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
*** Error in `/usr/lib/cgi-bin/mapserv': malloc(): memory corruption: 
0x006781f0 ***


Program received signal SIGABRT, Aborted.
0x77461c37 in __GI_raise (sig=sig@entry=6)
at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56  ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  0x77461c37 in __GI_raise (sig=sig@entry=6)
at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x77465028 in __GI_abort () at abort.c:89
#2  0x7749e2a4 in __libc_message (do_abort=1,
fmt=fmt@entry=0x775ac6b0 "*** Error in `%s': %s: 0x%s ***\n")
at ../sysdeps/posix/libc_fatal.c:175
#3  0x774abe26 in malloc_printerr (ptr=0x6781f0,
str=0x775a8882 "malloc(): memory corruption", action=out>)

at malloc.c:4996
#4  _int_malloc 

Re: [mapserver-users] How to make uvraster background transparent?

2016-07-13 Thread Stephen Woodbridge
Ooops, you are correct. The layer was setup as a jpeg in OL. I changed 
it to png and that fixed the issue.


Thanks,
  -Steve W

On 7/13/2016 12:06 PM, thomas bonfort wrote:

Steve,

The black color is coming from somewhere else, uvraster layers are
transparent, c.f. change/set the imagecolor in
msautotest/renderers/uvraster.map to see for yourself.

--
thomas

On 13 July 2016 at 17:59, Stephen Woodbridge  wrote:

Hi All,

I'm trying to use a CONNECTIONTYPE uvraster, andand it works very well,
except I would like the black background to be transparent so I can overlay
it on other data. A typical LAYER definition follows.

Is there a way to do this?

Thanks,
  -Steve W

LAYER
NAME "uv1_0"
GROUP "0"
TYPE POINT
STATUS ON
MINSCALEDENOM 100
CONNECTIONTYPE uvraster
OFFSITE 0 0 0
TRANSPARENCY 100
DATA "/maps/wms/data/HYCOM/HYCOM-currents.tif"
PROCESSING "BANDS=1,2"
#PROCESSING "NODATA=1"
PROCESSING "NODATA=1.2676506002282e+30"
PROCESSING "UV_SPACING=15"
PROCESSING "UV_SIZE_SCALE=15.0" # factor
CLASS
EXPRESSION ([uv_length] > 100)
END
CLASS
EXPRESSION ([uv_length] < 4.5)  # 0.3 * factor
STYLE
SYMBOL "horizline"
ANGLE [uv_angle]
SIZE [uv_length]
WIDTH 1
COLOR "#3840F2"
END # style
STYLE
SYMBOL "arrowhead"
ANGLE [uv_angle]
SIZE 4
COLOR "#3840F2"
POLAROFFSET [uv_length_2] [uv_angle]
END # style
END # class
# ... more CLASSes
END

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users



---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

[mapserver-users] Python MapScript via WSGI examples

2016-07-13 Thread Kralidis, Tom (EC)
Hi all: we are looking into updating our Python MapScript (CGI-based) wrappers
to leverage WSGI, and are having integration issues as part of testing.

We are using 6.4.2 on Ubuntu 14.04.  See example in [1] (against
any mapfile is fine).  Simple run with python ./mapscript-wsgi.py which makes
the server available on localhost:8000 by default.

Issues:

- the value in 
https://gist.github.com/tomkralidis/9adbd4864c03647aa7eb4f96a3c33297#file-mapscript-wsgi-py-L18
 ends up being a Python None type for some reason when it should be a string of 
the content-type
- issuing a, say, WMS 1.3.0 GetCapabilities request yields the venerable 
MapServer "This script can " default message, when I am expecting 
Capabilities XML

Any ideas what I'm doing wrong here?

..Tom

[1] https://gist.github.com/tomkralidis/9adbd4864c03647aa7eb4f96a3c33297
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] How exclude some items in a text/plain response for a GetFeatureInfo request

2016-07-13 Thread Andrea Peri
Thx Thomas,
is what I'm searching.


2016-07-13 18:27 GMT+02:00 thomas bonfort :
> wms_exclude_items
>
> --
> thomas
>
> On 13 July 2016 at 18:25, Andrea Peri  wrote:
>> Hi,
>> Doing a GetFeatureInfo request,
>> I notice the
>> gml_exclude_items for exclude some items from response
>> is working only for GML response.
>> But if the request is for a text/plain response it return always all the 
>> items.
>> There is a command to exclude some items from a text response ?
>>
>> Thx,
>>
>>
>> --
>> -
>> Andrea Peri
>> . . . . . . . . .
>> qwerty àèìòù
>> -
>> ___
>> mapserver-users mailing list
>> mapserver-users@lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users



-- 
-
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] How exclude some items in a text/plain response for a GetFeatureInfo request

2016-07-13 Thread thomas bonfort
wms_exclude_items

--
thomas

On 13 July 2016 at 18:25, Andrea Peri  wrote:
> Hi,
> Doing a GetFeatureInfo request,
> I notice the
> gml_exclude_items for exclude some items from response
> is working only for GML response.
> But if the request is for a text/plain response it return always all the 
> items.
> There is a command to exclude some items from a text response ?
>
> Thx,
>
>
> --
> -
> Andrea Peri
> . . . . . . . . .
> qwerty àèìòù
> -
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

[mapserver-users] How exclude some items in a text/plain response for a GetFeatureInfo request

2016-07-13 Thread Andrea Peri
Hi,
Doing a GetFeatureInfo request,
I notice the
gml_exclude_items for exclude some items from response
is working only for GML response.
But if the request is for a text/plain response it return always all the items.
There is a command to exclude some items from a text response ?

Thx,


-- 
-
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] How to make uvraster background transparent?

2016-07-13 Thread thomas bonfort
Steve,

The black color is coming from somewhere else, uvraster layers are
transparent, c.f. change/set the imagecolor in
msautotest/renderers/uvraster.map to see for yourself.

--
thomas

On 13 July 2016 at 17:59, Stephen Woodbridge  wrote:
> Hi All,
>
> I'm trying to use a CONNECTIONTYPE uvraster, andand it works very well,
> except I would like the black background to be transparent so I can overlay
> it on other data. A typical LAYER definition follows.
>
> Is there a way to do this?
>
> Thanks,
>   -Steve W
>
> LAYER
> NAME "uv1_0"
> GROUP "0"
> TYPE POINT
> STATUS ON
> MINSCALEDENOM 100
> CONNECTIONTYPE uvraster
> OFFSITE 0 0 0
> TRANSPARENCY 100
> DATA "/maps/wms/data/HYCOM/HYCOM-currents.tif"
> PROCESSING "BANDS=1,2"
> #PROCESSING "NODATA=1"
> PROCESSING "NODATA=1.2676506002282e+30"
> PROCESSING "UV_SPACING=15"
> PROCESSING "UV_SIZE_SCALE=15.0" # factor
> CLASS
> EXPRESSION ([uv_length] > 100)
> END
> CLASS
> EXPRESSION ([uv_length] < 4.5)  # 0.3 * factor
> STYLE
> SYMBOL "horizline"
> ANGLE [uv_angle]
> SIZE [uv_length]
> WIDTH 1
> COLOR "#3840F2"
> END # style
> STYLE
> SYMBOL "arrowhead"
> ANGLE [uv_angle]
> SIZE 4
> COLOR "#3840F2"
> POLAROFFSET [uv_length_2] [uv_angle]
> END # style
> END # class
> # ... more CLASSes
> END
>
> ---
> This email has been checked for viruses by Avast antivirus software.
> https://www.avast.com/antivirus
>
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

[mapserver-users] How to make uvraster background transparent?

2016-07-13 Thread Stephen Woodbridge

Hi All,

I'm trying to use a CONNECTIONTYPE uvraster, andand it works very well, 
except I would like the black background to be transparent so I can 
overlay it on other data. A typical LAYER definition follows.


Is there a way to do this?

Thanks,
  -Steve W

LAYER
NAME "uv1_0"
GROUP "0"
TYPE POINT
STATUS ON
MINSCALEDENOM 100
CONNECTIONTYPE uvraster
OFFSITE 0 0 0
TRANSPARENCY 100
DATA "/maps/wms/data/HYCOM/HYCOM-currents.tif"
PROCESSING "BANDS=1,2"
#PROCESSING "NODATA=1"
PROCESSING "NODATA=1.2676506002282e+30"
PROCESSING "UV_SPACING=15"
PROCESSING "UV_SIZE_SCALE=15.0" # factor
CLASS
EXPRESSION ([uv_length] > 100)
END
CLASS
EXPRESSION ([uv_length] < 4.5)  # 0.3 * factor
STYLE
SYMBOL "horizline"
ANGLE [uv_angle]
SIZE [uv_length]
WIDTH 1
COLOR "#3840F2"
END # style
STYLE
SYMBOL "arrowhead"
ANGLE [uv_angle]
SIZE 4
COLOR "#3840F2"
POLAROFFSET [uv_length_2] [uv_angle]
END # style
END # class
# ... more CLASSes
END

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users