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

msResampleGDALToMap causes memory allocation error #5402

Closed
szekerest opened this issue Mar 5, 2017 · 2 comments
Closed

msResampleGDALToMap causes memory allocation error #5402

szekerest opened this issue Mar 5, 2017 · 2 comments

Comments

@szekerest
Copy link
Member

@szekerest szekerest commented Mar 5, 2017

Since this commit was added e0a3448 mapserver may cause memory allocation errors for certain rasters. Attached a sample map and a vrt file (couldn't attach the source ecw it is 700MB in size).
We can use shp2img to reproduce this as follows:

E:\Maps\DMS>shp2img -m ecwtest_vrt.map -o ecwtest_vrt.png
msDrawMap(): Image handling error. Failed to draw layer named 'test'.

msImageCreate(): Memory allocation error. Unable to create new image object.

agg2CreateImage(): Memory allocation error. ..\mapagg.cpp: 824: Out of memory allocating 10240256000 bytes.

test.zip

rouault added a commit that referenced this issue Mar 5, 2017
@rouault rouault closed this Mar 5, 2017
@szekerest
Copy link
Member Author

@szekerest szekerest commented Mar 5, 2017

I'm afraid this fix doesn't solve the the issue, if we increase the zoom level, for example by changing the EXTENT in the mapfile to:

EXTENT 13523244.2497627 -3808739.10513869 13650837.2685289 -3716866.07739124

In my particular use case the user might want to zoom out to arbitrary levels which was possible before the referred commit was added.

@szekerest szekerest reopened this Mar 5, 2017
rouault added a commit that referenced this issue Mar 5, 2017
…ection cases to raster of 'modest' size (#5402)
@rouault
Copy link
Contributor

@rouault rouault commented Mar 5, 2017

OK, I've pushed another restriction that will definitely avoid the regression you saw with rasters of large dimensions

@rouault rouault closed this Mar 5, 2017
dmsadmin pushed a commit to DMS-Aus/MapServer that referenced this issue Mar 15, 2017
dmsadmin pushed a commit to DMS-Aus/MapServer that referenced this issue Mar 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.