Re: [mapserver-users] Floating point exception

2022-04-09 Thread Luca Delucchi
On Fri, 8 Apr 2022 at 15:35, Jeff McKenna  wrote:
>
> Ciao Luca,
>

Jeff,

> What happens when you pass the full query through ogrinfo with the
> "-sql" switch:
>
>ogrinfo -ro PG:"user= password= host=127.0.0.1 port=5432
> dbname=" -sql "select "short_name"::text,ST_AsBinary(("geom"),'NDR')
> as geom,"research_groups_id"::text from (select research_groups_id,
> short_name, geom from main.research_groups where
> ST_Contains(ST_GeomFromText('POLYGON((-15.2587587587588
> 35,-15.2587587587588 70,37.2587587587588 70,37.2587587587588
> 35,-15.2587587587588 35))',4326), geom)) as subquery"
>

it works properly

Layer name: sql_statement
Geometry: None
Feature Count: 54
Layer SRS WKT:
(unknown)
short_name: String (0.0)
geom: Binary (0.0)
research_groups_id: String (0.0)
OGRFeature(sql_statement):0
  short_name (String) = CROC
  geom (Binary) = 010100037AE1CE85E11940F279C5538F784840
  research_groups_id (String) = 1
..
OGRFeature(sql_statement):53
  short_name (String) = JdE
  geom (Binary) = 01010035B22B2D236519C0828FC18A53754340
  research_groups_id (String) = 55

At this point I tried to compile the 7.6 version and use the compiled
shp2img and I didn't get anymore the "Floating point exception"
problem. I don't know where it was coming from :-/

>
> -jeff
>

-- 
ciao
Luca

www.lucadelu.org
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Floating point exception

2022-04-08 Thread Jeff McKenna

Ciao Luca,

What happens when you pass the full query through ogrinfo with the 
"-sql" switch:


  ogrinfo -ro PG:"user= password= host=127.0.0.1 port=5432
dbname=" -sql "select "short_name"::text,ST_AsBinary(("geom"),'NDR') 
as geom,"research_groups_id"::text from (select research_groups_id,

short_name, geom from main.research_groups where
ST_Contains(ST_GeomFromText('POLYGON((-15.2587587587588
35,-15.2587587587588 70,37.2587587587588 70,37.2587587587588
35,-15.2587587587588 35))',4326), geom)) as subquery"


-jeff



On 2022-04-08 9:49 a.m., Luca Delucchi wrote:

On Fri, 8 Apr 2022 at 13:43, Jeff McKenna  wrote:


Ciao Luca,



Ciao,


I am wondering also if you tried to access the PostGIS data through
ogrinfo yet (to confirm there is no data issue).  Note that I'd
recommend GDAL 3.4.2, PROJ 8.2.1 with MapServer-main.

   ogrinfo -ro PG:"user= password= host=127.0.0.1 port=5432
dbname=" table -summary



yes this works


Then, follow along the debugging document (
https://www.mapserver.org/optimization/debugging.html ) and add the
following inside your MAP object in mapfile:

CONFIG "CPL_DEBUG" "ON"
CONFIG "CPL_TIMESTAMP" "ON"
CONFIG "PROJ_DEBUG" "ON"

Then re-retry map2img with -all_debug 5, and look for the full SELECT
query made to your database, and run that same query inside psql
commandline.



using map2img as suggested by Even  I got this

Reading symbols from map2img...
(gdb) run
Starting program: /home/lucadelu/installati/bin/map2img -m
eurodeer_new.map -o eurodeer.png -all_debug 5 -conf mapserver.conf
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffebf54700 (LWP 801419)]
[New Thread 0x7fffeb753700 (LWP 801420)]
msDrawMap(): Image handling error. Failed to draw layer named 'Reserch
groups'. 
msPostGISLayerWhichShapes(): Query error. Failed to build query SQL. 
msPostGISBuildSQL(): General error message. Failed to build SQL 'where'. 
msSearchDiskTree(): Search returned no results. Unable to open spatial
index for 
/home/lucadelu/github/euromammals/print_maps/././data/ne_10m_admin_0_sovereignty.qix.
In most cases you can safely ignore this message, otherwise check file
names and permissions. 
[Fri Apr  8 14:38:55 2022].491539: GDAL: In GDALDestroy - unloading
GDAL shared library.
[Thread 0x7fffebf54700 (LWP 801419) exited]
[Thread 0x7fffec613bc0 (LWP 801411) exited]
[Inferior 1 (process 801411) exited with code 01]


However using shp2img with a running map file I was able to get the
full postgis query and run it on a database returning the error
"Floating point exception" without any problem.

select "short_name"::text,ST_AsBinary(("geom"),'NDR') as
geom,"research_groups_id"::text from (select research_groups_id,
short_name, geom from main.research_groups where
ST_Contains(ST_GeomFromText('POLYGON((-15.2587587587588
35,-15.2587587587588 70,37.2587587587588 70,37.2587587587588
35,-15.2587587587588 35))',4326), geom)) as subquery




-jeff






--
Jeff McKenna
GatewayGeo: Developers of MS4W, MapServer Consulting and Training
co-founder of FOSS4G
http://gatewaygeo.com/
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Floating point exception

2022-04-08 Thread Luca Delucchi
On Fri, 8 Apr 2022 at 13:43, Jeff McKenna  wrote:
>
> Ciao Luca,
>

Ciao,

> I am wondering also if you tried to access the PostGIS data through
> ogrinfo yet (to confirm there is no data issue).  Note that I'd
> recommend GDAL 3.4.2, PROJ 8.2.1 with MapServer-main.
>
>   ogrinfo -ro PG:"user= password= host=127.0.0.1 port=5432
> dbname=" table -summary
>

yes this works

> Then, follow along the debugging document (
> https://www.mapserver.org/optimization/debugging.html ) and add the
> following inside your MAP object in mapfile:
>
>CONFIG "CPL_DEBUG" "ON"
>CONFIG "CPL_TIMESTAMP" "ON"
>CONFIG "PROJ_DEBUG" "ON"
>
> Then re-retry map2img with -all_debug 5, and look for the full SELECT
> query made to your database, and run that same query inside psql
> commandline.
>

using map2img as suggested by Even  I got this

Reading symbols from map2img...
(gdb) run
Starting program: /home/lucadelu/installati/bin/map2img -m
eurodeer_new.map -o eurodeer.png -all_debug 5 -conf mapserver.conf
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffebf54700 (LWP 801419)]
[New Thread 0x7fffeb753700 (LWP 801420)]
msDrawMap(): Image handling error. Failed to draw layer named 'Reserch
groups'. 
msPostGISLayerWhichShapes(): Query error. Failed to build query SQL. 
msPostGISBuildSQL(): General error message. Failed to build SQL 'where'. 
msSearchDiskTree(): Search returned no results. Unable to open spatial
index for 
/home/lucadelu/github/euromammals/print_maps/././data/ne_10m_admin_0_sovereignty.qix.
In most cases you can safely ignore this message, otherwise check file
names and permissions. 
[Fri Apr  8 14:38:55 2022].491539: GDAL: In GDALDestroy - unloading
GDAL shared library.
[Thread 0x7fffebf54700 (LWP 801419) exited]
[Thread 0x7fffec613bc0 (LWP 801411) exited]
[Inferior 1 (process 801411) exited with code 01]


However using shp2img with a running map file I was able to get the
full postgis query and run it on a database returning the error
"Floating point exception" without any problem.

select "short_name"::text,ST_AsBinary(("geom"),'NDR') as
geom,"research_groups_id"::text from (select research_groups_id,
short_name, geom from main.research_groups where
ST_Contains(ST_GeomFromText('POLYGON((-15.2587587587588
35,-15.2587587587588 70,37.2587587587588 70,37.2587587587588
35,-15.2587587587588 35))',4326), geom)) as subquery


>
> -jeff
>

-- 
ciao
Luca

www.lucadelu.org
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Floating point exception

2022-04-08 Thread Even Rouault

Build with cmake -DCMAKE_BUILD_TYPE=Debug

and run under gdb:

gdb --args map2img -m eurodeer_new.map -o eurodeer.png -all_debug 5 
-conf /path/to/conffile


run

and when it crashes

bt

Le 08/04/2022 à 10:38, Luca Delucchi a écrit :

Hi,

I compiled the github master version and used map2img, the output is
not helping so much...

map2img -m eurodeer_new.map -o eurodeer.png -all_debug 5
Cannot open configuration file /usr/local/etc/mapserver.conf.
msLoadConfig(): Unable to access file. See
mapserver.org/config_file.html for more information.
msDrawMap(): Image handling error. Failed to draw layer named
'Research groups'. 
msPostGISLayerWhichShapes(): Query error. Failed to build query SQL. 
msPostGISBuildSQL(): General error message. Failed to build SQL 'where'. 
msSearchDiskTree(): Search returned no results. Unable to open spatial
index for 
/home/lucadelu/github/euromammals/print_maps/././data/ne_10m_admin_0_sovereignty.qix.
In most cases you can safely ignore this message, otherwise check file
names and permissions. 
msLoadConfig(): Unable to access file. See
mapserver.org/config_file.html for more information. 

the 'Research groups' layer is defined like this

DATA "geom from (select research_groups_id, short_name, geom from
main.research_groups where ST_Contains(!BOX!, geom)) as subquery using
unique research_groups_id using srid=4326"


--
http://www.spatialys.com
My software is free, but my time generally not.

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


Re: [mapserver-users] Floating point exception

2022-04-08 Thread Luca Delucchi
On Fri, 8 Apr 2022 at 11:03, Rahkonen Jukka (MML)
 wrote:
>
> Hi,
>

Hi,

> Mapserver 8 has increased security and requires a special config file. The 
> best link for the documentation at the moment is probably  
> https://mapserver.org/development/rfc/ms-rfc-135.html (The message "See 
> mapserver.org/config_file.html for more information" points to non-existing 
> location).
>

thanks I was think this is needed only for web request not to test a mapfile

> Why did you select "Floating point exception" as the title of your message?

because my starting problem (using mapserver 7) is this one...

>
> -Jukka Rahkonen-
>

-- 
ciao
Luca

www.lucadelu.org
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Floating point exception

2022-04-08 Thread Jeff McKenna

Ciao Luca,

I am wondering also if you tried to access the PostGIS data through 
ogrinfo yet (to confirm there is no data issue).  Note that I'd 
recommend GDAL 3.4.2, PROJ 8.2.1 with MapServer-main.


 ogrinfo -ro PG:"user= password= host=127.0.0.1 port=5432 
dbname=" table -summary


Then, follow along the debugging document ( 
https://www.mapserver.org/optimization/debugging.html ) and add the 
following inside your MAP object in mapfile:


  CONFIG "CPL_DEBUG" "ON"
  CONFIG "CPL_TIMESTAMP" "ON"
  CONFIG "PROJ_DEBUG" "ON"

Then re-retry map2img with -all_debug 5, and look for the full SELECT 
query made to your database, and run that same query inside psql 
commandline.



-jeff



--
Jeff McKenna
GatewayGeo: Developers of MS4W, MapServer Consulting and Training
co-founder of FOSS4G
http://gatewaygeo.com/


On 2022-04-01 9:22 a.m., Luca Delucchi wrote:

Hi all,

I'm getting "Floating point exception" error running shp2img, also
running with the debug option I don't get any other information.
The mapfile read data from PostGIS database, and If I use the same
mapfile with different database with the same tables I don't get this
error, so I think the problem is in the data but I don't know
where/what investigate

thanks in advance



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


Re: [mapserver-users] Floating point exception

2022-04-08 Thread lars . schylberg
Seth G. has written a good summany about this in a blog entry that hopefully 
will land in the 8.0 documentation.

https://geographika.net/posts/securing_mapserver.html#web-server-level-security

Have fun / Lars S.

8 april 2022 kl. 11:03, "Rahkonen Jukka (MML)" 
 skrev:

> Hi,
> 
> Mapserver 8 has increased security and requires a special config file. The 
> best link for the
> documentation at the moment is probably 
> https://mapserver.org/development/rfc/ms-rfc-135.html (The
> message "See mapserver.org/config_file.html for more information" points to 
> non-existing location).
> 
> Why did you select "Floating point exception" as the title of your message?
> 
> -Jukka Rahkonen-
> 
> -Alkuperäinen viesti-
> Lähettäjä: MapServer-users  Puolesta 
> Luca Delucchi
> Lähetetty: perjantai 8. huhtikuuta 2022 11.39
> Vastaanottaja: Jeff McKenna 
> Kopio: MapServer 
> Aihe: Re: [mapserver-users] Floating point exception
> 
> Hi,
> 
> I compiled the github master version and used map2img, the output is not 
> helping so much...
> 
> map2img -m eurodeer_new.map -o eurodeer.png -all_debug 5 Cannot open 
> configuration file
> /usr/local/etc/mapserver.conf.
> msLoadConfig(): Unable to access file. See mapserver.org/config_file.html for 
> more information.
> msDrawMap(): Image handling error. Failed to draw layer named 'Research 
> groups'. 
> msPostGISLayerWhichShapes(): Query error. Failed to build query SQL. 
> msPostGISBuildSQL(): General error message. Failed to build SQL 'where'. 
> msSearchDiskTree(): Search returned no results. Unable to open spatial index 
> for
> /home/lucadelu/github/euromammals/print_maps/././data/ne_10m_admin_0_sovereignty.qix.
> In most cases you can safely ignore this message, otherwise check file names 
> and permissions. 
> msLoadConfig(): Unable to access file. See mapserver.org/config_file.html for 
> more information.
> 
> 
> the 'Research groups' layer is defined like this
> 
> DATA "geom from (select research_groups_id, short_name, geom from 
> main.research_groups where
> ST_Contains(!BOX!, geom)) as subquery using unique research_groups_id using 
> srid=4326"
> 
> --
> ciao
> Luca
> 
> www.lucadelu.org
> ___
> MapServer-users mailing list
> MapServer-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
> ___
> MapServer-users mailing list
> MapServer-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Floating point exception

2022-04-08 Thread Rahkonen Jukka (MML)
Hi,

Mapserver 8 has increased security and requires a special config file. The best 
link for the documentation at the moment is probably  
https://mapserver.org/development/rfc/ms-rfc-135.html (The message "See 
mapserver.org/config_file.html for more information" points to non-existing 
location).

Why did you select "Floating point exception" as the title of your message?

-Jukka Rahkonen-

-Alkuperäinen viesti-
Lähettäjä: MapServer-users  Puolesta 
Luca Delucchi
Lähetetty: perjantai 8. huhtikuuta 2022 11.39
Vastaanottaja: Jeff McKenna 
Kopio: MapServer 
Aihe: Re: [mapserver-users] Floating point exception

Hi,

I compiled the github master version and used map2img, the output is not 
helping so much...

map2img -m eurodeer_new.map -o eurodeer.png -all_debug 5 Cannot open 
configuration file /usr/local/etc/mapserver.conf.
msLoadConfig(): Unable to access file. See mapserver.org/config_file.html for 
more information.
msDrawMap(): Image handling error. Failed to draw layer named 'Research 
groups'. 
msPostGISLayerWhichShapes(): Query error. Failed to build query SQL. 
msPostGISBuildSQL(): General error message. Failed to build SQL 'where'. 
msSearchDiskTree(): Search returned no results. Unable to open spatial index 
for 
/home/lucadelu/github/euromammals/print_maps/././data/ne_10m_admin_0_sovereignty.qix.
In most cases you can safely ignore this message, otherwise check file names 
and permissions. 
msLoadConfig(): Unable to access file. See mapserver.org/config_file.html for 
more information. 

the 'Research groups' layer is defined like this

DATA "geom from (select research_groups_id, short_name, geom from 
main.research_groups where ST_Contains(!BOX!, geom)) as subquery using unique 
research_groups_id using srid=4326"

--
ciao
Luca

www.lucadelu.org
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Floating point exception

2022-04-08 Thread Luca Delucchi
Hi,

I compiled the github master version and used map2img, the output is
not helping so much...

map2img -m eurodeer_new.map -o eurodeer.png -all_debug 5
Cannot open configuration file /usr/local/etc/mapserver.conf.
msLoadConfig(): Unable to access file. See
mapserver.org/config_file.html for more information.
msDrawMap(): Image handling error. Failed to draw layer named
'Research groups'. 
msPostGISLayerWhichShapes(): Query error. Failed to build query SQL. 
msPostGISBuildSQL(): General error message. Failed to build SQL 'where'. 
msSearchDiskTree(): Search returned no results. Unable to open spatial
index for 
/home/lucadelu/github/euromammals/print_maps/././data/ne_10m_admin_0_sovereignty.qix.
In most cases you can safely ignore this message, otherwise check file
names and permissions. 
msLoadConfig(): Unable to access file. See
mapserver.org/config_file.html for more information. 

the 'Research groups' layer is defined like this

DATA "geom from (select research_groups_id, short_name, geom from
main.research_groups where ST_Contains(!BOX!, geom)) as subquery using
unique research_groups_id using srid=4326"

-- 
ciao
Luca

www.lucadelu.org
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Floating point exception

2022-04-03 Thread Luca Delucchi
On Fri, 1 Apr 2022 at 14:39, Jeff McKenna  wrote:
>
> Ciao Luca,
>

Ciao Jeff,

> I had earlier documented by usual PostGIS debugging steps at
> https://mapserver.org/optimization/vector.html#debugging-speed-issues-with-postgis
>
> Also, instead of the "-map_debug 3" option with shp2img, try "-all_debug
> 5" (use "3" if you just want to show the draw speed times)
>

I tried also with -all_debug but no debug messages appears only the error

> The goal would be to output the exact query that MapServer is trying to
> execute against your database, and then try running that query at the
> psql commandline.
>
> And, if all else fails, be sure to retry all of this with a build of
> today's MapServer "main" branch, and try with map2img.
>

Ok, I will try in the next days

> -jeff
>

-- 
ciao
Luca

www.lucadelu.org
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Floating point exception

2022-04-01 Thread Jeff McKenna

Ciao Luca,

I had earlier documented by usual PostGIS debugging steps at 
https://mapserver.org/optimization/vector.html#debugging-speed-issues-with-postgis


Also, instead of the "-map_debug 3" option with shp2img, try "-all_debug 
5" (use "3" if you just want to show the draw speed times)


The goal would be to output the exact query that MapServer is trying to 
execute against your database, and then try running that query at the 
psql commandline.


And, if all else fails, be sure to retry all of this with a build of 
today's MapServer "main" branch, and try with map2img.


-jeff



--
Jeff McKenna
GatewayGeo: Developers of MS4W, MapServer Consulting and Training
co-founder of FOSS4G
http://gatewaygeo.com/



On 2022-04-01 9:22 a.m., Luca Delucchi wrote:

Hi all,

I'm getting "Floating point exception" error running shp2img, also
running with the debug option I don't get any other information.
The mapfile read data from PostGIS database, and If I use the same
mapfile with different database with the same tables I don't get this
error, so I think the problem is in the data but I don't know
where/what investigate

thanks in advance



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


Re: [mapserver-users] Floating point exception agg png

2011-03-21 Thread Daniel Degasperi
Ok, ticket created at http://trac.osgeo.org/mapserver/ticket/3760 and 
necessary files attached.


Daniel

Am 21/03/2011 15:03, schrieb thomas bonfort:

Daniel,
any chance you can create a ticket for that with a mapfile and sample
data that reproduces it ?
the png vs. jpeg should not intervene as at the point the error is
occuring the code path has been nearly identical (i.e. no png or jpeg
library calls have been made yet).

thomas

On Mon, Mar 21, 2011 at 14:47, Daniel Degasperi
  wrote:

Hi,
I'v encountered following problem with outputformat png (agg driver):

shp2img -m /data/sites/R3-MTB-Public/sito/etc/goldart/mtb.map -l "ropeway"
-e 667072.437052 5153904.693426 677867.431220 5164699.687594 -s 1224 1224 -o
test-mtb.png -all_debug 1 (i got a FPE)

The debugger backtrace gives me:

Program received signal SIGFPE, Arithmetic exception.
0x004ba89e in
mapserver::line_image_pattern

::pixel (this=0x7fffc940, p=0x7fffc43c, x=82, y=-757)

at renderers/agg/include/agg_renderer_outline_image.h:173
173 m_filter->pixel_high_res(m_buf.rows(),
(gdb) bt
#0  0x004ba89e in
mapserver::line_image_pattern

::pixel (this=0x7fffc940, p=0x7fffc43c, x=82, y=-757)

at renderers/agg/include/agg_renderer_outline_image.h:173
#1  0x004ba8fb in
mapserver::renderer_outline_image, mapserv_row_ptr_cache, int>  >,
mapserver::line_image_pattern

::pixel (this=0x7fffc9e0, p=0x7fffc43c, x=82, y=-757)

at renderers/agg/include/agg_renderer_outline_image.h:860
#2  0x004bafba in
mapserver::line_interpolator_image, mapserv_row_ptr_cache, int>  >,
mapserver::line_image_pattern

::step_hor (this=0x7fffc1c0)

at renderers/agg/include/agg_renderer_outline_image.h:668
#3  0x004bb27f in
mapserver::renderer_outline_image, mapserv_row_ptr_cache, int>  >,
mapserver::line_image_pattern

::line3_no_clip (this=0x7fffc9e0, lp=..., sx=105681, sy=155778,

ex=101946, ey=147898)
at renderers/agg/include/agg_renderer_outline_image.h:931
#4  0x004c99f9 in
mapserver::renderer_outline_image, mapserv_row_ptr_cache, int>  >,
mapserver::line_image_pattern

::line3 (this=0x7fffc9e0, lp=..., sx=105681, sy=155778, ex=101946,

ey=147898)
at renderers/agg/include/agg_renderer_outline_image.h:992
#5  0x004cc5b9 in
mapserver::rasterizer_outline_aa, mapserv_row_ptr_cache, int>  >,
mapserver::line_image_pattern

, mapserver::line_coord_sat>::render (this=0x7fffc9a0,

close_polygon=false) at
renderers/agg/include/agg_rasterizer_outline_aa.h:540
#6  0x004cc9b5 in
mapserver::rasterizer_outline_aa, mapserv_row_ptr_cache, int>  >,
mapserver::line_image_pattern

, mapserver::line_coord_sat>::add_path  (

this=0x7fffc9a0, vs=..., path_id=0) at
renderers/agg/include/agg_rasterizer_outline_aa.h:177
#7  0x004cca3f in
AGGMapserverRenderer::renderPathPixmapBGRA  (this=0xf74350,
line=..., pattern=...) at mapagg.cpp:392
#8  0x004cccea in
AGGMapserverRenderer::renderPolylineVectorSymbol  >, mapserver::null_markers>  >  (this=0xf74350, shape=...,
symbol=..., tilewidth=0, tileheight=5, color=..., backgroundcolor=...) at
mapagg.cpp:370
#9  0x004a9b21 in msDrawLineSymbolAGG(._98 *, ._105 *, ._39 *, ._91
*, double) (symbolset=0x822ae0, image=0x937b30, p=0x7fffd310,
style=0x87e230, scalefactor=1.)
at mapagg.cpp:1723
#10 0x0053d573 in msDrawLineSymbol (symbolset=0x822ae0,
image=0x937b30, p=0x7fffd310, style=0x87e230,
scalefactor=1.) at maprendering.c:488
#11 0x00485521 in msDrawShape (map=0x822ab0, layer=0x87c820,
shape=0x7fffd310, image=0x937b30, style=0, querymapMode=0) at
mapdraw.c:1962
#12 0x0047fe20 in msDrawVectorLayer (map=0x822ab0, layer=0x87c820,
image=0x937b30) at mapdraw.c:1032
#13 0x0047f32e in msDrawLayer (map=0x822ab0, layer=0x87c820,
image=0x937b30) at mapdraw.c:822
#14 0x0047e1e5 in msDrawMap (map=0x822ab0, querymap=0) at
mapdraw.c:468
#15 0x00440b32 in main (argc=17, argv=0x7fffd848) at
shp2img.c:292

When I switch to outputformat jpeg (agg driver) everything is fine.

MapServer is 5.6.6 on 64bit CentOS 5.5

Best regards,
Daniel

--
Daniel Degasperi R3 GIS Srl - GmbH www.r3-gis.com
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users




--
Daniel Degasperi R3 GIS Srl - GmbH www.r3-gis.com
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Floating point exception agg png

2011-03-21 Thread thomas bonfort
Daniel,
any chance you can create a ticket for that with a mapfile and sample
data that reproduces it ?
the png vs. jpeg should not intervene as at the point the error is
occuring the code path has been nearly identical (i.e. no png or jpeg
library calls have been made yet).

thomas

On Mon, Mar 21, 2011 at 14:47, Daniel Degasperi
 wrote:
> Hi,
> I'v encountered following problem with outputformat png (agg driver):
>
> shp2img -m /data/sites/R3-MTB-Public/sito/etc/goldart/mtb.map -l "ropeway"
> -e 667072.437052 5153904.693426 677867.431220 5164699.687594 -s 1224 1224 -o
> test-mtb.png -all_debug 1 (i got a FPE)
>
> The debugger backtrace gives me:
>
> Program received signal SIGFPE, Arithmetic exception.
> 0x004ba89e in
> mapserver::line_image_pattern
>>::pixel (this=0x7fffc940, p=0x7fffc43c, x=82, y=-757)
>    at renderers/agg/include/agg_renderer_outline_image.h:173
> 173                 m_filter->pixel_high_res(m_buf.rows(),
> (gdb) bt
> #0  0x004ba89e in
> mapserver::line_image_pattern
>>::pixel (this=0x7fffc940, p=0x7fffc43c, x=82, y=-757)
>    at renderers/agg/include/agg_renderer_outline_image.h:173
> #1  0x004ba8fb in
> mapserver::renderer_outline_image mapserver::order_bgra>, mapserv_row_ptr_cache, int> >,
> mapserver::line_image_pattern
>> >::pixel (this=0x7fffc9e0, p=0x7fffc43c, x=82, y=-757)
>    at renderers/agg/include/agg_renderer_outline_image.h:860
> #2  0x004bafba in
> mapserver::line_interpolator_image mapserver::order_bgra>, mapserv_row_ptr_cache, int> >,
> mapserver::line_image_pattern
>> > >::step_hor (this=0x7fffc1c0)
>    at renderers/agg/include/agg_renderer_outline_image.h:668
> #3  0x004bb27f in
> mapserver::renderer_outline_image mapserver::order_bgra>, mapserv_row_ptr_cache, int> >,
> mapserver::line_image_pattern
>> >::line3_no_clip (this=0x7fffc9e0, lp=..., sx=105681, sy=155778,
> ex=101946, ey=147898)
>    at renderers/agg/include/agg_renderer_outline_image.h:931
> #4  0x004c99f9 in
> mapserver::renderer_outline_image mapserver::order_bgra>, mapserv_row_ptr_cache, int> >,
> mapserver::line_image_pattern
>> >::line3 (this=0x7fffc9e0, lp=..., sx=105681, sy=155778, ex=101946,
> ey=147898)
>    at renderers/agg/include/agg_renderer_outline_image.h:992
> #5  0x004cc5b9 in
> mapserver::rasterizer_outline_aa mapserver::order_bgra>, mapserv_row_ptr_cache, int> >,
> mapserver::line_image_pattern
>> >, mapserver::line_coord_sat>::render (this=0x7fffc9a0,
>    close_polygon=false) at
> renderers/agg/include/agg_rasterizer_outline_aa.h:540
> #6  0x004cc9b5 in
> mapserver::rasterizer_outline_aa mapserver::order_bgra>, mapserv_row_ptr_cache, int> >,
> mapserver::line_image_pattern
>> >, mapserver::line_coord_sat>::add_path (
>    this=0x7fffc9a0, vs=..., path_id=0) at
> renderers/agg/include/agg_rasterizer_outline_aa.h:177
> #7  0x004cca3f in
> AGGMapserverRenderer::renderPathPixmapBGRA (this=0xf74350,
> line=..., pattern=...) at mapagg.cpp:392
> #8  0x004cccea in
> AGGMapserverRenderer::renderPolylineVectorSymbol mapserver::conv_stroke 8u, 256u> >, mapserver::null_markers> > (this=0xf74350, shape=...,
> symbol=..., tilewidth=0, tileheight=5, color=..., backgroundcolor=...) at
> mapagg.cpp:370
> #9  0x004a9b21 in msDrawLineSymbolAGG(._98 *, ._105 *, ._39 *, ._91
> *, double) (symbolset=0x822ae0, image=0x937b30, p=0x7fffd310,
> style=0x87e230, scalefactor=1.)
>    at mapagg.cpp:1723
> #10 0x0053d573 in msDrawLineSymbol (symbolset=0x822ae0,
> image=0x937b30, p=0x7fffd310, style=0x87e230,
> scalefactor=1.) at maprendering.c:488
> #11 0x00485521 in msDrawShape (map=0x822ab0, layer=0x87c820,
> shape=0x7fffd310, image=0x937b30, style=0, querymapMode=0) at
> mapdraw.c:1962
> #12 0x0047fe20 in msDrawVectorLayer (map=0x822ab0, layer=0x87c820,
> image=0x937b30) at mapdraw.c:1032
> #13 0x0047f32e in msDrawLayer (map=0x822ab0, layer=0x87c820,
> image=0x937b30) at mapdraw.c:822
> #14 0x0047e1e5 in msDrawMap (map=0x822ab0, querymap=0) at
> mapdraw.c:468
> #15 0x00440b32 in main (argc=17, argv=0x7fffd848) at
> shp2img.c:292
>
> When I switch to outputformat jpeg (agg driver) everything is fine.
>
> MapServer is 5.6.6 on 64bit CentOS 5.5
>
> Best regards,
> Daniel
>
> --
> Daniel Degasperi R3 GIS Srl - GmbH www.r3-gis.com
> ___
> 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