Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow AGG images bigger than 2 GB (#4421) #4796

Closed
wants to merge 1 commit into from

Conversation

rouault
Copy link
Contributor

@rouault rouault commented Oct 19, 2013

Necessary changes, but not necessarily sufficient...

@gislars
Copy link
Member

gislars commented Jan 28, 2014

Thanks Thomas for pointing me to this patch.
My machine has 12 GB memory so I calculated a image size of 65049x45392 pixel == 11GB.

MapServer version 6.5-dev OUTPUT=PNG OUTPUT=JPEG OUTPUT=KML SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=SVG_SYMBOLS SUPPORTS=SVGCAIRO SUPPORTS=ICONV SUPPORTS=XMP SUPPORTS=WMS_SERVER SUPPORTS=WFS_SERVER SUPPORTS=WCS_SERVER SUPPORTS=FASTCGI SUPPORTS=GEOS INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE

The request is the same, apart from the binary name:

mapserv-test?LAYERS=default&FORMAT=png&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A900913&BBOX=1402445.0348208,6828711.8836421,1580879.938466,6953224.7330719&WIDTH=65049&HEIGHT=45392&format=agga&map_resolution=1200

The current master with above patch applied is processing the request and is producing a image.
gislars@gisbox:/temp$ file test3.png
test3.png: PNG image data, 65049 x 45392, 8-bit/color RGBA, non-interlaced
gislars@gisbox:
/temp$ ll test3.png
-rw-rw-r-- 1 gislars gislars 151895085 Jan 28 15:47 test3.png

The current master without above patch applied is crashing with the following log:
[Tue Jan 28 15:40:43 2014] [error] agg2CreateImage(): Memory allocation error. /root/tools/mapserver/mapagg.cpp: 814: Out of memory allocating 3220882240 bytes.
[Tue Jan 28 15:40:43 2014] [error]
[Tue Jan 28 15:40:43 2014] [error] msDrawMap(): Image handling error. Unable to initialize image.
[Tue Jan 28 15:40:43 2014] [error] agg2CreateImage(): Memory allocation error. /root/tools/mapserver/mapagg.cpp: 814: Out of memory allocating 3220882240 bytes.
[Tue Jan 28 15:40:43 2014] [error]
[Tue Jan 28 15:40:43 2014] [error] msImageCreate(): Memory allocation error. Unable to create new image object.
[Tue Jan 28 15:40:43 2014] [error] Premature end of script headers: mapserv-test

@tbonfort
Copy link
Member

applied in 344e7de

@tbonfort tbonfort closed this Mar 27, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants