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

Error when exporting to SVG #943

Open
colemanm opened this issue Nov 21, 2011 · 6 comments
Open

Error when exporting to SVG #943

colemanm opened this issue Nov 21, 2011 · 6 comments

Comments

@colemanm
Copy link

I tried exporting a map to SVG format (1000x1000 dimensions), and I'm receiving this error:

Error: std::bad_alloc

Not sure what's wrong... Don't see anything when watching the logs for further detail. This is running on Ubuntu 11.10 Oneiric.

@willwhite
Copy link
Contributor

Hi there,
What version of TileMill are you using? If you're not sure, just post the output of sudo apt-cache showpkg tilemill.

Thanks,
Will

@springmeyer
Copy link
Member

does it work if you send out a smaller svg? eg. try at 256/256 just to test. Also, how complex is your map and does it have large contiguous polygons? Cairo is used inside mapnik to generate the SVG and paths are not clipped (only masked) so if you have massive polygons that touch the rendering area (but are 99% outside) they will still get pushed into the SVG (trying to think if this could be a legitimate out of memory condition)...

@colemanm
Copy link
Author

@willwhite - Looks like I'm running TileMill 0.6.2

@colemanm
Copy link
Author

@springmeyer - It also failed on a test export at 256/256, with the same error. The map does have a lot of geometry, a couple of shapefiles with about 20-30k circular polygons (buffers of point data). Is there a way to look deeper into what's going on to diagnose?

@springmeyer
Copy link
Member

@colemanm - ideally you could post your testcase for me. To debug this I will comment out a catch(std::exception) in node-mapnik around svg rendering, and then run tilemill in gdb to see what the conditions are leading up to the bad alloc. I worry that cairo is simply overwhelmed with the amount of data and we'd need to aggressively clip it to avoid the issue.

@springmeyer
Copy link
Member

@colemanm - can you also give details on your machine? how much total and free memory does it have?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants